mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
ripple: create RippleMode and associated enums
* RippleAll is no longer an EditMode * RippleSelected, RippleAll and RippleInterview are now subtypes of Ripple
This commit is contained in:
parent
54367e5aef
commit
ba9bbf81ba
6 changed files with 48 additions and 7 deletions
|
|
@ -221,6 +221,7 @@ CONFIG_VARIABLE (double, automation_thinning_factor, "automation-thinning-factor
|
||||||
CONFIG_VARIABLE (std::string, freesound_download_dir, "freesound-download-dir", Glib::get_home_dir() + "/Freesound/snd")
|
CONFIG_VARIABLE (std::string, freesound_download_dir, "freesound-download-dir", Glib::get_home_dir() + "/Freesound/snd")
|
||||||
CONFIG_VARIABLE (samplecnt_t, range_location_minimum, "range-location-minimum", 128) /* samples */
|
CONFIG_VARIABLE (samplecnt_t, range_location_minimum, "range-location-minimum", 128) /* samples */
|
||||||
CONFIG_VARIABLE (EditMode, edit_mode, "edit-mode", Slide)
|
CONFIG_VARIABLE (EditMode, edit_mode, "edit-mode", Slide)
|
||||||
|
CONFIG_VARIABLE (RippleMode, ripple_mode, "ripple-mode", RippleSelected)
|
||||||
CONFIG_VARIABLE (Temporal::TimeDomain, default_automation_time_domain, "default-automation-time-domain", Temporal::BeatTime)
|
CONFIG_VARIABLE (Temporal::TimeDomain, default_automation_time_domain, "default-automation-time-domain", Temporal::BeatTime)
|
||||||
|
|
||||||
/* plugin related */
|
/* plugin related */
|
||||||
|
|
|
||||||
|
|
@ -413,10 +413,15 @@ enum MeterHold {
|
||||||
enum EditMode {
|
enum EditMode {
|
||||||
Slide,
|
Slide,
|
||||||
Ripple,
|
Ripple,
|
||||||
RippleAll,
|
|
||||||
Lock
|
Lock
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum RippleMode {
|
||||||
|
RippleSelected,
|
||||||
|
RippleAll,
|
||||||
|
RippleInterview
|
||||||
|
};
|
||||||
|
|
||||||
enum RegionSelectionAfterSplit {
|
enum RegionSelectionAfterSplit {
|
||||||
None = 0,
|
None = 0,
|
||||||
NewlyCreatedLeft = 1, // bit 0
|
NewlyCreatedLeft = 1, // bit 0
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ DEFINE_ENUM_CONVERT(ARDOUR::AutoConnectOption)
|
||||||
DEFINE_ENUM_CONVERT(ARDOUR::TracksAutoNamingRule)
|
DEFINE_ENUM_CONVERT(ARDOUR::TracksAutoNamingRule)
|
||||||
DEFINE_ENUM_CONVERT(ARDOUR::TrackMode)
|
DEFINE_ENUM_CONVERT(ARDOUR::TrackMode)
|
||||||
DEFINE_ENUM_CONVERT(ARDOUR::EditMode)
|
DEFINE_ENUM_CONVERT(ARDOUR::EditMode)
|
||||||
|
DEFINE_ENUM_CONVERT(ARDOUR::RippleMode)
|
||||||
DEFINE_ENUM_CONVERT(ARDOUR::MonitorModel)
|
DEFINE_ENUM_CONVERT(ARDOUR::MonitorModel)
|
||||||
DEFINE_ENUM_CONVERT(ARDOUR::AFLPosition)
|
DEFINE_ENUM_CONVERT(ARDOUR::AFLPosition)
|
||||||
DEFINE_ENUM_CONVERT(ARDOUR::PFLPosition)
|
DEFINE_ENUM_CONVERT(ARDOUR::PFLPosition)
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,9 @@ LIBARDOUR_API void compute_equal_power_fades (ARDOUR::samplecnt_t nframes, float
|
||||||
LIBARDOUR_API const char* edit_mode_to_string (ARDOUR::EditMode);
|
LIBARDOUR_API const char* edit_mode_to_string (ARDOUR::EditMode);
|
||||||
LIBARDOUR_API ARDOUR::EditMode string_to_edit_mode (std::string);
|
LIBARDOUR_API ARDOUR::EditMode string_to_edit_mode (std::string);
|
||||||
|
|
||||||
|
LIBARDOUR_API const char* ripple_mode_to_string (ARDOUR::RippleMode);
|
||||||
|
LIBARDOUR_API ARDOUR::RippleMode string_to_ripple_mode (std::string);
|
||||||
|
|
||||||
LIBARDOUR_API double gain_to_slider_position_with_max (double g, double max_gain = 2.0);
|
LIBARDOUR_API double gain_to_slider_position_with_max (double g, double max_gain = 2.0);
|
||||||
LIBARDOUR_API double slider_position_to_gain_with_max (double g, double max_gain = 2.0);
|
LIBARDOUR_API double slider_position_to_gain_with_max (double g, double max_gain = 2.0);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ setup_enum_writer ()
|
||||||
MeterLineUp _MeterLineUp;
|
MeterLineUp _MeterLineUp;
|
||||||
InputMeterLayout _InputMeterLayout;
|
InputMeterLayout _InputMeterLayout;
|
||||||
EditMode _EditMode;
|
EditMode _EditMode;
|
||||||
|
RippleMode _RippleMode;
|
||||||
RegionPoint _RegionPoint;
|
RegionPoint _RegionPoint;
|
||||||
Placement _Placement;
|
Placement _Placement;
|
||||||
MonitorModel _MonitorModel;
|
MonitorModel _MonitorModel;
|
||||||
|
|
@ -304,9 +305,13 @@ setup_enum_writer ()
|
||||||
REGISTER_ENUM (LayoutAutomatic);
|
REGISTER_ENUM (LayoutAutomatic);
|
||||||
REGISTER (_InputMeterLayout);
|
REGISTER (_InputMeterLayout);
|
||||||
|
|
||||||
|
REGISTER_ENUM (RippleSelected);
|
||||||
|
REGISTER_ENUM (RippleAll); //enum had to be disambiguated from EditMode:RippleAll
|
||||||
|
REGISTER_ENUM (RippleInterview);
|
||||||
|
REGISTER (_RippleMode);
|
||||||
|
|
||||||
REGISTER_ENUM (Slide);
|
REGISTER_ENUM (Slide);
|
||||||
REGISTER_ENUM (Ripple);
|
REGISTER_ENUM (Ripple);
|
||||||
REGISTER_ENUM (RippleAll);
|
|
||||||
REGISTER_ENUM (Lock);
|
REGISTER_ENUM (Lock);
|
||||||
REGISTER (_EditMode);
|
REGISTER (_EditMode);
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -422,8 +422,6 @@ ARDOUR::string_to_edit_mode (string str)
|
||||||
return Slide;
|
return Slide;
|
||||||
} else if (str == _("Ripple")) {
|
} else if (str == _("Ripple")) {
|
||||||
return Ripple;
|
return Ripple;
|
||||||
} else if (str == _("Ripple All")) {
|
|
||||||
return RippleAll;
|
|
||||||
} else if (str == _("Lock")) {
|
} else if (str == _("Lock")) {
|
||||||
return Lock;
|
return Lock;
|
||||||
}
|
}
|
||||||
|
|
@ -442,15 +440,43 @@ ARDOUR::edit_mode_to_string (EditMode mode)
|
||||||
case Ripple:
|
case Ripple:
|
||||||
return _("Ripple");
|
return _("Ripple");
|
||||||
|
|
||||||
case RippleAll:
|
|
||||||
return _("Ripple All");
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case Slide:
|
case Slide:
|
||||||
return _("Slide");
|
return _("Slide");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RippleMode
|
||||||
|
ARDOUR::string_to_ripple_mode (string str)
|
||||||
|
{
|
||||||
|
if (str == _("RippleSelected")) {
|
||||||
|
return RippleSelected;
|
||||||
|
} else if (str == _("RippleAll")) {
|
||||||
|
return RippleAll;
|
||||||
|
} else if (str == _("RippleInterview")) {
|
||||||
|
return RippleInterview;
|
||||||
|
}
|
||||||
|
fatal << string_compose (_("programming error: unknown ripple mode string \"%1\""), str) << endmsg;
|
||||||
|
abort(); /*NOTREACHED*/
|
||||||
|
return RippleSelected;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char*
|
||||||
|
ARDOUR::ripple_mode_to_string (RippleMode mode)
|
||||||
|
{
|
||||||
|
switch (mode) {
|
||||||
|
case RippleInterview:
|
||||||
|
return _("RippleInterview");
|
||||||
|
|
||||||
|
case RippleAll:
|
||||||
|
return _("RippleAll");
|
||||||
|
|
||||||
|
default:
|
||||||
|
case RippleSelected:
|
||||||
|
return _("RippleSelected");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
ARDOUR::meter_falloff_to_float (MeterFalloff falloff)
|
ARDOUR::meter_falloff_to_float (MeterFalloff falloff)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue