diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-01 03:22:04 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-01 03:22:04 +0000 |
commit | a47ec8ba590d1fe663a64a50b02b1f6b61fd5743 (patch) | |
tree | 50889cd8a5b0c6c9e09ddea7b932cf6d761a9b09 /libs | |
parent | 01659c1d73ea30de8d0eb455b0182122798b578b (diff) |
mostly backup-oriented commit to preserve very initial pass at rendering fades-as-xfades in a more useful way. quite a bit of work to do here
git-svn-id: svn://localhost/ardour2/branches/3.0@12129 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/audioregion.h | 2 | ||||
-rw-r--r-- | libs/ardour/audio_playlist.cc | 10 | ||||
-rw-r--r-- | libs/ardour/audioregion.cc | 14 |
3 files changed, 15 insertions, 11 deletions
diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h index 43d831521d..fe9f991ed0 100644 --- a/libs/ardour/ardour/audioregion.h +++ b/libs/ardour/ardour/audioregion.h @@ -95,7 +95,9 @@ class AudioRegion : public Region void set_fade_out_is_xfade (bool yn); boost::shared_ptr<AutomationList> fade_in() { return _fade_in; } + boost::shared_ptr<AutomationList> inverse_fade_in() { return _inverse_fade_in; } boost::shared_ptr<AutomationList> fade_out() { return _fade_out; } + boost::shared_ptr<AutomationList> inverse_fade_out() { return _inverse_fade_out; } boost::shared_ptr<AutomationList> envelope() { return _envelope; } Evoral::Range<framepos_t> body_range () const; diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc index f1c89cc565..9c304967dc 100644 --- a/libs/ardour/audio_playlist.cc +++ b/libs/ardour/audio_playlist.cc @@ -329,6 +329,9 @@ AudioPlaylist::check_crossfades (Evoral::Range<framepos_t> range) break; } + top->set_fade_in_active (true); + top->set_fade_in_is_xfade (true); + switch (_session.config.get_xfade_choice ()) { case ConstantPowerMinus3dB: top->set_fade_in (FadeConstantPowerMinus3dB, len); @@ -340,8 +343,6 @@ AudioPlaylist::check_crossfades (Evoral::Range<framepos_t> range) top->set_fade_in_length (len); break; } - top->set_fade_in_active (true); - top->set_fade_in_is_xfade (true); done_start.insert (top); } @@ -367,6 +368,9 @@ AudioPlaylist::check_crossfades (Evoral::Range<framepos_t> range) break; } + top->set_fade_out_active (true); + top->set_fade_out_is_xfade (true); + switch (_session.config.get_xfade_choice ()) { case ConstantPowerMinus3dB: top->set_fade_out (FadeConstantPowerMinus3dB, len); @@ -378,8 +382,6 @@ AudioPlaylist::check_crossfades (Evoral::Range<framepos_t> range) top->set_fade_out_length (len); break; } - top->set_fade_out_active (true); - top->set_fade_out_is_xfade (true); done_end.insert (top); } diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 3f685075d1..a4d290ae6d 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -1042,16 +1042,16 @@ AudioRegion::set_fade_out (FadeShape shape, framecnt_t len) /* setup complementary fade in for lower layers */ if (!_inverse_fade_out) { - _inverse_fade_out.reset (new AutomationList (Evoral::Parameter (FadeInAutomation))); + _inverse_fade_out.reset (new AutomationList (Evoral::Parameter (FadeOutAutomation))); } _inverse_fade_out->clear (); _inverse_fade_out->fast_simple_add (0.0, 0.0); - _inverse_fade_out->fast_simple_add ((len * 0.166667), 0.166366); - _inverse_fade_out->fast_simple_add ((len * 0.333333), 0.332853); - _inverse_fade_out->fast_simple_add ((len * 0.500000), 0.499459); - _inverse_fade_out->fast_simple_add ((len * 0.666667), 0.666186); - _inverse_fade_out->fast_simple_add ((len * 0.833333), 0.833033); + _inverse_fade_out->fast_simple_add ((len * 0.166667), 0.282192); + _inverse_fade_out->fast_simple_add ((len * 0.333333), 0.518174); + _inverse_fade_out->fast_simple_add ((len * 0.500000), 0.707946); + _inverse_fade_out->fast_simple_add ((len * 0.666667), 0.851507); + _inverse_fade_out->fast_simple_add ((len * 0.833333), 0.948859); _inverse_fade_out->fast_simple_add (len, 1.0); break; @@ -1068,7 +1068,7 @@ AudioRegion::set_fade_out (FadeShape shape, framecnt_t len) /* setup complementary fade in for lower layers */ if (!_inverse_fade_out) { - _inverse_fade_out.reset (new AutomationList (Evoral::Parameter (FadeInAutomation))); + _inverse_fade_out.reset (new AutomationList (Evoral::Parameter (FadeOutAutomation))); } _inverse_fade_out->clear (); |