From af5b7d267effe931574e86119bf2482ab8eb8dec Mon Sep 17 00:00:00 2001 From: Romot Date: Fri, 13 Jan 2023 19:02:18 +0900 Subject: [PATCH] =?UTF-8?q?#986=20=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/singing.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/store/singing.ts b/src/store/singing.ts index d9f6ffbdb1..0b9bba0f46 100644 --- a/src/store/singing.ts +++ b/src/store/singing.ts @@ -9,6 +9,7 @@ import { import { createPartialStore } from "./vuex"; import { createUILockAction } from "./ui"; import { Midi } from "@tonejs/midi"; +import { getDoremiFromMidi } from "@/helpers/singHelper"; export const singingStoreState: SingingStoreState = { engineId: undefined, @@ -322,7 +323,7 @@ export const singingStore = createPartialStore({ mutation(state, { zoomX }: { zoomX: number }) { state.sequencerZoomX = zoomX; }, - action({ commit }, { zoomX }) { + async action({ commit }, { zoomX }) { commit("SET_ZOOM_X", { zoomX, }); @@ -333,7 +334,7 @@ export const singingStore = createPartialStore({ mutation(state, { zoomY }: { zoomY: number }) { state.sequencerZoomY = zoomY; }, - action({ commit }, { zoomY }) { + async action({ commit }, { zoomY }) { commit("SET_ZOOM_Y", { zoomY, }); @@ -408,7 +409,7 @@ export const singingStore = createPartialStore({ note.durationTicks ), midi: note.midi, - lyric: "", + lyric: getDoremiFromMidi(note.midi), })) .sort((a, b) => a.position - b.position) .forEach((note) => {