Browse Source

节拍器时值

skyblued 2 years ago
parent
commit
b7799e89fc
2 changed files with 5 additions and 3 deletions
  1. 1 1
      src/pages/detail/helpers.ts
  2. 4 2
      src/subpages/colexiu/buttons/evaluating.tsx

+ 1 - 1
src/pages/detail/helpers.ts

@@ -463,8 +463,8 @@ export const getAllNodes = (osmd: any) => {
               // console.log('diff', speed, diff * vDenominator * (60 / speed), getFixTime(speed))
             }
           }
-          // console.log({...note})
           const nodeDetail = {
+            fixtime,
             skipMode,
             NoteToGraphicalNoteObjectId: note.NoteToGraphicalNoteObjectId,
             cursorBox,

+ 4 - 2
src/subpages/colexiu/buttons/evaluating.tsx

@@ -79,7 +79,7 @@ const formatTimes = () => {
     const rate = runtime.speed / detailState.baseSpeed //1
     const start = difftime + (item.sourceRelativeTime || item.relativeTime) - starTime
     const end = difftime + (item.sourceRelaEndtime || item.relaEndtime) - starTime
-    console.log(start, end, starTime)
+    // console.log(start, end, starTime)
     const isStaccato =
       typeof note.voiceEntry.isStaccato === 'function' ? note.voiceEntry.isStaccato() : note.voiceEntry.isStaccato
     const noteRate = isStaccato ? 0.5 : 1
@@ -148,8 +148,10 @@ const connect = async () => {
     reactionTimeMs: parseFloat('' + SettingState.eva.reactionTimeMs) || 0,
     speed: runtime.speed,
     heardLevel: SettingState.eva.difficulty,
-    beatLength: Math.round((RuntimeUtils.getFixTime(detailState.times[0].beatSpeed) * 1000) / rate),
+    // beatLength: Math.round((RuntimeUtils.getFixTime(detailState.times[0].beatSpeed) * 1000) / rate),
+    beatLength: Math.round(detailState.times[0].fixtime * 1000 / rate),
   }
+  // console.log("🚀 ~ content:", content, rate)
   const clientType = useClientType()
   if (clientType === 'student') {
     content.clientId = 'STUDENT'