X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fevent_type_map.cc;h=29a363c78b42952220af25b8b162ff5b59855a8a;hb=aa0effb4cb38f4c3a06564bd9e6a0ee516d4f958;hp=d88e5afd265a8c1693140dfbbd838e187207e92e;hpb=6e904b1e1600f4ccc0338d0b0864f7e02d417b13;p=ardour.git diff --git a/libs/ardour/event_type_map.cc b/libs/ardour/event_type_map.cc index d88e5afd26..29a363c78b 100644 --- a/libs/ardour/event_type_map.cc +++ b/libs/ardour/event_type_map.cc @@ -1,6 +1,6 @@ /* Copyright (C) 2008 Paul Davis - Author: Dave Robillard + Author: David Robillard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -140,24 +140,40 @@ EventTypeMap::new_parameter(uint32_t type, uint8_t channel, uint32_t id) const double min = 0.0f; double max = 1.0f; double normal = 0.0f; + switch((AutomationType)type) { case NullAutomation: case GainAutomation: max = 2.0f; normal = 1.0f; break; - case PanAutomation: - normal = 0.5f; + case PanAzimuthAutomation: + normal = 0.5f; // there really is no normal but this works for stereo, sort of + break; + case PanWidthAutomation: + min = -1.0; + max = 1.0; + normal = 0.0f; + break; + case PanElevationAutomation: + case PanFrontBackAutomation: + case PanLFEAutomation: + break; + case RecEnableAutomation: + /* default 0.0 - 1.0 is fine */ break; case PluginAutomation: - case SoloAutomation: - case MuteAutomation: case FadeInAutomation: case FadeOutAutomation: case EnvelopeAutomation: max = 2.0f; normal = 1.0f; break; + case SoloAutomation: + case MuteAutomation: + max = 1.0f; + normal = 0.0f; + break; case MidiCCAutomation: case MidiPgmChangeAutomation: case MidiChannelPressureAutomation: @@ -191,11 +207,16 @@ EventTypeMap::new_parameter(const string& str) const p_type = FadeOutAutomation; } else if (str == "envelope") { p_type = EnvelopeAutomation; - } else if (str == "pan") { - p_type = PanAutomation; - } else if (str.length() > 4 && str.substr(0, 4) == "pan-") { - p_type = PanAutomation; - p_id = atoi(str.c_str()+4); + } else if (str == "pan-azimuth") { + p_type = PanAzimuthAutomation; + } else if (str == "pan-width") { + p_type = PanWidthAutomation; + } else if (str == "pan-elevation") { + p_type = PanElevationAutomation; + } else if (str == "pan-frontback") { + p_type = PanFrontBackAutomation; + } else if (str == "pan-lfe") { + p_type = PanLFEAutomation; } else if (str.length() > 10 && str.substr(0, 10) == "parameter-") { p_type = PluginAutomation; p_id = atoi(str.c_str()+10); @@ -229,7 +250,7 @@ EventTypeMap::new_parameter(const string& str) const } else { PBD::warning << "Unknown Parameter '" << str << "'" << endmsg; } - + return new_parameter(p_type, p_channel, p_id); } @@ -243,8 +264,16 @@ EventTypeMap::to_symbol(const Evoral::Parameter& param) const if (t == GainAutomation) { return "gain"; - } else if (t == PanAutomation) { - return string_compose("pan-%1", param.id()); + } else if (t == PanAzimuthAutomation) { + return "pan-azimuth"; + } else if (t == PanElevationAutomation) { + return "pan-elevation"; + } else if (t == PanWidthAutomation) { + return "pan-width"; + } else if (t == PanFrontBackAutomation) { + return "pan-frontback"; + } else if (t == PanLFEAutomation) { + return "pan-lfe"; } else if (t == SoloAutomation) { return "solo"; } else if (t == MuteAutomation) {