From e3ab5849d74a02fbf9329cae7f6c2d43566ee0df Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 7 Jan 2025 11:37:46 -0700 Subject: [PATCH] pianoroll renaming --- gtk2_ardour/midi_cue_view.cc | 4 ++-- ...{midi_cue_velocity.cc => pianoroll_velocity.cc} | 14 +++++++------- .../{midi_cue_velocity.h => pianoroll_velocity.h} | 10 +++++----- gtk2_ardour/wscript | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) rename gtk2_ardour/{midi_cue_velocity.cc => pianoroll_velocity.cc} (78%) rename gtk2_ardour/{midi_cue_velocity.h => pianoroll_velocity.h} (77%) diff --git a/gtk2_ardour/midi_cue_view.cc b/gtk2_ardour/midi_cue_view.cc index fbf2a31b0b..6a802e62e3 100644 --- a/gtk2_ardour/midi_cue_view.cc +++ b/gtk2_ardour/midi_cue_view.cc @@ -35,7 +35,7 @@ #include "mergeable_line.h" #include "midi_cue_automation_line.h" #include "midi_cue_view.h" -#include "midi_cue_velocity.h" +#include "pianoroll_velocity.h" #include "note.h" #include "ui_config.h" #include "velocity_display.h" @@ -345,7 +345,7 @@ MidiCueView::update_automation_display (Evoral::Parameter const & param, Selecti /* Create and add to automation display map */ - velocity_display = new MidiCueVelocityDisplay (editing_context(), midi_context(), *this, *automation_group, 0x312244ff); + 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, true))); ads = &((*res.first).second); diff --git a/gtk2_ardour/midi_cue_velocity.cc b/gtk2_ardour/pianoroll_velocity.cc similarity index 78% rename from gtk2_ardour/midi_cue_velocity.cc rename to gtk2_ardour/pianoroll_velocity.cc index 8d8d978bfc..8e2814938d 100644 --- a/gtk2_ardour/midi_cue_velocity.cc +++ b/gtk2_ardour/pianoroll_velocity.cc @@ -20,24 +20,24 @@ #include "canvas/debug.h" #include "editing_context.h" -#include "midi_cue_velocity.h" +#include "pianoroll_velocity.h" #include "note_base.h" #include "ui_config.h" -MidiCueVelocityDisplay::MidiCueVelocityDisplay (EditingContext& ec, MidiViewBackground& background, MidiView& mv, ArdourCanvas::Rectangle& base_rect, Gtkmm2ext::Color oc) +PianorollVelocityDisplay::PianorollVelocityDisplay (EditingContext& ec, MidiViewBackground& background, MidiView& mv, ArdourCanvas::Rectangle& base_rect, Gtkmm2ext::Color oc) : VelocityDisplay (ec, background, mv, base_rect, *(_note_group = new ArdourCanvas::Container (&base_rect)), events, oc) { CANVAS_DEBUG_NAME (_note_group, "cue velocity lolli container"); } void -MidiCueVelocityDisplay::set_height (double h) +PianorollVelocityDisplay::set_height (double h) { redisplay (); } void -MidiCueVelocityDisplay::set_colors () +PianorollVelocityDisplay::set_colors () { base.set_fill_color (UIConfiguration::instance().color_mod ("ghost track base", "ghost track midi fill")); @@ -47,7 +47,7 @@ MidiCueVelocityDisplay::set_colors () } void -MidiCueVelocityDisplay::remove_note (NoteBase* nb) +PianorollVelocityDisplay::remove_note (NoteBase* nb) { GhostEvent::EventList::iterator f = events.find (nb->note()); if (f == events.end()) { @@ -61,13 +61,13 @@ MidiCueVelocityDisplay::remove_note (NoteBase* nb) } bool -MidiCueVelocityDisplay::base_event (GdkEvent* ev) +PianorollVelocityDisplay::base_event (GdkEvent* ev) { return editing_context.canvas_velocity_base_event (ev, &base); } bool -MidiCueVelocityDisplay::lollevent (GdkEvent* ev, GhostEvent* gev) +PianorollVelocityDisplay::lollevent (GdkEvent* ev, GhostEvent* gev) { return editing_context.canvas_velocity_event (ev, gev->item); } diff --git a/gtk2_ardour/midi_cue_velocity.h b/gtk2_ardour/pianoroll_velocity.h similarity index 77% rename from gtk2_ardour/midi_cue_velocity.h rename to gtk2_ardour/pianoroll_velocity.h index 8bb6b82b9b..6934737d10 100644 --- a/gtk2_ardour/midi_cue_velocity.h +++ b/gtk2_ardour/pianoroll_velocity.h @@ -16,16 +16,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __gtk2_ardour_midi_cue_velocity_h__ -#define __gtk2_ardour_midi_cue_velocity_h__ +#ifndef __gtk2_ardour_pianoroll_velocity.h__ +#define __gtk2_ardour_pianoroll_velocity.h__ #include "ghost_event.h" #include "velocity_display.h" -class MidiCueVelocityDisplay : public VelocityDisplay +class PianorollVelocityDisplay : public VelocityDisplay { public: - MidiCueVelocityDisplay (EditingContext&, MidiViewBackground&, MidiView&, ArdourCanvas::Rectangle& base_rect, Gtkmm2ext::Color oc); + PianorollVelocityDisplay (EditingContext&, MidiViewBackground&, MidiView&, ArdourCanvas::Rectangle& base_rect, Gtkmm2ext::Color oc); void remove_note (NoteBase*); void set_colors (); @@ -40,4 +40,4 @@ class MidiCueVelocityDisplay : public VelocityDisplay bool lollevent (GdkEvent*, GhostEvent*); }; -#endif /* __gtk2_ardour_midi_cue_velocity_h__ */ +#endif /* __gtk2_ardour_pianoroll_velocity.h__ */ diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 5b6426b8b7..639d1410ce 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -160,7 +160,6 @@ gtk2_ardour_sources = [ 'midi_channel_selector.cc', 'midi_cue_automation_line.cc', 'midi_cue_background.cc', - 'midi_cue_velocity.cc', 'midi_cue_view.cc', 'midi_cut_buffer.cc', 'midi_export_dialog.cc', @@ -210,6 +209,7 @@ gtk2_ardour_sources = [ 'piano_key_bindings.cc', 'piano_roll_header.cc', 'pianoroll.cc', + 'pianoroll_velocity.cc', 'pingback.cc', 'playlist_selector.cc', 'plugin_display.cc',