Improve default parameter display

This commit is contained in:
Robin Gareus 2017-06-23 15:51:17 +02:00
parent 5aad9d9a33
commit d34fdb98e3
2 changed files with 11 additions and 0 deletions

View File

@ -56,6 +56,8 @@ value_as_string(const ARDOUR::ParameterDescriptor& desc,
snprintf(buf, sizeof(buf), "%s", ParameterDescriptor::midi_note_name (rint(v)).c_str());
} else if (desc.type == GainAutomation || desc.type == TrimAutomation || desc.type == EnvelopeAutomation) {
snprintf(buf, sizeof(buf), "%.1f dB", accurate_coefficient_to_dB (v));
} else if (desc.type == PanWidthAutomation) {
snprintf (buf, sizeof (buf), "%d%%", (int) floor (100.0 * v));
} else if (!desc.print_fmt.empty()) {
snprintf(buf, sizeof(buf), desc.print_fmt.c_str(), v);
} else if (desc.integer_step) {

View File

@ -100,20 +100,29 @@ ParameterDescriptor::ParameterDescriptor(const Evoral::Parameter& parameter)
lower = 0.0;
normal = 0.0;
upper = 127.0;
print_fmt = "%.0f";
break;
case MidiPitchBenderAutomation:
lower = 0.0;
normal = 8192.0;
upper = 16383.0;
print_fmt = "%.0f";
break;
case PhaseAutomation:
toggled = true;
scale_points = boost::shared_ptr<ScalePoints>(new ScalePoints());
scale_points->insert (std::make_pair (_("Normal"), 0));
scale_points->insert (std::make_pair (_("Invert"), 1));
break;
case MonitoringAutomation:
enumeration = true;
integer_step = true;
lower = MonitorAuto;
upper = MonitorDisk; /* XXX bump when we add MonitorCue */
scale_points = boost::shared_ptr<ScalePoints>(new ScalePoints());
scale_points->insert (std::make_pair (_("Auto"), MonitorAuto));
scale_points->insert (std::make_pair (_("Input"), MonitorInput));
scale_points->insert (std::make_pair (_("Disk"), MonitorDisk));
break;
case SoloIsolateAutomation:
case SoloSafeAutomation: