mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
Tempo ramps - fix crazy compilable namespace thinko
This commit is contained in:
parent
bdef9b2466
commit
36f04367df
5 changed files with 23 additions and 23 deletions
|
|
@ -141,12 +141,12 @@ TempoSection::TempoSection (const XMLNode& node)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((prop = node.property ("tempo-type")) == 0) {
|
if ((prop = node.property ("tempo-type")) == 0) {
|
||||||
_type = Type::Constant;
|
_type = Constant;
|
||||||
} else {
|
} else {
|
||||||
if (strstr(prop->value().c_str(),"Constant")) {
|
if (strstr(prop->value().c_str(),"Constant")) {
|
||||||
_type = Type::Constant;
|
_type = Constant;
|
||||||
} else {
|
} else {
|
||||||
_type = Type::Ramp;
|
_type = Ramp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -487,7 +487,7 @@ TempoMap::TempoMap (framecnt_t fr)
|
||||||
start.beats = 1;
|
start.beats = 1;
|
||||||
start.ticks = 0;
|
start.ticks = 0;
|
||||||
|
|
||||||
TempoSection *t = new TempoSection (0.0, _default_tempo.beats_per_minute(), _default_tempo.note_type(), TempoSection::Type::Constant);
|
TempoSection *t = new TempoSection (0.0, _default_tempo.beats_per_minute(), _default_tempo.note_type(), TempoSection::Constant);
|
||||||
MeterSection *m = new MeterSection (0.0, start, _default_meter.divisions_per_bar(), _default_meter.note_divisor());
|
MeterSection *m = new MeterSection (0.0, start, _default_meter.divisions_per_bar(), _default_meter.note_divisor());
|
||||||
|
|
||||||
t->set_movable (false);
|
t->set_movable (false);
|
||||||
|
|
@ -1070,7 +1070,7 @@ TempoMap::recompute_map (bool reassign_tempo_bbt, framepos_t end)
|
||||||
/* this walk shouldn't be needed as given c, time a = log (Ta / T0) / c. what to do? */
|
/* this walk shouldn't be needed as given c, time a = log (Ta / T0) / c. what to do? */
|
||||||
double length_estimate = beats_relative_to_prev_ts * av_fpb;
|
double length_estimate = beats_relative_to_prev_ts * av_fpb;
|
||||||
|
|
||||||
if (prev_ts->type() == TempoSection::Type::Constant) {
|
if (prev_ts->type() == TempoSection::Constant) {
|
||||||
length_estimate = beats_relative_to_prev_ts * prev_ts->frames_per_beat (_frame_rate);
|
length_estimate = beats_relative_to_prev_ts * prev_ts->frames_per_beat (_frame_rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ FrameposMinusBeatsTest::singleTempoTest ()
|
||||||
Meter meter (4, 4);
|
Meter meter (4, 4);
|
||||||
|
|
||||||
map.add_meter (meter, 0.0, BBT_Time (1, 1, 0));
|
map.add_meter (meter, 0.0, BBT_Time (1, 1, 0));
|
||||||
map.add_tempo (tempo, 0.0, TempoSection::Type::Constant);
|
map.add_tempo (tempo, 0.0, TempoSection::Constant);
|
||||||
|
|
||||||
/* Subtract 1 beat from beat 3 of the first bar */
|
/* Subtract 1 beat from beat 3 of the first bar */
|
||||||
framepos_t r = map.framepos_minus_beats (frames_per_beat * 2, Beats(1));
|
framepos_t r = map.framepos_minus_beats (frames_per_beat * 2, Beats(1));
|
||||||
|
|
@ -63,9 +63,9 @@ FrameposMinusBeatsTest::doubleTempoTest ()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Tempo tempoA (120);
|
Tempo tempoA (120);
|
||||||
map.add_tempo (tempoA, 0.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoA, 0.0, TempoSection::Constant);
|
||||||
Tempo tempoB (240);
|
Tempo tempoB (240);
|
||||||
map.add_tempo (tempoB, 12.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoB, 12.0, TempoSection::Constant);
|
||||||
|
|
||||||
/* Now some tests */
|
/* Now some tests */
|
||||||
|
|
||||||
|
|
@ -115,9 +115,9 @@ FrameposMinusBeatsTest::doubleTempoWithMeterTest ()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Tempo tempoA (120);
|
Tempo tempoA (120);
|
||||||
map.add_tempo (tempoA, 0.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoA, 0.0, TempoSection::Constant);
|
||||||
Tempo tempoB (240);
|
Tempo tempoB (240);
|
||||||
map.add_tempo (tempoB, 12.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoB, 12.0, TempoSection::Constant);
|
||||||
Meter meterB (3, 4);
|
Meter meterB (3, 4);
|
||||||
map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0));
|
map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ FrameposPlusBeatsTest::singleTempoTest ()
|
||||||
Meter meter (4, 4);
|
Meter meter (4, 4);
|
||||||
|
|
||||||
map.add_meter (meter, 0.0, BBT_Time (1, 1, 0));
|
map.add_meter (meter, 0.0, BBT_Time (1, 1, 0));
|
||||||
map.add_tempo (tempo, 0.0, TempoSection::Type::Constant);
|
map.add_tempo (tempo, 0.0, TempoSection::Constant);
|
||||||
|
|
||||||
/* Add 1 beat to beat 3 of the first bar */
|
/* Add 1 beat to beat 3 of the first bar */
|
||||||
framepos_t r = map.framepos_plus_beats (frames_per_beat * 2, Evoral::Beats(1));
|
framepos_t r = map.framepos_plus_beats (frames_per_beat * 2, Evoral::Beats(1));
|
||||||
|
|
@ -62,9 +62,9 @@ FrameposPlusBeatsTest::doubleTempoTest ()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Tempo tempoA (120);
|
Tempo tempoA (120);
|
||||||
map.add_tempo (tempoA, 0.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoA, 0.0, TempoSection::Constant);
|
||||||
Tempo tempoB (240);
|
Tempo tempoB (240);
|
||||||
map.add_tempo (tempoB, 12.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoB, 12.0, TempoSection::Constant);
|
||||||
|
|
||||||
/* Now some tests */
|
/* Now some tests */
|
||||||
|
|
||||||
|
|
@ -114,9 +114,9 @@ FrameposPlusBeatsTest::doubleTempoWithMeterTest ()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Tempo tempoA (120);
|
Tempo tempoA (120);
|
||||||
map.add_tempo (tempoA, 0.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoA, 0.0, TempoSection::Constant);
|
||||||
Tempo tempoB (240);
|
Tempo tempoB (240);
|
||||||
map.add_tempo (tempoB, 12.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoB, 12.0, TempoSection::Constant);
|
||||||
Meter meterB (3, 4);
|
Meter meterB (3, 4);
|
||||||
map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0));
|
map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ FramewalkToBeatsTest::singleTempoTest ()
|
||||||
Meter meter (4, 4);
|
Meter meter (4, 4);
|
||||||
|
|
||||||
map.add_meter (meter, 0.0, BBT_Time (1, 1, 0));
|
map.add_meter (meter, 0.0, BBT_Time (1, 1, 0));
|
||||||
map.add_tempo (tempo, 0.0, TempoSection::Type::Constant);
|
map.add_tempo (tempo, 0.0, TempoSection::Constant);
|
||||||
|
|
||||||
/* Walk 1 beats-worth of frames from beat 3 */
|
/* Walk 1 beats-worth of frames from beat 3 */
|
||||||
double r = map.framewalk_to_beats (frames_per_beat * 2, frames_per_beat * 1).to_double();
|
double r = map.framewalk_to_beats (frames_per_beat * 2, frames_per_beat * 1).to_double();
|
||||||
|
|
@ -70,9 +70,9 @@ FramewalkToBeatsTest::doubleTempoTest ()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Tempo tempoA (120);
|
Tempo tempoA (120);
|
||||||
map.add_tempo (tempoA, 0.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoA, 0.0, TempoSection::Constant);
|
||||||
Tempo tempoB (240);
|
Tempo tempoB (240);
|
||||||
map.add_tempo (tempoB, 12.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoB, 12.0, TempoSection::Constant);
|
||||||
|
|
||||||
/* Now some tests */
|
/* Now some tests */
|
||||||
|
|
||||||
|
|
@ -125,11 +125,11 @@ FramewalkToBeatsTest::tripleTempoTest ()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Tempo tempoA (120);
|
Tempo tempoA (120);
|
||||||
map.add_tempo (tempoA, 0.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoA, 0.0, TempoSection::Constant);
|
||||||
Tempo tempoB (240);
|
Tempo tempoB (240);
|
||||||
map.add_tempo (tempoB, 4.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoB, 4.0, TempoSection::Constant);
|
||||||
Tempo tempoC (160);
|
Tempo tempoC (160);
|
||||||
map.add_tempo (tempoC, 8.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoC, 8.0, TempoSection::Constant);
|
||||||
|
|
||||||
/* Walk from 1|3 to 4|1 */
|
/* Walk from 1|3 to 4|1 */
|
||||||
double r = map.framewalk_to_beats (2 * 24e3, (2 * 24e3) + (4 * 12e3) + (4 * 18e3)).to_double();
|
double r = map.framewalk_to_beats (2 * 24e3, (2 * 24e3) + (4 * 12e3) + (4 * 18e3)).to_double();
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,9 @@ TempoTest::recomputeMapTest ()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Tempo tempoA (120);
|
Tempo tempoA (120);
|
||||||
map.add_tempo (tempoA, 0.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoA, 0.0, TempoSection::Constant);
|
||||||
Tempo tempoB (240);
|
Tempo tempoB (240);
|
||||||
map.add_tempo (tempoB, 12.0, TempoSection::Type::Constant);
|
map.add_tempo (tempoB, 12.0, TempoSection::Constant);
|
||||||
Meter meterB (3, 4);
|
Meter meterB (3, 4);
|
||||||
map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0));
|
map.add_meter (meterB, 12.0, BBT_Time (4, 1, 0));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue