summaryrefslogtreecommitdiff
path: root/libs/ardour/event_type_map.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-01-27 01:31:03 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-01-27 01:31:03 +0000
commit15b5fce90480490455237da917167b0bcb5ce946 (patch)
tree5c1c5929a83c05db1a901e775fefe4f6cf8dc1b7 /libs/ardour/event_type_map.cc
parent1385643131a2b2231bbbc0c584c76883fcfb580a (diff)
merge 3.0-panexp (pan experiments) branch, revisions 8534-8585 into 3.0, thus ending 3.0-panexp. THIS COMMIT WILL BREAK ALL EXISTING 3.0 SESSIONS IN SOME WAY (possibly not fatally).
git-svn-id: svn://localhost/ardour2/branches/3.0@8586 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/event_type_map.cc')
-rw-r--r--libs/ardour/event_type_map.cc43
1 files changed, 33 insertions, 10 deletions
diff --git a/libs/ardour/event_type_map.cc b/libs/ardour/event_type_map.cc
index d88e5afd26..c8c48c5b86 100644
--- a/libs/ardour/event_type_map.cc
+++ b/libs/ardour/event_type_map.cc
@@ -140,15 +140,25 @@ 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;
- break;
+ 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 PluginAutomation:
case SoloAutomation:
case MuteAutomation:
@@ -191,11 +201,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);
@@ -243,8 +258,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) {