summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_clock_slave.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-11-06 05:14:20 +1100
committernick_m <mainsbridge@gmail.com>2016-11-11 03:37:08 +1100
commit33e95a15778e7fe87c204b0c4f2db039f857b523 (patch)
tree90678ea8fdf2a8a9532d808fd2efbf5775e5290e /libs/ardour/midi_clock_slave.cc
parente52f90357e79dac10da2bee0e27d51e8b07d5b83 (diff)
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.
Diffstat (limited to 'libs/ardour/midi_clock_slave.cc')
-rw-r--r--libs/ardour/midi_clock_slave.cc6
1 files changed, 1 insertions, 5 deletions
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));