From 94e0a15325278ec26dbeba4990a0e883db859338 Mon Sep 17 00:00:00 2001 From: nick_m Date: Thu, 16 Jun 2016 00:18:27 +1000 Subject: Exact beat - provide audio->music mapping for region split. - for those not in the know, this series provides a way to remove the temporal distortion introduced when using an audio frame-based gui for music-locked objects. In short, the gui uses an audio frame representation to move objects. It displays the object using frame_at_beat(), quantizing the time value to audio frames. This is fine until the user selects that frame but expects it to be interpreted as a beat. Thus beat_at_frame() would not produce the user-expected beat (temporal quantization error of up to 0.5 audio samples). This is one method of mapping audio time to music time accurately. --- libs/ardour/rb_effect.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/ardour/rb_effect.cc') diff --git a/libs/ardour/rb_effect.cc b/libs/ardour/rb_effect.cc index 03ce918f31..9ae909780a 100644 --- a/libs/ardour/rb_effect.cc +++ b/libs/ardour/rb_effect.cc @@ -352,9 +352,9 @@ RBEffect::run (boost::shared_ptr r, Progress* progress) shift); (*x)->set_master_sources (region->master_sources()); /* multiply the old (possibly previously stretched) region length by the extra - stretch this time around to get its new length + stretch this time around to get its new length. this is a non-music based edit atm. */ - (*x)->set_length ((*x)->length() * tsr.time_fraction); + (*x)->set_length ((*x)->length() * tsr.time_fraction, 0); } /* stretch region gain envelope */ -- cgit v1.2.3