From 33e95a15778e7fe87c204b0c4f2db039f857b523 Mon Sep 17 00:00:00 2001 From: nick_m Date: Sun, 6 Nov 2016 05:14:20 +1100 Subject: rename Tempo _beats_per_minute to _note_types_per_minute, provide pulse helpers. - adds quarter_notes_per_minute(), note_divisions_per_minute (double) pulses_per_minute() and frames_per_quarter_note() - this should be a no-op except for the use of tempo by the vst callback which definitely uses quarter notes per minute. - the XML node for TempoSection named 'beats-per-minute' has been renamed. --- libs/ardour/midi_clock_slave.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libs/ardour/midi_clock_slave.cc') diff --git a/libs/ardour/midi_clock_slave.cc b/libs/ardour/midi_clock_slave.cc index f2dc4f9abb..edc6e91e32 100644 --- a/libs/ardour/midi_clock_slave.cc +++ b/libs/ardour/midi_clock_slave.cc @@ -82,11 +82,7 @@ MIDIClock_Slave::rebind (MidiPort& port) void MIDIClock_Slave::calculate_one_ppqn_in_frames_at(framepos_t time) { - const Tempo& current_tempo = session->tempo_map().tempo_at_frame (time); - double const 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; + const double frames_per_quarter_note = session->tempo_map().frames_per_quarter_note_at (time, session->frame_rate()); one_ppqn_in_frames = frames_per_quarter_note / double (ppqn); // DEBUG_TRACE (DEBUG::MidiClock, string_compose ("at %1, one ppqn = %2\n", time, one_ppqn_in_frames)); -- cgit v1.2.3