Skip to content

Commit

Permalink
- fix MIDI player clock resyncing with playback speed ratios != 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-hart committed Sep 14, 2023
1 parent 2abfecc commit 633a03d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hi_core/hi_dsp/modules/MidiPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ void MidiPlayer::onGridChange(int gridIndex, uint16 timestamp, bool firstGridEve
{
auto t = getMainController()->getMasterClock().getCurrentClockGrid();
auto quarterPos = (double)gridIndex * TempoSyncer::getTempoFactor(t);
auto tickPos = quarterPos * (double)HiseMidiSequence::TicksPerQuarter;
auto tickPos = quarterPos * (double)HiseMidiSequence::TicksPerQuarter * playbackSpeed;
setPositionWithTicksFromPlaybackStart(tickPos);
}
}
Expand Down

0 comments on commit 633a03d

Please sign in to comment.