-EventTypeMap::new_parameter(uint32_t type, uint8_t channel, uint32_t id) const
-{
- Evoral::Parameter p(type, channel, id);
-
- double min = 0.0f;
- double max = 1.0f;
- double normal = 0.0f;
- bool toggled = false;
-
- switch((AutomationType)type) {
- case NullAutomation:
- case GainAutomation:
- max = 2.0f;
- normal = 1.0f;
- 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 RecEnableAutomation:
- /* default 0.0 - 1.0 is fine */
- toggled = true;
- break;
- case PluginAutomation:
- case FadeInAutomation:
- case FadeOutAutomation:
- case EnvelopeAutomation:
- max = 2.0f;
- normal = 1.0f;
- break;
- case SoloAutomation:
- case MuteAutomation:
- max = 1.0f;
- normal = 0.0f;
- toggled = true;
- break;
- case MidiCCAutomation:
- case MidiPgmChangeAutomation:
- case MidiChannelPressureAutomation:
- Evoral::MIDI::controller_range(min, max, normal); break;
- case MidiPitchBenderAutomation:
- Evoral::MIDI::bender_range(min, max, normal); break;
- case MidiSystemExclusiveAutomation:
- return p;
- case PluginPropertyAutomation:
- return p;
- }
-
- p.set_range(type, min, max, normal, toggled);
- return p;
-}
-
-Evoral::Parameter
-EventTypeMap::new_parameter(const string& str) const