diff --git a/Daigassou/Input_Midi/MidiToKey.cs b/Daigassou/Input_Midi/MidiToKey.cs index 58cd07d..97950ca 100644 --- a/Daigassou/Input_Midi/MidiToKey.cs +++ b/Daigassou/Input_Midi/MidiToKey.cs @@ -321,8 +321,7 @@ public Queue ArrangeKeyPlaysNew(double speed) { case NoteOnEvent @event: { - tickBase = 60000 / (float)Tmap.Tempo.AtTime((long)(ev.Time/speed)).BeatsPerMinute / - ticksPerQuarterNote; + var noteNumber = (int)(@event.NoteNumber + Offset); nowTimeMs += (int)(tickBase * @event.DeltaTime); retKeyPlayLists.Enqueue(new KeyPlayList(KeyPlayList.NoteEvent.NoteOn, @@ -332,8 +331,6 @@ public Queue ArrangeKeyPlaysNew(double speed) break; case NoteOffEvent @event: { - tickBase = 60000 / (float)Tmap.Tempo.AtTime((long)(ev.Time / speed)).BeatsPerMinute / - ticksPerQuarterNote; var noteNumber = (int)(@event.NoteNumber + Offset); nowTimeMs += (int)(tickBase * @event.DeltaTime); retKeyPlayLists.Enqueue(new KeyPlayList(KeyPlayList.NoteEvent.NoteOff, @@ -345,7 +342,7 @@ public Queue ArrangeKeyPlaysNew(double speed) nowTimeMs += (int)(tickBase * @event.DeltaTime); - tickBase = (float)@event.MicrosecondsPerQuarterNote/ticksPerQuarterNote; + tickBase = (float)@event.MicrosecondsPerQuarterNote/1000/ticksPerQuarterNote; } break;