Automation of LV2 plugin properties.
[ardour.git] / libs / ardour / audioregion.cc
index 2eb09ae192c1aa4c933083500101e8e51f874b49..8c4eb6aa2a13d3f3eb2fb3a9bed2bedfcf7360d5 100644 (file)
@@ -957,6 +957,34 @@ AudioRegion::set_state (const XMLNode& node, int version)
        return _set_state (node, version, what_changed, true);
 }
 
+void
+AudioRegion::fade_range (framepos_t start, framepos_t end)
+{
+       framepos_t s, e;
+
+       switch (coverage (start, end)) {
+       case Evoral::OverlapStart:
+               s = _position;
+               e = end;
+               set_fade_in (FadeConstantPower, e - s);
+               break;
+       case Evoral::OverlapEnd:
+               s = start;
+               e = _position + _length;
+               set_fade_out (FadeConstantPower, e - s);
+               break;
+       case Evoral::OverlapInternal:
+               /* needs addressing, perhaps. Difficult to do if we can't
+                * control one edge of the fade relative to the relevant edge
+                * of the region, which we cannot - fades are currently assumed
+                * to start/end at the start/end of the region
+                */
+               break;
+       default:
+               return;
+       }
+}
+
 void
 AudioRegion::set_fade_in_shape (FadeShape shape)
 {
@@ -1650,16 +1678,16 @@ AudioRegion::get_transients (AnalysisFeatureList& results, bool force_new)
 
        if (!Config->get_auto_analyse_audio()) {
                if (!analyse_dialog_shown) {
-                       pl->session().Dialog (_("\
+                       pl->session().Dialog (string_compose (_("\
 You have requested an operation that requires audio analysis.\n\n\
 You currently have \"auto-analyse-audio\" disabled, which means \
 that transient data must be generated every time it is required.\n\n\
 If you are doing work that will require transient data on a \
 regular basis, you should probably enable \"auto-analyse-audio\" \
-then quit ardour and restart.\n\n\
+then quit %1 and restart.\n\n\
 This dialog will not display again.  But you may notice a slight delay \
 in this and future transient-detection operations.\n\
-"));
+"), PROGRAM_NAME));
                        analyse_dialog_shown = true;
                }
        }