Vapor: set surround-send level range to +/-20 dB
This commit is contained in:
parent
25397d7812
commit
73fea85381
@ -173,6 +173,7 @@ enum AutomationType {
|
||||
MonitoringAutomation,
|
||||
BusSendLevel,
|
||||
BusSendEnable,
|
||||
SurroundSendLevel,
|
||||
InsertReturnLevel,
|
||||
MainOutVolume,
|
||||
MidiVelocityAutomation,
|
||||
|
@ -53,7 +53,7 @@ value_as_string(const ARDOUR::ParameterDescriptor& desc,
|
||||
// Value is not a scale point, print it normally
|
||||
if (desc.unit == ARDOUR::ParameterDescriptor::MIDI_NOTE) {
|
||||
snprintf(buf, sizeof(buf), "%s", ParameterDescriptor::midi_note_name (rint(v)).c_str());
|
||||
} else if (desc.type == GainAutomation || desc.type == BusSendLevel || desc.type == TrimAutomation || desc.type == EnvelopeAutomation || desc.type == MainOutVolume || desc.type == InsertReturnLevel) {
|
||||
} else if (desc.type == GainAutomation || desc.type == BusSendLevel || desc.type == TrimAutomation || desc.type == EnvelopeAutomation || desc.type == MainOutVolume || desc.type == SurroundSendLevel || desc.type == InsertReturnLevel) {
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
if (v < GAIN_COEFF_SMALL) {
|
||||
snprintf(buf, sizeof(buf), "-inf dB");
|
||||
|
@ -196,6 +196,8 @@ Automatable::describe_parameter (Evoral::Parameter param)
|
||||
return _("Fader");
|
||||
} else if (param.type() == BusSendLevel) {
|
||||
return _("Send");
|
||||
} else if (param.type() == SurroundSendLevel) {
|
||||
return _("Send");
|
||||
} else if (param.type() == InsertReturnLevel) {
|
||||
return _("Return");
|
||||
} else if (param.type() == TrimAutomation) {
|
||||
@ -596,6 +598,8 @@ Automatable::control_factory(const Evoral::Parameter& param)
|
||||
control = new GainControl(_a_session, param);
|
||||
} else if (param.type() == BusSendLevel) {
|
||||
control = new GainControl(_a_session, param);
|
||||
} else if (param.type() == SurroundSendLevel) {
|
||||
control = new GainControl(_a_session, param);
|
||||
} else if (param.type() == PanSurroundX || param.type() == PanSurroundY || param.type() == PanSurroundZ || param.type() == PanSurroundSize || param.type() == PanSurroundSnap || param.type() == BinauralRenderMode) {
|
||||
assert (0);
|
||||
control = new SurroundControllable (_a_session, param.type(), *this);
|
||||
|
@ -158,6 +158,7 @@ AutomationList::create_curve_if_necessary()
|
||||
switch (_parameter.type()) {
|
||||
case GainAutomation:
|
||||
case BusSendLevel:
|
||||
case SurroundSendLevel:
|
||||
case InsertReturnLevel:
|
||||
case TrimAutomation:
|
||||
case PanAzimuthAutomation:
|
||||
@ -234,6 +235,7 @@ AutomationList::default_interpolation () const
|
||||
switch (_parameter.type()) {
|
||||
case GainAutomation:
|
||||
case BusSendLevel:
|
||||
case SurroundSendLevel:
|
||||
case InsertReturnLevel:
|
||||
case EnvelopeAutomation:
|
||||
return ControlList::Exponential;
|
||||
|
@ -207,6 +207,7 @@ setup_enum_writer ()
|
||||
REGISTER_ENUM (MonitoringAutomation);
|
||||
REGISTER_ENUM (BusSendLevel);
|
||||
REGISTER_ENUM (BusSendEnable);
|
||||
REGISTER_ENUM (SurroundSendLevel);
|
||||
REGISTER_ENUM (InsertReturnLevel);
|
||||
REGISTER_ENUM (MainOutVolume);
|
||||
REGISTER_ENUM (MidiVelocityAutomation);
|
||||
|
@ -132,6 +132,8 @@ EventTypeMap::from_symbol(const string& str) const
|
||||
p_type = GainAutomation;
|
||||
} else if (str == "send") {
|
||||
p_type = BusSendLevel;
|
||||
} else if (str == "surround-send") {
|
||||
p_type = SurroundSendLevel;
|
||||
} else if (str == "send-enable") {
|
||||
p_type = BusSendEnable;
|
||||
} else if (str == "return") {
|
||||
@ -260,6 +262,8 @@ EventTypeMap::to_symbol(const Evoral::Parameter& param) const
|
||||
return "send";
|
||||
} else if (t == BusSendEnable) {
|
||||
return "send-enable";
|
||||
} else if (t == SurroundSendLevel) {
|
||||
return "surround-send";
|
||||
} else if (t == InsertReturnLevel) {
|
||||
return "return";
|
||||
} else if (t == TrimAutomation) {
|
||||
|
@ -42,6 +42,8 @@ static std::string gain_control_name (Evoral::Parameter const& param)
|
||||
/* fallthrough */
|
||||
case BusSendLevel:
|
||||
/* fallthrough */
|
||||
case SurroundSendLevel:
|
||||
/* fallthrough */
|
||||
case InsertReturnLevel:
|
||||
return X_("gaincontrol");
|
||||
case TrimAutomation:
|
||||
@ -64,6 +66,8 @@ static std::shared_ptr<AutomationList> automation_list_new (Evoral::Parameter co
|
||||
/* fallthrough */
|
||||
case BusSendLevel:
|
||||
/* fallthrough */
|
||||
case SurroundSendLevel:
|
||||
/* fallthrough */
|
||||
case InsertReturnLevel:
|
||||
/* fallthrough */
|
||||
case TrimAutomation:
|
||||
|
@ -2394,6 +2394,7 @@ LuaBindings::common (lua_State* L)
|
||||
.beginNamespace ("AutomationType")
|
||||
.addConst ("GainAutomation", ARDOUR::AutomationType(GainAutomation))
|
||||
.addConst ("BusSendLevel", ARDOUR::AutomationType(BusSendLevel))
|
||||
.addConst ("SurroundSendLevel", ARDOUR::AutomationType(SurroundSendLevel))
|
||||
.addConst ("InsertReturnLevel", ARDOUR::AutomationType(InsertReturnLevel))
|
||||
.addConst ("PluginAutomation", ARDOUR::AutomationType(PluginAutomation))
|
||||
.addConst ("SoloAutomation", ARDOUR::AutomationType(SoloAutomation))
|
||||
|
@ -69,6 +69,8 @@ ParameterDescriptor::ParameterDescriptor(const Evoral::Parameter& parameter)
|
||||
normal = 1.f;
|
||||
toggled = true;
|
||||
break;
|
||||
case SurroundSendLevel:
|
||||
/* fallthrough */
|
||||
case TrimAutomation:
|
||||
upper = 10; // +20dB
|
||||
lower = .1; // -20dB
|
||||
@ -284,7 +286,7 @@ ParameterDescriptor::update_steps()
|
||||
if (unit == ParameterDescriptor::MIDI_NOTE) {
|
||||
step = smallstep = 1; // semitone
|
||||
largestep = 12; // octave
|
||||
} else if (type == GainAutomation || type == TrimAutomation || type == BusSendLevel || type == MainOutVolume || type == InsertReturnLevel) {
|
||||
} else if (type == GainAutomation || type == TrimAutomation || type == BusSendLevel || type == MainOutVolume || type == SurroundSendLevel || type == InsertReturnLevel) {
|
||||
/* dB_coeff_step gives a step normalized for [0, max_gain]. This is
|
||||
like "slider position", so we convert from "slider position" to gain
|
||||
to have the correct unit here. */
|
||||
@ -408,6 +410,8 @@ ParameterDescriptor::to_interface (float val, bool rotary) const
|
||||
case EnvelopeAutomation:
|
||||
val = gain_to_slider_position_with_max (val, upper);
|
||||
break;
|
||||
case SurroundSendLevel:
|
||||
/* fallthrough */
|
||||
case TrimAutomation:
|
||||
/* fallthrough */
|
||||
case MainOutVolume:
|
||||
@ -469,6 +473,7 @@ ParameterDescriptor::from_interface (float val, bool rotary) const
|
||||
case InsertReturnLevel:
|
||||
val = slider_position_to_gain_with_max (val, upper);
|
||||
break;
|
||||
case SurroundSendLevel:
|
||||
case TrimAutomation:
|
||||
{
|
||||
const float lower_db = accurate_coefficient_to_dB (lower);
|
||||
@ -529,6 +534,7 @@ ParameterDescriptor::is_linear () const
|
||||
case GainAutomation:
|
||||
case EnvelopeAutomation:
|
||||
case BusSendLevel:
|
||||
case SurroundSendLevel:
|
||||
case InsertReturnLevel:
|
||||
return false;
|
||||
default:
|
||||
|
@ -46,8 +46,8 @@ SurroundSend::SurroundSend (Session& s, std::shared_ptr<MuteMaster> mm)
|
||||
_send_delay.reset (new DelayLine (_session, "Send-" + name ()));
|
||||
_thru_delay.reset (new DelayLine (_session, "Thru-" + name ()));
|
||||
|
||||
std::shared_ptr<AutomationList> gl (new AutomationList (Evoral::Parameter (BusSendLevel), *this));
|
||||
_gain_control = std::shared_ptr<GainControl> (new GainControl (_session, Evoral::Parameter (BusSendLevel), gl));
|
||||
std::shared_ptr<AutomationList> gl (new AutomationList (Evoral::Parameter (SurroundSendLevel), *this));
|
||||
_gain_control = std::shared_ptr<GainControl> (new GainControl (_session, Evoral::Parameter (SurroundSendLevel), gl));
|
||||
_amp.reset (new Amp (_session, _("Surround"), _gain_control, false));
|
||||
_amp->activate ();
|
||||
|
||||
|
@ -715,6 +715,7 @@ Strip::format_parameter_for_display(
|
||||
case GainAutomation:
|
||||
case BusSendLevel:
|
||||
case TrimAutomation:
|
||||
case SurroundSendLevel:
|
||||
case InsertReturnLevel:
|
||||
// we can't use value_as_string() that'll suffix "dB" and also use "-inf" w/o space :(
|
||||
if (val == 0.0) {
|
||||
|
@ -223,6 +223,7 @@ Maschine2Knob::controllable_changed ()
|
||||
|
||||
case ARDOUR::GainAutomation:
|
||||
case ARDOUR::BusSendLevel:
|
||||
case ARDOUR::SurroundSendLevel:
|
||||
case ARDOUR::InsertReturnLevel:
|
||||
case ARDOUR::TrimAutomation:
|
||||
snprintf (buf, sizeof (buf), "%+4.1f dB", accurate_coefficient_to_dB (_controllable->get_value()));
|
||||
|
@ -326,6 +326,7 @@ Push2Knob::controllable_changed ()
|
||||
|
||||
case ARDOUR::GainAutomation:
|
||||
case ARDOUR::BusSendLevel:
|
||||
case ARDOUR::SurroundSendLevel:
|
||||
case ARDOUR::InsertReturnLevel:
|
||||
case ARDOUR::TrimAutomation:
|
||||
set_gain_text (_val);
|
||||
|
Loading…
Reference in New Issue
Block a user