|
@@ -297,7 +297,7 @@ export const moveNoteKey = (note: string, moveData: { step: number; move: number
|
|
|
const formateGetData = {
|
|
|
getNoteType: (duration: number) => {
|
|
|
const type = 0.25 / duration;
|
|
|
- console.log(type);
|
|
|
+ console.log(type, duration);
|
|
|
const noteType = [
|
|
|
{ name: 0.25, value: "4" },
|
|
|
{ name: 0.5, value: "2" },
|
|
@@ -306,7 +306,15 @@ const formateGetData = {
|
|
|
{ name: 4, value: "//" },
|
|
|
{ name: 8, value: "///" },
|
|
|
];
|
|
|
- return noteType.find((n) => n.name === type)?.value || "";
|
|
|
+ let _duration = noteType.find((n) => n.name === type)?.value || "";
|
|
|
+ const noteDuration: any = {
|
|
|
+ "0.375": "3/2",
|
|
|
+ "0.75": "3"
|
|
|
+ }
|
|
|
+ if (_duration === "") {
|
|
|
+ _duration = noteDuration[duration] || "";
|
|
|
+ }
|
|
|
+ return _duration
|
|
|
},
|
|
|
};
|
|
|
|