13
0

fix MIDI Clock output times by using the correct call to get tempo at a position

Could be worth a double check of the codebase/hiding the API that ignores ramping
This commit is contained in:
Paul Davis 2024-10-02 09:13:28 -06:00
parent adc9d9e0af
commit 52336eb2f0

View File

@ -218,8 +218,8 @@ out:
double
MidiClockTicker::one_ppqn_in_samples (samplepos_t transport_position) const
{
Tempo const & tempo (TempoMap::use()->metric_at (timepos_t (transport_position)).tempo());
const double samples_per_quarter_note = tempo.samples_per_quarter_note (_session.nominal_sample_rate());
TempoPoint const & tempo (TempoMap::use()->metric_at (timepos_t (transport_position)).tempo());
const double samples_per_quarter_note = superclock_to_samples (tempo.superclocks_per_note_type_at (timepos_t (transport_position)), _session.nominal_sample_rate());
return samples_per_quarter_note / 24.0;
}