From 0758ffe6d676deb44562ba91560e91c6a28d3758 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 14 Mar 2025 16:35:41 -0600 Subject: [PATCH] use the full passed-in parameter when dealing with velocity in a pianoroll The channel matters, and is present in the argument, so don't just pick zero as a stupid default --- gtk2_ardour/pianoroll_midi_view.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/pianoroll_midi_view.cc b/gtk2_ardour/pianoroll_midi_view.cc index 644148eca9..016ec4461a 100644 --- a/gtk2_ardour/pianoroll_midi_view.cc +++ b/gtk2_ardour/pianoroll_midi_view.cc @@ -397,13 +397,14 @@ PianorollMidiView::update_automation_display (Evoral::Parameter const & param, S if (param.type() == MidiVelocityAutomation) { - if (!velocity_display) { /* Create and add to automation display map */ + std::cerr << "Createing velocity_display\n"; + velocity_display = new PianorollVelocityDisplay (editing_context(), midi_context(), *this, *automation_group, 0x312244ff); - auto res = automation_map.insert (std::make_pair (Evoral::Parameter (ARDOUR::MidiVelocityAutomation, 0, 0), AutomationDisplayState (*velocity_display, false))); + auto res = automation_map.insert (std::make_pair (param, AutomationDisplayState (*velocity_display, false))); ads = &((*res.first).second);