max_tempo = max (max_tempo, ts->beats_per_minute());
min_tempo = min (min_tempo, ts->beats_per_minute());
- tempo_curves.push_back (new TempoCurve (*this, *tempo_group, UIConfiguration::instance().color ("range drag rect"),
+ tempo_curves.push_back (new TempoCurve (*this, *tempo_group, UIConfiguration::instance().color ("tempo curve"),
*(const_cast<TempoSection*>(ts)), ts->frame(), false));
- metric_marks.push_back (new TempoMarker (*this, *tempo_group, UIConfiguration::instance().color ("tempo marker"), buf,
+ if (ts->position_lock_style() == MusicTime) {
+ metric_marks.push_back (new TempoMarker (*this, *tempo_group, UIConfiguration::instance().color ("tempo marker music"), buf,
*(const_cast<TempoSection*>(ts))));
+ } else {
+ metric_marks.push_back (new TempoMarker (*this, *tempo_group, UIConfiguration::instance().color ("tempo marker"), buf,
+ *(const_cast<TempoSection*>(ts))));
+ }
}
}
+ const double min_tempo_range = 5.0;
+ const double tempo_delta = fabs (max_tempo - min_tempo);
+
+ if (tempo_delta < min_tempo_range) {
+ max_tempo += min_tempo_range - tempo_delta;
+ min_tempo += tempo_delta - min_tempo_range;
+ }
+
for (Curves::iterator x = tempo_curves.begin(); x != tempo_curves.end(); ) {
Curves::iterator tmp = x;
(*x)->set_max_tempo (max_tempo);
tempo_curves.sort (CurveComparator());
+ const double min_tempo_range = 5.0;
+ const double tempo_delta = fabs (max_tempo - min_tempo);
+
+ if (tempo_delta < min_tempo_range) {
+ max_tempo += min_tempo_range - tempo_delta;
+ min_tempo += tempo_delta - min_tempo_range;
+ }
+
for (Curves::iterator x = tempo_curves.begin(); x != tempo_curves.end(); ) {
Curves::iterator tmp = x;
(*x)->set_max_tempo (max_tempo);
if (pulse > 0.0) {
XMLNode &before = map.get_state();
/* add music-locked ramped (?) tempo using the bpm/note type at frame*/
- map.add_tempo (map.tempo_at (frame), pulse, 0, TempoSection::Ramp, MusicTime);
+ map.add_tempo (map.tempo_at_frame (frame), pulse, 0, TempoSection::Ramp, MusicTime);
XMLNode &after = map.get_state();
_session->add_command(new MementoCommand<TempoMap>(map, &before, &after));
if (meter_dialog.get_lock_style() == MusicTime) {
map.add_meter (Meter (bpb, note_type), map.beat_at_bbt (requested), requested, 0, MusicTime);
} else {
- map.add_meter (Meter (bpb, note_type), map.beat_at_bbt (requested), requested, map.frame_time (requested), AudioTime);
+ map.add_meter (Meter (bpb, note_type), map.beat_at_bbt (requested), requested, map.frame_at_bbt (requested), AudioTime);
}
_session->add_command(new MementoCommand<TempoMap>(map, &before, &map.get_state()));
double const note_type = meter_dialog.get_note_type ();
Timecode::BBT_Time when;
meter_dialog.get_bbt_time (when);
- framepos_t const frame = _session->tempo_map().frame_time (when);
+ framepos_t const frame = _session->tempo_map().frame_at_bbt (when);
begin_reversible_command (_("replace meter mark"));
XMLNode &before = _session->tempo_map().get_state();