#include "ardour/session.h"
#include "ardour/dB.h"
#include "ardour/debug.h"
+#include "ardour/event_type_map.h"
#include "ardour/playlist.h"
#include "ardour/audiofilesource.h"
#include "ardour/region_factory.h"
#include "ardour/runtime_functions.h"
#include "ardour/transient_detector.h"
+#include "ardour/parameter_descriptor.h"
#include "ardour/progress.h"
#include "i18n.h"
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)
{
void
AudioRegion::set_fade_in (FadeShape shape, framecnt_t len)
{
- boost::shared_ptr<Evoral::ControlList> c1 (new Evoral::ControlList (FadeInAutomation));
- boost::shared_ptr<Evoral::ControlList> c2 (new Evoral::ControlList (FadeInAutomation));
- boost::shared_ptr<Evoral::ControlList> c3 (new Evoral::ControlList (FadeInAutomation));
+ const ARDOUR::ParameterDescriptor desc(FadeInAutomation);
+ boost::shared_ptr<Evoral::ControlList> c1 (new Evoral::ControlList (FadeInAutomation, desc));
+ boost::shared_ptr<Evoral::ControlList> c2 (new Evoral::ControlList (FadeInAutomation, desc));
+ boost::shared_ptr<Evoral::ControlList> c3 (new Evoral::ControlList (FadeInAutomation, desc));
_fade_in->freeze ();
_fade_in->clear ();
void
AudioRegion::set_fade_out (FadeShape shape, framecnt_t len)
{
- boost::shared_ptr<Evoral::ControlList> c1 (new Evoral::ControlList (FadeOutAutomation));
- boost::shared_ptr<Evoral::ControlList> c2 (new Evoral::ControlList (FadeOutAutomation));
+ const ARDOUR::ParameterDescriptor desc(FadeOutAutomation);
+ boost::shared_ptr<Evoral::ControlList> c1 (new Evoral::ControlList (FadeOutAutomation, desc));
+ boost::shared_ptr<Evoral::ControlList> c2 (new Evoral::ControlList (FadeOutAutomation, desc));
_fade_out->freeze ();
_fade_out->clear ();
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;
}
}