13
0

Vapor: prepare for additional meta-data

This commit is contained in:
Robin Gareus 2024-02-25 02:38:08 +01:00
parent c7eef61e78
commit 4bd2de2f72
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
10 changed files with 63 additions and 1 deletions

View File

@ -49,6 +49,9 @@ public:
std::shared_ptr<AutomationControl> pan_size;
std::shared_ptr<AutomationControl> pan_snap;
std::shared_ptr<AutomationControl> binaural_render_mode;
std::shared_ptr<AutomationControl> sur_elevation_enable;
std::shared_ptr<AutomationControl> sur_zones;
std::shared_ptr<AutomationControl> sur_ramp;
void set_automation_state (AutoState);
AutoState automation_state() const { return _auto_state; }

View File

@ -182,6 +182,9 @@ enum AutomationType {
PanSurroundSize,
PanSurroundSnap,
BinauralRenderMode,
PanSurroundElevationEnable,
PanSurroundZones,
PanSurroundRamp,
/* used only by Controllable Descriptor to access send parameters */

View File

@ -108,6 +108,9 @@ public:
uint32_t surr_PosZ;
uint32_t surr_Size;
uint32_t surr_Snap;
uint32_t surr_ElevEn;
uint32_t surr_Zones;
uint32_t surr_Ramp;
uint32_t surr_Settings;
uint32_t surr_BinauralRenderMode;
uint32_t surr_ChannelCount;

View File

@ -222,6 +222,12 @@ Automatable::describe_parameter (Evoral::Parameter param)
return _("Snap to Speaker");
} else if (param.type() == BinauralRenderMode) {
return _("Binaural Render mode");
} else if (param.type() == PanSurroundElevationEnable) {
return X_("hidden");
} else if (param.type() == PanSurroundZones) {
return X_("hidden");
} else if (param.type() == PanSurroundRamp) {
return X_("hidden");
} else if (param.type() == PhaseAutomation) {
return _("Polarity Invert");
} else if (param.type() == MidiVelocityAutomation) {

View File

@ -216,6 +216,9 @@ setup_enum_writer ()
REGISTER_ENUM (PanSurroundSize);
REGISTER_ENUM (PanSurroundSnap);
REGISTER_ENUM (BinauralRenderMode);
REGISTER_ENUM (PanSurroundElevationEnable);
REGISTER_ENUM (PanSurroundZones);
REGISTER_ENUM (PanSurroundRamp);
REGISTER (_AutomationType);
REGISTER_ENUM (Off);

View File

@ -132,6 +132,8 @@ EventTypeMap::from_symbol(const string& str) const
p_type = GainAutomation;
} else if (str == "send") {
p_type = BusSendLevel;
} else if (str == "send-enable") {
p_type = BusSendEnable;
} else if (str == "return") {
p_type = InsertReturnLevel;
} else if (str == "trim") {
@ -256,6 +258,8 @@ EventTypeMap::to_symbol(const Evoral::Parameter& param) const
return "gain";
} else if (t == BusSendLevel) {
return "send";
} else if (t == BusSendEnable) {
return "send-enable";
} else if (t == InsertReturnLevel) {
return "return";
} else if (t == TrimAutomation) {
@ -284,6 +288,12 @@ EventTypeMap::to_symbol(const Evoral::Parameter& param) const
return std::string("pan-sur-snap-") + PBD::to_string(param.id());
} else if (t == BinauralRenderMode) {
return std::string("binaural-render-mode-") + PBD::to_string(param.id());
} else if (t == PanSurroundElevationEnable) {
return std::string("binaural-render-mode-") + PBD::to_string(param.id());
} else if (t == PanSurroundZones) {
return std::string("surround-zones-") + PBD::to_string(param.id());
} else if (t == PanSurroundRamp) {
return std::string("surround--ramp-") + PBD::to_string(param.id());
} else if (t == SoloAutomation) {
return "solo";
} else if (t == MuteAutomation) {
@ -328,7 +338,7 @@ EventTypeMap::to_symbol(const Evoral::Parameter& param) const
} else if (t == MidiVelocityAutomation) {
return "midi-velocity";
} else {
PBD::warning << "Uninitialized Parameter symbol() called." << endmsg;
PBD::warning << "Uninitialized Parameter symbol(" << t << ") called." << endmsg;
return "";
}
}

View File

@ -1905,6 +1905,9 @@ LuaBindings::common (lua_State* L)
.addData ("pan_size", &SurroundPannable::pan_size)
.addData ("pan_snap", &SurroundPannable::pan_snap)
.addData ("binaural_render_mode", &SurroundPannable::binaural_render_mode)
.addData ("sur_elevation_enable", &SurroundPannable::sur_elevation_enable)
.addData ("sur_zones", &SurroundPannable::sur_zones)
.addData ("sur_ramp", &SurroundPannable::sur_ramp)
.endClass ()
.deriveWSPtrClass <SurroundSend, Processor> ("SurroundSend")

View File

@ -126,7 +126,26 @@ ParameterDescriptor::ParameterDescriptor(const Evoral::Parameter& parameter)
scale_points->insert (std::make_pair (_("Near"), 2));
scale_points->insert (std::make_pair (_("Far"), 3));
break;
case PanSurroundZones:
enumeration = true;
integer_step = true;
upper = 5.0f;
normal = 0.0f;
scale_points = std::shared_ptr<ScalePoints>(new ScalePoints());
scale_points->insert (std::make_pair (_("All"), 0));
scale_points->insert (std::make_pair (_("No Back"), 1));
scale_points->insert (std::make_pair (_("No Sides"), 2));
scale_points->insert (std::make_pair (_("Center Back"), 3));
scale_points->insert (std::make_pair (_("Screen Only"), 4));
scale_points->insert (std::make_pair (_("Surround Only"), 5));
break;
case PanSurroundElevationEnable:
upper = 1.0f;
normal = 1.0f;
toggled = true;
break;
case PanSurroundSnap:
case PanSurroundRamp:
case SoloAutomation:
case MuteAutomation:
upper = 1.0f;

View File

@ -70,6 +70,9 @@ SurroundPannable::SurroundPannable (Session& s, uint32_t chn, Temporal::TimeDoma
, pan_size (new SurroundControllable (s, Evoral::Parameter (PanSurroundSize, 0, chn), tdp))
, pan_snap (new SurroundControllable (s, Evoral::Parameter (PanSurroundSnap, 0, chn), tdp))
, binaural_render_mode (new SurroundControllable (s, Evoral::Parameter (BinauralRenderMode, 0, chn), tdp))
, sur_elevation_enable (new SurroundControllable (s, Evoral::Parameter (PanSurroundElevationEnable, 0, chn), tdp))
, sur_zones (new SurroundControllable (s, Evoral::Parameter (PanSurroundZones, 0, chn), tdp))
, sur_ramp (new SurroundControllable (s, Evoral::Parameter (PanSurroundRamp, 0, chn), tdp))
, _auto_state (Off)
, _responding_to_control_auto_state_change (0)
{
@ -81,6 +84,9 @@ SurroundPannable::SurroundPannable (Session& s, uint32_t chn, Temporal::TimeDoma
add_control (pan_size);
add_control (pan_snap);
add_control (binaural_render_mode); // not automatable
add_control (sur_elevation_enable); // hidden, volatile
add_control (sur_zones); // hidden, volatile
add_control (sur_ramp); // hidden, volatile
/* all controls change state together */
pan_pos_x->alist()->automation_state_changed.connect_same_thread (*this, boost::bind (&SurroundPannable::control_auto_state_changed, this, _1));
@ -144,6 +150,9 @@ SurroundPannable::foreach_pan_control (boost::function<void(std::shared_ptr<Auto
f (pan_pos_z);
f (pan_size);
f (pan_snap);
f (sur_elevation_enable);
f (sur_zones);
f (sur_ramp);
}
void

View File

@ -84,6 +84,9 @@ URIMap::URIDs::init(URIMap& uri_map)
surr_PosZ = uri_map.uri_to_id("urn:ardour:a-vapor#PosZ");
surr_Size = uri_map.uri_to_id("urn:ardour:a-vapor#Size");
surr_Snap = uri_map.uri_to_id("urn:ardour:a-vapor#Snap");
surr_ElevEn = uri_map.uri_to_id("urn:ardour:a-vapor#ElevationEnable");
surr_Zones = uri_map.uri_to_id("urn:ardour:a-vapor#Zones");
surr_Ramp = uri_map.uri_to_id("urn:ardour:a-vapor#Ramp");
surr_Settings = uri_map.uri_to_id("urn:ardour:a-vapor#Settings");
surr_BinauralRenderMode = uri_map.uri_to_id("urn:ardour:a-vapor#BinauralRenderMode");