summaryrefslogtreecommitdiff
path: root/libs/ardour/location.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-12-30 00:39:10 +1100
committernick_m <mainsbridge@gmail.com>2016-05-27 23:38:10 +1000
commit885f1fd684da31a730f90ebad23ad9ff39baedb0 (patch)
treec8d4564d40cd29948d802357b29595a5916b6689 /libs/ardour/location.cc
parent772683d2df7ba96d27943140fe59c8797fd7bed3 (diff)
Tempo ramps - update midi regions and locations when dragging tempo.
- also make locations and regions use a double beat rather than bbt for musical position.
Diffstat (limited to 'libs/ardour/location.cc')
-rw-r--r--libs/ardour/location.cc28
1 files changed, 12 insertions, 16 deletions
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc
index 0820660db6..d827d0f2b6 100644
--- a/libs/ardour/location.cc
+++ b/libs/ardour/location.cc
@@ -207,8 +207,8 @@ Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute)
start_changed (this); /* EMIT SIGNAL */
StartChanged (); /* EMIT SIGNAL */
- end_changed (this); /* EMIT SIGNAL */
- EndChanged (); /* EMIT SIGNAL */
+ //end_changed (this); /* EMIT SIGNAL */
+ //EndChanged (); /* EMIT SIGNAL */
}
/* moving the start (position) of a marker with a scene change
@@ -281,8 +281,8 @@ Location::set_end (framepos_t e, bool force, bool allow_bbt_recompute)
if (allow_bbt_recompute) {
recompute_bbt_from_frames ();
}
- start_changed (this); /* EMIT SIGNAL */
- StartChanged (); /* EMIT SIGNAL */
+ //start_changed (this); /* EMIT SIGNAL */
+ //StartChanged (); /* EMIT SIGNAL */
end_changed (this); /* EMIT SIGNAL */
EndChanged (); /* EMIT SIGNAL */
}
@@ -396,21 +396,17 @@ Location::set (framepos_t s, framepos_t e, bool allow_bbt_recompute)
assert (_end >= 0);
}
- if (start_change) {
+ if (start_change && end_change) {
+ changed (this);
+ Changed ();
+ } else if (start_change) {
start_changed(this); /* EMIT SIGNAL */
StartChanged(); /* EMIT SIGNAL */
- }
-
- if (end_change) {
+ } else if (end_change) {
end_changed(this); /* EMIT SIGNAL */
EndChanged(); /* EMIT SIGNAL */
}
- if (start_change && end_change) {
- changed (this);
- Changed ();
- }
-
return 0;
}
@@ -726,8 +722,8 @@ Location::recompute_bbt_from_frames ()
return;
}
- _session.bbt_time (_start, _bbt_start);
- _session.bbt_time (_end, _bbt_end);
+ _bbt_start = _session.tempo_map().beat_at_frame (_start);
+ _bbt_end = _session.tempo_map().beat_at_frame (_end);
}
void
@@ -738,7 +734,7 @@ Location::recompute_frames_from_bbt ()
}
TempoMap& map (_session.tempo_map());
- set (map.frame_time (_bbt_start), map.frame_time (_bbt_end), false);
+ set (map.frame_at_beat (_bbt_start), map.frame_at_beat (_bbt_end), false);
}
void