Tempo ramps - port audio unit and midi clock slave.
- untested.
This commit is contained in:
parent
2d649ceac1
commit
9eeccf0c17
@ -1810,8 +1810,8 @@ AUPlugin::get_musical_time_location_callback (UInt32* outDeltaSampleOffsetToNe
|
||||
*outDeltaSampleOffsetToNextBeat = 0;
|
||||
} else {
|
||||
*outDeltaSampleOffsetToNextBeat = (UInt32)
|
||||
floor (((Timecode::BBT_Time::ticks_per_beat - bbt.ticks)/Timecode::BBT_Time::ticks_per_beat) * // fraction of a beat to next beat
|
||||
metric.tempo().frames_per_beat (_session.frame_rate())); // frames per beat
|
||||
double beat_frac_to_next = (Timecode::BBT_Time::ticks_per_beat - bbt.ticks) / Timecode::BBT_Time::ticks_per_beat ;
|
||||
tmap.frame_at_beat (tmap.beat_at_frame (_session.transport_frame() + input_offset) + beat_frac_to_next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ void
|
||||
MIDIClock_Slave::calculate_one_ppqn_in_frames_at(framepos_t time)
|
||||
{
|
||||
const Tempo& current_tempo = session->tempo_map().tempo_at(time);
|
||||
double frames_per_beat = current_tempo.frames_per_beat(session->frame_rate());
|
||||
double frames_per_beat = session->tempo_map().frames_per_beat_at (time, session->frame_rate());
|
||||
|
||||
double quarter_notes_per_beat = 4.0 / current_tempo.note_type();
|
||||
double frames_per_quarter_note = frames_per_beat / quarter_notes_per_beat;
|
||||
|
Loading…
Reference in New Issue
Block a user