Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
AmanoTooko committed May 26, 2019
1 parent 1f74463 commit 1389ef5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Daigassou/Input_Midi/MidiToKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,7 @@ public Queue<KeyPlayList> 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,
Expand All @@ -332,8 +331,6 @@ public Queue<KeyPlayList> 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,
Expand All @@ -345,7 +342,7 @@ public Queue<KeyPlayList> ArrangeKeyPlaysNew(double speed)


nowTimeMs += (int)(tickBase * @event.DeltaTime);
tickBase = (float)@event.MicrosecondsPerQuarterNote/ticksPerQuarterNote;
tickBase = (float)@event.MicrosecondsPerQuarterNote/1000/ticksPerQuarterNote;

}
break;
Expand Down

0 comments on commit 1389ef5

Please sign in to comment.