Improve default parameter display
authorRobin Gareus <robin@gareus.org>
Fri, 23 Jun 2017 13:51:17 +0000 (15:51 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 23 Jun 2017 15:39:20 +0000 (17:39 +0200)
libs/ardour/ardour/value_as_string.h
libs/ardour/parameter_descriptor.cc

index 2a973f374e1f0d9ca83cd8e898a59bc224a5c940..dd5780580bf393bbf5e64928ad474bd1773dd46e 100644 (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) {
index 310ec1a4832c0346a95c76237756c38483e16847..740997e725788620c24c3dc32062160cb20106c0 100644 (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: