13
0

trigger_ui: return the gain-spinner to MIDI clips; it adjusts velocity

This commit is contained in:
Ben Loftis 2022-02-02 11:47:50 -06:00
parent 0b395c161d
commit b250c69eb8

View File

@ -106,7 +106,6 @@ SlotPropertyTable::SlotPropertyTable ()
, _velocity_slider (&_velocity_adjustment, boost::shared_ptr<PBD::Controllable>(), 24/*length*/, 12/*girth*/ ) , _velocity_slider (&_velocity_adjustment, boost::shared_ptr<PBD::Controllable>(), 24/*length*/, 12/*girth*/ )
, _gain_adjustment( 0.0, -20.0, +20.0, 1.0, 3.0, 0) , _gain_adjustment( 0.0, -20.0, +20.0, 1.0, 3.0, 0)
, _gain_spinner (_gain_adjustment) , _gain_spinner (_gain_adjustment)
, _gain_label (_("Gain (dB):"))
, _follow_probability_adjustment(0,0,100,2,5) , _follow_probability_adjustment(0,0,100,2,5)
, _follow_probability_slider (&_follow_probability_adjustment, boost::shared_ptr<PBD::Controllable>(), 24/*length*/, 12/*girth*/ ) , _follow_probability_slider (&_follow_probability_adjustment, boost::shared_ptr<PBD::Controllable>(), 24/*length*/, 12/*girth*/ )
, _follow_count_adjustment (1, 1, 128, 1, 4) , _follow_count_adjustment (1, 1, 128, 1, 4)
@ -227,9 +226,6 @@ SlotPropertyTable::SlotPropertyTable ()
_name_frame.set_border_width (0); _name_frame.set_border_width (0);
_name_frame.set_padding (0); _name_frame.set_padding (0);
// _gain_label.set_alignment (1.0, 0.5);
// _color_label.set_alignment (1.0, 0.5);
_gain_spinner.set_can_focus(false); _gain_spinner.set_can_focus(false);
_gain_spinner.configure(_gain_adjustment, 0.0, 1); _gain_spinner.configure(_gain_adjustment, 0.0, 1);
_gain_spinner.signal_changed ().connect (sigc::mem_fun (*this, &SlotPropertyTable::gain_change_event)); _gain_spinner.signal_changed ().connect (sigc::mem_fun (*this, &SlotPropertyTable::gain_change_event));
@ -541,11 +537,9 @@ SlotPropertyTable::on_trigger_changed (PropertyChange const& pc)
} }
if (triggerbox().data_type () == DataType::AUDIO) { if (triggerbox().data_type () == DataType::AUDIO) {
_gain_spinner.show(); _gain_label.set_text(_("Gain (dB):"));
_gain_label.show();
} else { } else {
_gain_spinner.hide(); _gain_label.set_text(_("Velocity Adj:"));
_gain_label.hide();
} }
if (pc.contains (Properties::quantization)) { if (pc.contains (Properties::quantization)) {