summaryrefslogtreecommitdiff
path: root/libs/ardour/test/tempo_test.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-12-28 05:33:04 +1100
committernick_m <mainsbridge@gmail.com>2016-05-27 23:38:09 +1000
commit5c6e18e6a087823e4a3719177c92238b206e3aeb (patch)
tree25f7faefa65e630e68da70bf4378b825e7c29312 /libs/ardour/test/tempo_test.cc
parent41c8b534b70e220b4d4b940aed8a98d9a57003ab (diff)
Tempo ramps - remove the concept of bars from tempo sections.
- this helps where tempo and meter have a somewhat circular dependency. MetricSection now has a musical position expressed in beats (a double). MeterSection still has a bbt, but it really isn't needed as we have enough information to discover the number of bars at a given beat without it. TempoSection now has a hack to enable loading of legacy sessions, which will ultimately be a lot cleaner than the current code. Removing bars from tempo sections also allows us to place them at arbitrary frames (implemented here).
Diffstat (limited to 'libs/ardour/test/tempo_test.cc')
-rw-r--r--libs/ardour/test/tempo_test.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/test/tempo_test.cc b/libs/ardour/test/tempo_test.cc
index 04b24f6d73..a7f9c1d405 100644
--- a/libs/ardour/test/tempo_test.cc
+++ b/libs/ardour/test/tempo_test.cc
@@ -14,7 +14,7 @@ TempoTest::recomputeMapTest ()
TempoMap map (sampling_rate);
Meter meterA (4, 4);
- map.add_meter (meterA, BBT_Time (1, 1, 0));
+ map.add_meter (meterA, 0.0, BBT_Time (1, 1, 0));
/*
120bpm at bar 1, 240bpm at bar 4
@@ -35,11 +35,11 @@ TempoTest::recomputeMapTest ()
*/
Tempo tempoA (120);
- map.add_tempo (tempoA, BBT_Time (1, 1, 0), TempoSection::Type::Constant);
+ map.add_tempo (tempoA, 0.0, TempoSection::Type::Constant);
Tempo tempoB (240);
- map.add_tempo (tempoB, BBT_Time (4, 1, 0), TempoSection::Type::Constant);
+ map.add_tempo (tempoB, 12.0, TempoSection::Type::Constant);
Meter meterB (3, 4);
- map.add_meter (meterB, BBT_Time (4, 1, 0));
+ map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0));
list<MetricSection*>::iterator i = map.metrics.begin();
CPPUNIT_ASSERT_EQUAL (framepos_t (0), (*i)->frame ());