summaryrefslogtreecommitdiff
path: root/libs/ardour/lv2_plugin.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/lv2_plugin.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/lv2_plugin.cc')
-rw-r--r--libs/ardour/lv2_plugin.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index 1b6775ab49..8343d3c0e5 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -2494,7 +2494,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
}
if (_bpm_control_port) {
- *_bpm_control_port = tmap.tempo_at_frame (start).beats_per_minute();
+ *_bpm_control_port = tmap.tempo_at_frame (start).note_types_per_minute();
}
#ifdef LV2_EXTENDED
@@ -2566,7 +2566,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
if (valid && (flags & PORT_INPUT)) {
if ((flags & PORT_POSITION)) {
Timecode::BBT_Time bbt (tmap.bbt_at_frame (start));
- double bpm = tmap.tempo_at_frame (start).beats_per_minute();
+ double bpm = tmap.tempo_at_frame (start).note_types_per_minute();
double beatpos = (bbt.bars - 1) * tmetric.meter().divisions_per_bar()
+ (bbt.beats - 1)
+ (bbt.ticks / Timecode::BBT_Time::ticks_per_beat);
@@ -2608,7 +2608,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
tmetric.set_metric(metric);
Timecode::BBT_Time bbt;
bbt = tmap.bbt_at_frame (metric->frame());
- double bpm = tmap.tempo_at_frame (start/*XXX*/).beats_per_minute();
+ double bpm = tmap.tempo_at_frame (start/*XXX*/).note_types_per_minute();
write_position(&_impl->forge, _ev_buffers[port_index],
tmetric, bbt, speed, bpm,
metric->frame(),
@@ -2881,7 +2881,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
* so it needs to be realative to that.
*/
TempoMetric t = tmap.metric_at(start);
- _current_bpm = tmap.tempo_at_frame (start).beats_per_minute();
+ _current_bpm = tmap.tempo_at_frame (start).note_types_per_minute();
Timecode::BBT_Time bbt (tmap.bbt_at_frame (start));
double beatpos = (bbt.bars - 1) * t.meter().divisions_per_bar()
+ (bbt.beats - 1)