From 56647acc25aa91ccf920e5ac21452bccf35b78e7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 8 Aug 2025 15:03:41 -0600 Subject: [PATCH] add local tempo scope calls to CueEditor, PianoRoll and AudioClipEditor --- gtk2_ardour/audio_clip_editor.cc | 56 ++++++++++ gtk2_ardour/cue_editor.cc | 158 ++++++++++++++++++++++++++++ gtk2_ardour/pianoroll.cc | 174 +++++++++++++++++++++++++++++++ 3 files changed, 388 insertions(+) diff --git a/gtk2_ardour/audio_clip_editor.cc b/gtk2_ardour/audio_clip_editor.cc index 321f04800c..e6913305ca 100644 --- a/gtk2_ardour/audio_clip_editor.cc +++ b/gtk2_ardour/audio_clip_editor.cc @@ -123,6 +123,8 @@ AudioClipEditor::AudioClipEditor (std::string const & name, bool with_transport) void AudioClipEditor::load_shared_bindings () { + EC_LOCAL_TEMPO_SCOPE; + /* Full shared binding loading must have preceded this in some other EditingContext */ assert (!need_shared_actions); @@ -144,6 +146,8 @@ AudioClipEditor::load_shared_bindings () void AudioClipEditor::pack_inner (Gtk::Box& box) { + EC_LOCAL_TEMPO_SCOPE; + box.pack_start (snap_box, false, false); box.pack_start (grid_box, false, false); } @@ -151,6 +155,8 @@ AudioClipEditor::pack_inner (Gtk::Box& box) void AudioClipEditor::pack_outer (Gtk::Box& box) { + EC_LOCAL_TEMPO_SCOPE; + if (with_transport_controls) { box.pack_start (play_box, false, false); } @@ -162,12 +168,16 @@ AudioClipEditor::pack_outer (Gtk::Box& box) void AudioClipEditor::build_lower_toolbar () { + EC_LOCAL_TEMPO_SCOPE; + _toolbox.pack_start (*_canvas_hscrollbar, false, false); } void AudioClipEditor::build_canvas () { + EC_LOCAL_TEMPO_SCOPE; + _canvas.set_background_color (UIConfiguration::instance().color ("arrange base")); _canvas.signal_event().connect (sigc::mem_fun (*this, &CueEditor::canvas_pre_event), false); _canvas.use_nsglview (UIConfiguration::instance().get_nsgl_view_mode () == NSGLHiRes); @@ -270,6 +280,8 @@ AudioClipEditor::build_canvas () AudioClipEditor::~AudioClipEditor () { + EC_LOCAL_TEMPO_SCOPE; + drop_waves (); delete clip_metric; } @@ -277,6 +289,8 @@ AudioClipEditor::~AudioClipEditor () bool AudioClipEditor::line_event_handler (GdkEvent* ev, ArdourCanvas::Line* l) { + EC_LOCAL_TEMPO_SCOPE; + std::cerr << "event type " << Gtkmm2ext::event_type_string (ev->type) << " on line " << std::endl; switch (ev->type) { @@ -313,12 +327,16 @@ AudioClipEditor::line_event_handler (GdkEvent* ev, ArdourCanvas::Line* l) bool AudioClipEditor::key_press (GdkEventKey* ev) { + EC_LOCAL_TEMPO_SCOPE; + return false; } void AudioClipEditor::position_lines () { + EC_LOCAL_TEMPO_SCOPE; + if (!_region) { return; } @@ -358,6 +376,8 @@ AudioClipEditor::LineDrag::motion (GdkEventMotion* ev) void AudioClipEditor::set_colors () { + EC_LOCAL_TEMPO_SCOPE; + _canvas.set_background_color (UIConfiguration::instance ().color (X_("theme:bg"))); start_line->set_outline_color (UIConfiguration::instance ().color (X_("theme:contrasting clock"))); @@ -370,6 +390,8 @@ AudioClipEditor::set_colors () void AudioClipEditor::drop_waves () { + EC_LOCAL_TEMPO_SCOPE; + for (auto& wave : waves) { delete wave; } @@ -380,6 +402,8 @@ AudioClipEditor::drop_waves () void AudioClipEditor::set_trigger (TriggerReference& tr) { + EC_LOCAL_TEMPO_SCOPE; + if (tr == ref) { return; } @@ -394,6 +418,8 @@ AudioClipEditor::set_trigger (TriggerReference& tr) void AudioClipEditor::set_region (std::shared_ptr region) { + EC_LOCAL_TEMPO_SCOPE; + CueEditor::set_region (region); if (_visible_pending_region) { @@ -470,6 +496,8 @@ AudioClipEditor::set_region (std::shared_ptr region) void AudioClipEditor::canvas_allocate (Gtk::Allocation& alloc) { + EC_LOCAL_TEMPO_SCOPE; + _canvas.size_allocate (alloc); _visible_canvas_width = alloc.get_width(); @@ -496,6 +524,8 @@ AudioClipEditor::canvas_allocate (Gtk::Allocation& alloc) void AudioClipEditor::set_spp_from_length (samplecnt_t len) { + EC_LOCAL_TEMPO_SCOPE; + if (_visible_canvas_width) { set_samples_per_pixel (floor (len / _visible_canvas_width)); } @@ -504,6 +534,8 @@ AudioClipEditor::set_spp_from_length (samplecnt_t len) void AudioClipEditor::set_wave_heights () { + EC_LOCAL_TEMPO_SCOPE; + if (waves.empty ()) { return; } @@ -522,6 +554,8 @@ AudioClipEditor::set_wave_heights () void AudioClipEditor::set_waveform_colors () { + EC_LOCAL_TEMPO_SCOPE; + Gtkmm2ext::Color clip = UIConfiguration::instance ().color ("clipped waveform"); Gtkmm2ext::Color zero = UIConfiguration::instance ().color ("zero line"); Gtkmm2ext::Color fill = UIConfiguration::instance ().color ("waveform fill"); @@ -538,17 +572,23 @@ AudioClipEditor::set_waveform_colors () Gtk::Widget& AudioClipEditor::contents () { + EC_LOCAL_TEMPO_SCOPE; + return _contents; } void AudioClipEditor::region_changed (const PBD::PropertyChange& what_changed) { + EC_LOCAL_TEMPO_SCOPE; + } void AudioClipEditor::set_samples_per_pixel (samplecnt_t spp) { + EC_LOCAL_TEMPO_SCOPE; + CueEditor::set_samples_per_pixel (spp); clip_metric->units_per_pixel = samples_per_pixel; @@ -568,12 +608,16 @@ AudioClipEditor::set_samples_per_pixel (samplecnt_t spp) samplecnt_t AudioClipEditor::current_page_samples() const { + EC_LOCAL_TEMPO_SCOPE; + return (samplecnt_t) _track_canvas_width * samples_per_pixel; } bool AudioClipEditor::canvas_enter_leave (GdkEventCrossing* ev) { + EC_LOCAL_TEMPO_SCOPE; + switch (ev->type) { case GDK_ENTER_NOTIFY: if (ev->detail != GDK_NOTIFY_INFERIOR) { @@ -598,26 +642,36 @@ AudioClipEditor::canvas_enter_leave (GdkEventCrossing* ev) void AudioClipEditor::begin_write () { + EC_LOCAL_TEMPO_SCOPE; + } void AudioClipEditor::end_write () { + EC_LOCAL_TEMPO_SCOPE; + } void AudioClipEditor::show_count_in (std::string const &) { + EC_LOCAL_TEMPO_SCOPE; + } void AudioClipEditor::hide_count_in () { + EC_LOCAL_TEMPO_SCOPE; + } void AudioClipEditor::maybe_update () { + EC_LOCAL_TEMPO_SCOPE; + ARDOUR::TriggerPtr playing_trigger; if (ref.trigger()) { @@ -675,6 +729,8 @@ AudioClipEditor::maybe_update () void AudioClipEditor::unset (bool trigger_too) { + EC_LOCAL_TEMPO_SCOPE; + drop_waves (); CueEditor::unset (trigger_too); } diff --git a/gtk2_ardour/cue_editor.cc b/gtk2_ardour/cue_editor.cc index 1f4b682cdc..4c731a5767 100644 --- a/gtk2_ardour/cue_editor.cc +++ b/gtk2_ardour/cue_editor.cc @@ -71,11 +71,15 @@ CueEditor::~CueEditor () void CueEditor::set_snapped_cursor_position (Temporal::timepos_t const & pos) { + EC_LOCAL_TEMPO_SCOPE; + } std::vector CueEditor::filter_to_unique_midi_region_views (RegionSelection const & ms) const { + EC_LOCAL_TEMPO_SCOPE; + std::vector mrv; return mrv; } @@ -83,17 +87,23 @@ CueEditor::filter_to_unique_midi_region_views (RegionSelection const & ms) const void CueEditor::get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) const { + EC_LOCAL_TEMPO_SCOPE; + } StripableTimeAxisView* CueEditor::get_stripable_time_axis_by_id (const PBD::ID& id) const { + EC_LOCAL_TEMPO_SCOPE; + return nullptr; } TrackViewList CueEditor::axis_views_from_routes (std::shared_ptr) const { + EC_LOCAL_TEMPO_SCOPE; + TrackViewList tvl; return tvl; } @@ -101,42 +111,56 @@ CueEditor::axis_views_from_routes (std::shared_ptr) const ARDOUR::Location* CueEditor::find_location_from_marker (ArdourMarker*, bool&) const { + EC_LOCAL_TEMPO_SCOPE; + return nullptr; } ArdourMarker* CueEditor::find_marker_from_location_id (PBD::ID const&, bool) const { + EC_LOCAL_TEMPO_SCOPE; + return nullptr; } TempoMarker* CueEditor::find_marker_for_tempo (Temporal::TempoPoint const &) { + EC_LOCAL_TEMPO_SCOPE; + return nullptr; } MeterMarker* CueEditor::find_marker_for_meter (Temporal::MeterPoint const &) { + EC_LOCAL_TEMPO_SCOPE; + return nullptr; } void CueEditor::redisplay_grid (bool immediate_redraw) { + EC_LOCAL_TEMPO_SCOPE; + update_grid (); } Temporal::timecnt_t CueEditor::get_nudge_distance (Temporal::timepos_t const & pos, Temporal::timecnt_t& next) const { + EC_LOCAL_TEMPO_SCOPE; + return Temporal::timecnt_t (Temporal::AudioTime); } void CueEditor::instant_save() { + EC_LOCAL_TEMPO_SCOPE; + if (!_region) { return; } @@ -158,42 +182,58 @@ CueEditor::instant_save() void CueEditor::begin_selection_op_history () { + EC_LOCAL_TEMPO_SCOPE; + } void CueEditor::begin_reversible_selection_op (std::string cmd_name) { + EC_LOCAL_TEMPO_SCOPE; + } void CueEditor::commit_reversible_selection_op () { + EC_LOCAL_TEMPO_SCOPE; + } void CueEditor::abort_reversible_selection_op () { + EC_LOCAL_TEMPO_SCOPE; + } void CueEditor::undo_selection_op () { + EC_LOCAL_TEMPO_SCOPE; + } void CueEditor::redo_selection_op () { + EC_LOCAL_TEMPO_SCOPE; + } double CueEditor::get_y_origin () const { + EC_LOCAL_TEMPO_SCOPE; + return 0.; } void CueEditor::set_zoom_focus (Editing::ZoomFocus zf) { + EC_LOCAL_TEMPO_SCOPE; + using namespace Editing; /* We don't allow playhead for zoom focus here */ @@ -208,6 +248,8 @@ CueEditor::set_zoom_focus (Editing::ZoomFocus zf) void CueEditor::set_samples_per_pixel (samplecnt_t n) { + EC_LOCAL_TEMPO_SCOPE; + samples_per_pixel = n; ZoomChanged(); /* EMIT SIGNAL */ } @@ -215,12 +257,16 @@ CueEditor::set_samples_per_pixel (samplecnt_t n) samplecnt_t CueEditor::get_current_zoom () const { + EC_LOCAL_TEMPO_SCOPE; + return samples_per_pixel; } void CueEditor::reposition_and_zoom (samplepos_t pos, double spp) { + EC_LOCAL_TEMPO_SCOPE; + pending_visual_change.add (VisualChange::ZoomLevel); pending_visual_change.samples_per_pixel = spp; @@ -233,22 +279,30 @@ CueEditor::reposition_and_zoom (samplepos_t pos, double spp) void CueEditor::set_mouse_mode (Editing::MouseMode, bool force) { + EC_LOCAL_TEMPO_SCOPE; + } void CueEditor::step_mouse_mode (bool next) { + EC_LOCAL_TEMPO_SCOPE; + } Gdk::Cursor* CueEditor::get_canvas_cursor () const { + EC_LOCAL_TEMPO_SCOPE; + return nullptr; } std::shared_ptr CueEditor::start_local_tempo_map (std::shared_ptr map) { + EC_LOCAL_TEMPO_SCOPE; + std::shared_ptr tmp = Temporal::TempoMap::use(); Temporal::TempoMap::set (map); return tmp; @@ -257,12 +311,16 @@ CueEditor::start_local_tempo_map (std::shared_ptr map) void CueEditor::end_local_tempo_map (std::shared_ptr map) { + EC_LOCAL_TEMPO_SCOPE; + Temporal::TempoMap::set (map); } void CueEditor::do_undo (uint32_t n) { + EC_LOCAL_TEMPO_SCOPE; + if (_drags->active ()) { _drags->abort (); } @@ -273,6 +331,8 @@ CueEditor::do_undo (uint32_t n) void CueEditor::do_redo (uint32_t n) { + EC_LOCAL_TEMPO_SCOPE; + if (_drags->active ()) { _drags->abort (); } @@ -283,12 +343,16 @@ CueEditor::do_redo (uint32_t n) void CueEditor::history_changed () { + EC_LOCAL_TEMPO_SCOPE; + update_undo_redo_actions (_history); } Temporal::timepos_t CueEditor::_get_preferred_edit_position (Editing::EditIgnoreOption ignore, bool from_context_menu, bool from_outside_canvas) { + EC_LOCAL_TEMPO_SCOPE; + samplepos_t where; bool in_track_canvas = false; @@ -302,6 +366,8 @@ CueEditor::_get_preferred_edit_position (Editing::EditIgnoreOption ignore, bool void CueEditor::build_upper_toolbar () { + EC_LOCAL_TEMPO_SCOPE; + using namespace Gtk::Menu_Helpers; Gtk::HBox* mode_box = manage(new Gtk::HBox); @@ -423,6 +489,8 @@ CueEditor::build_upper_toolbar () void CueEditor::build_zoom_focus_menu () { + EC_LOCAL_TEMPO_SCOPE; + using namespace Gtk::Menu_Helpers; using namespace Editing; @@ -436,6 +504,8 @@ CueEditor::build_zoom_focus_menu () bool CueEditor::bang_button_press (GdkEventButton* ev) { + EC_LOCAL_TEMPO_SCOPE; + if (!ref.trigger()) { return true; } @@ -448,6 +518,8 @@ CueEditor::bang_button_press (GdkEventButton* ev) bool CueEditor::play_button_press (GdkEventButton* ev) { + EC_LOCAL_TEMPO_SCOPE; + if (_session && _region) { _session->request_locate (_region->position().samples()); _session->request_roll (); @@ -459,6 +531,8 @@ CueEditor::play_button_press (GdkEventButton* ev) bool CueEditor::loop_button_press (GdkEventButton* ev) { + EC_LOCAL_TEMPO_SCOPE; + if (!_region) { return true; } @@ -476,6 +550,8 @@ CueEditor::loop_button_press (GdkEventButton* ev) bool CueEditor::solo_button_press (GdkEventButton* ev) { + EC_LOCAL_TEMPO_SCOPE; + if (!_track) { return true; } @@ -488,6 +564,8 @@ CueEditor::solo_button_press (GdkEventButton* ev) bool CueEditor::rec_button_press (GdkEventButton* ev) { + EC_LOCAL_TEMPO_SCOPE; + if (ev->button != 1) { return false; } @@ -510,6 +588,8 @@ CueEditor::rec_button_press (GdkEventButton* ev) void CueEditor::blink_rec_enable (bool onoff) { + EC_LOCAL_TEMPO_SCOPE; + if (onoff) { rec_enable_button.set_active_state (Gtkmm2ext::ExplicitActive); } else { @@ -520,6 +600,8 @@ CueEditor::blink_rec_enable (bool onoff) void CueEditor::trigger_arm_change () { + EC_LOCAL_TEMPO_SCOPE; + if (!ref.trigger()) { return; } @@ -536,6 +618,8 @@ CueEditor::trigger_arm_change () void CueEditor::rec_enable_change () { + EC_LOCAL_TEMPO_SCOPE; + if (!ref.box()) { return; } @@ -568,12 +652,16 @@ CueEditor::rec_enable_change () void CueEditor::set_recording_length (Temporal::BBT_Offset dur) { + EC_LOCAL_TEMPO_SCOPE; + rec_length = dur; } void CueEditor::scrolled () { + EC_LOCAL_TEMPO_SCOPE; + pending_visual_change.add (VisualChange::TimeOrigin); pending_visual_change.time_origin = horizontal_adjustment.get_value() * samples_per_pixel; ensure_visual_change_idle_handler (); @@ -582,6 +670,8 @@ CueEditor::scrolled () bool CueEditor::canvas_pre_event (GdkEvent* ev) { + EC_LOCAL_TEMPO_SCOPE; + switch (ev->type) { case GDK_ENTER_NOTIFY: case GDK_LEAVE_NOTIFY: @@ -599,6 +689,8 @@ CueEditor::canvas_pre_event (GdkEvent* ev) bool CueEditor::autoscroll_active () const { + EC_LOCAL_TEMPO_SCOPE; + return autoscroll_connection.connected (); } @@ -610,6 +702,8 @@ CueEditor::autoscroll_active () const void CueEditor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers) { + EC_LOCAL_TEMPO_SCOPE; + if (!UIConfiguration::instance().get_autoscroll_editor () || autoscroll_active ()) { return; } @@ -681,6 +775,8 @@ CueEditor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_header bool CueEditor::autoscroll_canvas () { + EC_LOCAL_TEMPO_SCOPE; + using std::max; using std::min; int x, y; @@ -881,6 +977,8 @@ CueEditor::autoscroll_canvas () void CueEditor::start_canvas_autoscroll (bool allow_horiz, bool allow_vert, const ArdourCanvas::Rect& boundary) { + EC_LOCAL_TEMPO_SCOPE; + if (!_session) { return; } @@ -904,6 +1002,8 @@ CueEditor::start_canvas_autoscroll (bool allow_horiz, bool allow_vert, const Ard void CueEditor::stop_canvas_autoscroll () { + EC_LOCAL_TEMPO_SCOPE; + autoscroll_connection.disconnect (); autoscroll_cnt = 0; } @@ -911,6 +1011,8 @@ CueEditor::stop_canvas_autoscroll () void CueEditor::visual_changer (const VisualChange& vc) { + EC_LOCAL_TEMPO_SCOPE; + /** * Changed first so the correct horizontal canvas position is calculated in * EditingContext::set_horizontal_position @@ -951,6 +1053,8 @@ CueEditor::visual_changer (const VisualChange& vc) void CueEditor::catch_pending_show_region () { + EC_LOCAL_TEMPO_SCOPE; + if (_visible_pending_region) { std::shared_ptr r (_visible_pending_region); _visible_pending_region.reset (); @@ -961,6 +1065,8 @@ CueEditor::catch_pending_show_region () RegionSelection CueEditor::region_selection() { + EC_LOCAL_TEMPO_SCOPE; + RegionSelection rs; /* there is never any region-level selection in a pianoroll */ return rs; @@ -969,6 +1075,8 @@ CueEditor::region_selection() void CueEditor::mouse_mode_chosen (Editing::MouseMode m) { + EC_LOCAL_TEMPO_SCOPE; + if (!mouse_mode_actions[m]->get_active()) { /* this was just the notification that the old mode has been * left. we'll get called again with the new mode active in a @@ -989,6 +1097,8 @@ CueEditor::mouse_mode_chosen (Editing::MouseMode m) std::pair CueEditor::max_zoom_extent() const { + EC_LOCAL_TEMPO_SCOPE; + if (_region) { Temporal::Beats len; @@ -1011,6 +1121,8 @@ CueEditor::max_zoom_extent() const void CueEditor::zoom_to_show (Temporal::timecnt_t const & duration) { + EC_LOCAL_TEMPO_SCOPE; + if (!_track_canvas_width) { zoom_in_allocate = true; return; @@ -1022,6 +1134,8 @@ CueEditor::zoom_to_show (Temporal::timecnt_t const & duration) void CueEditor::full_zoom_clicked() { + EC_LOCAL_TEMPO_SCOPE; + /* XXXX NEED LOCAL TEMPO MAP */ std::pair dur (max_zoom_extent()); @@ -1032,12 +1146,16 @@ CueEditor::full_zoom_clicked() void CueEditor::set_show_source (bool yn) { + EC_LOCAL_TEMPO_SCOPE; + show_source = yn; } void CueEditor::update_solo_display () { + EC_LOCAL_TEMPO_SCOPE; + if (_track->solo_control()->get_value()) { solo_button.set_active_state (Gtkmm2ext::ExplicitActive); } else { @@ -1048,6 +1166,8 @@ CueEditor::update_solo_display () void CueEditor::set_track (std::shared_ptr t) { + EC_LOCAL_TEMPO_SCOPE; + _track = t; _track->solo_control()->Changed.connect (object_connections, invalidator (*this), std::bind (&CueEditor::update_solo_display, this), gui_context()); update_solo_display (); @@ -1056,6 +1176,8 @@ CueEditor::set_track (std::shared_ptr t) void CueEditor::set_region (std::shared_ptr r) { + EC_LOCAL_TEMPO_SCOPE; + if (r == _region) { return; } @@ -1074,6 +1196,8 @@ CueEditor::set_region (std::shared_ptr r) void CueEditor::maybe_set_from_rsu () { + EC_LOCAL_TEMPO_SCOPE; + RegionUISettingsManager::iterator rsu = ARDOUR_UI::instance()->region_ui_settings_manager.find (_region->id()); if (rsu != ARDOUR_UI::instance()->region_ui_settings_manager.end()) { set_from_rsu (rsu->second); @@ -1083,6 +1207,8 @@ CueEditor::maybe_set_from_rsu () void CueEditor::set_from_rsu (RegionUISettings& rsu) { + EC_LOCAL_TEMPO_SCOPE; + follow_playhead_action->set_active (rsu.follow_playhead); /* XXXX play selection */ @@ -1101,6 +1227,8 @@ CueEditor::set_from_rsu (RegionUISettings& rsu) void CueEditor::set_trigger (TriggerReference& tref) { + EC_LOCAL_TEMPO_SCOPE; + if (tref == ref) { return; } @@ -1122,6 +1250,8 @@ CueEditor::set_trigger (TriggerReference& tref) void CueEditor::ruler_locate (GdkEventButton* ev) { + EC_LOCAL_TEMPO_SCOPE; + if (!_session) { return; } @@ -1143,6 +1273,8 @@ CueEditor::ruler_locate (GdkEventButton* ev) void CueEditor::maybe_set_count_in () { + EC_LOCAL_TEMPO_SCOPE; + if (!ref.box()) { std::cerr << "msci no box\n"; return; @@ -1179,6 +1311,8 @@ CueEditor::maybe_set_count_in () void CueEditor::count_in (Temporal::timepos_t audible, unsigned int clock_interval_msecs) { + EC_LOCAL_TEMPO_SCOPE; + if (!_session) { return; } @@ -1224,6 +1358,8 @@ CueEditor::count_in (Temporal::timepos_t audible, unsigned int clock_interval_ms bool CueEditor::ruler_event (GdkEvent* ev) { + EC_LOCAL_TEMPO_SCOPE; + switch (ev->type) { case GDK_BUTTON_RELEASE: if (ev->button.button == 1) { @@ -1240,6 +1376,8 @@ CueEditor::ruler_event (GdkEvent* ev) void CueEditor::data_captured (samplecnt_t total_duration) { + EC_LOCAL_TEMPO_SCOPE; + data_capture_duration = total_duration; if (!idle_update_queued.exchange (1)) { @@ -1250,6 +1388,8 @@ CueEditor::data_captured (samplecnt_t total_duration) bool CueEditor::idle_data_captured () { + EC_LOCAL_TEMPO_SCOPE; + if (!ref.box()) { return false; } @@ -1274,6 +1414,8 @@ CueEditor::idle_data_captured () void CueEditor::unset (bool trigger_too) { + EC_LOCAL_TEMPO_SCOPE; + _history.clear (); history_connection.disconnect(); _update_connection.disconnect(); @@ -1293,6 +1435,8 @@ CueEditor::unset (bool trigger_too) void CueEditor::session_going_away () { + EC_LOCAL_TEMPO_SCOPE; + EditingContext::session_going_away (); unset (true); } @@ -1300,6 +1444,8 @@ CueEditor::session_going_away () void CueEditor::load_bindings () { + EC_LOCAL_TEMPO_SCOPE; + load_shared_bindings (); for (auto & b : bindings) { b->associate (); @@ -1310,6 +1456,8 @@ CueEditor::load_bindings () void CueEditor::register_actions () { + EC_LOCAL_TEMPO_SCOPE; + editor_actions = ActionManager::create_action_group (own_bindings, editor_name()); bind_mouse_mode_buttons (); } @@ -1317,12 +1465,16 @@ CueEditor::register_actions () ArdourCanvas::GtkCanvasViewport* CueEditor::get_canvas_viewport() const { + EC_LOCAL_TEMPO_SCOPE; + return const_cast(&_canvas_viewport); } ArdourCanvas::GtkCanvas* CueEditor::get_canvas() const { + EC_LOCAL_TEMPO_SCOPE; + return &_canvas; } @@ -1330,6 +1482,8 @@ CueEditor::get_canvas() const int CueEditor::set_state (XMLNode const & node, int version) { + EC_LOCAL_TEMPO_SCOPE; + set_common_editing_state (node); return 0; } @@ -1337,6 +1491,8 @@ CueEditor::set_state (XMLNode const & node, int version) XMLNode& CueEditor::get_state () const { + EC_LOCAL_TEMPO_SCOPE; + XMLNode* node (new XMLNode (editor_name())); get_common_editing_state (*node); return *node; @@ -1354,6 +1510,8 @@ edit_last_mark_label (std::vector& marks, const std:: void CueEditor::metric_get_bbt (std::vector& marks, samplepos_t leftmost, samplepos_t rightmost, gint /*maxchars*/) { + EC_LOCAL_TEMPO_SCOPE; + if (!_session) { return; } diff --git a/gtk2_ardour/pianoroll.cc b/gtk2_ardour/pianoroll.cc index eb4b164592..6f3fa256cb 100644 --- a/gtk2_ardour/pianoroll.cc +++ b/gtk2_ardour/pianoroll.cc @@ -105,6 +105,8 @@ Pianoroll::~Pianoroll () void Pianoroll::set_show_source (bool yn) { + EC_LOCAL_TEMPO_SCOPE; + CueEditor::set_show_source (yn); if (view) { view->set_show_source (yn); @@ -114,6 +116,8 @@ Pianoroll::set_show_source (bool yn) void Pianoroll::rebuild_parameter_button_map() { + EC_LOCAL_TEMPO_SCOPE; + parameter_button_map.clear (); parameter_button_map.insert (std::make_pair (velocity_button, Evoral::Parameter (ARDOUR::MidiVelocityAutomation, _visible_channel))); parameter_button_map.insert (std::make_pair (bender_button, Evoral::Parameter (ARDOUR::MidiPitchBenderAutomation, _visible_channel))); @@ -129,6 +133,8 @@ Pianoroll::rebuild_parameter_button_map() void Pianoroll::reset_user_cc_choice (std::string name, Evoral::Parameter param, MetaButton* metabutton) { + EC_LOCAL_TEMPO_SCOPE; + ParameterButtonMap::iterator iter; for (iter = parameter_button_map.begin(); iter != parameter_button_map.end(); ++iter) { @@ -149,6 +155,8 @@ Pianoroll::add_single_controller_item (Gtk::Menu_Helpers::MenuList& ctl_items, const std::string& name, ArdourWidgets::MetaButton* mb) { + EC_LOCAL_TEMPO_SCOPE; + using namespace Gtk::Menu_Helpers; const uint16_t selected_channels = 0xffff; @@ -174,6 +182,8 @@ Pianoroll::add_multi_controller_item (Gtk::Menu_Helpers::MenuList&, const std::string& name, MetaButton* mb) { + EC_LOCAL_TEMPO_SCOPE; + using namespace Gtk; using namespace Gtk::Menu_Helpers; @@ -223,6 +233,8 @@ Pianoroll::add_multi_controller_item (Gtk::Menu_Helpers::MenuList&, void Pianoroll::build_lower_toolbar () { + EC_LOCAL_TEMPO_SCOPE; + horizontal_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &Pianoroll::scrolled)); ArdourButton::Element elements = ArdourButton::Element (ArdourButton::Text|ArdourButton::Indicator|ArdourButton::Edge|ArdourButton::Body); @@ -292,6 +304,8 @@ Pianoroll::build_lower_toolbar () void Pianoroll::pack_inner (Gtk::Box& box) { + EC_LOCAL_TEMPO_SCOPE; + box.pack_start (snap_box, false, false); box.pack_start (grid_box, false, false); box.pack_start (draw_box, false, false); @@ -300,6 +314,8 @@ Pianoroll::pack_inner (Gtk::Box& box) void Pianoroll::pack_outer (Gtk::Box& box) { + EC_LOCAL_TEMPO_SCOPE; + if (with_transport_controls) { box.pack_start (play_box, false, false); } @@ -314,6 +330,8 @@ Pianoroll::pack_outer (Gtk::Box& box) void Pianoroll::set_visible_channel (int n) { + EC_LOCAL_TEMPO_SCOPE; + PBD::Unwinder uw (ignore_channel_changes, true); _visible_channel = n; @@ -332,6 +350,8 @@ Pianoroll::set_visible_channel (int n) void Pianoroll::build_canvas () { + EC_LOCAL_TEMPO_SCOPE; + _canvas.set_background_color (UIConfiguration::instance().color ("arrange base")); _canvas.signal_event().connect (sigc::mem_fun (*this, &Pianoroll::canvas_pre_event), false); dynamic_cast(&_canvas)->use_nsglview (UIConfiguration::instance().get_nsgl_view_mode () == NSGLHiRes); @@ -473,6 +493,8 @@ Pianoroll::build_canvas () void Pianoroll::visible_channel_changed () { + EC_LOCAL_TEMPO_SCOPE; + if (ignore_channel_changes) { /* We're changing it */ return; @@ -491,6 +513,8 @@ Pianoroll::visible_channel_changed () void Pianoroll::bindings_changed () { + EC_LOCAL_TEMPO_SCOPE; + bindings.clear (); load_shared_bindings (); } @@ -498,6 +522,8 @@ Pianoroll::bindings_changed () void Pianoroll::maybe_update () { + EC_LOCAL_TEMPO_SCOPE; + ARDOUR::TriggerPtr playing_trigger; if (ref.trigger()) { @@ -555,6 +581,8 @@ Pianoroll::maybe_update () bool Pianoroll::canvas_enter_leave (GdkEventCrossing* ev) { + EC_LOCAL_TEMPO_SCOPE; + switch (ev->type) { case GDK_ENTER_NOTIFY: if (ev->detail != GDK_NOTIFY_INFERIOR) { @@ -579,6 +607,8 @@ Pianoroll::canvas_enter_leave (GdkEventCrossing* ev) void Pianoroll::canvas_allocate (Gtk::Allocation alloc) { + EC_LOCAL_TEMPO_SCOPE; + _visible_canvas_width = alloc.get_width(); _visible_canvas_height = alloc.get_height(); @@ -610,6 +640,8 @@ Pianoroll::canvas_allocate (Gtk::Allocation alloc) timepos_t Pianoroll::snap_to_grid (timepos_t const & presnap, Temporal::RoundMode direction, SnapPref gpref) const { + EC_LOCAL_TEMPO_SCOPE; + /* BBT time only */ return snap_to_bbt (presnap, direction, gpref); } @@ -617,6 +649,8 @@ Pianoroll::snap_to_grid (timepos_t const & presnap, Temporal::RoundMode directio void Pianoroll::snap_to_internal (timepos_t& start, Temporal::RoundMode direction, SnapPref pref, bool ensure_snap) const { + EC_LOCAL_TEMPO_SCOPE; + UIConfiguration const& uic (UIConfiguration::instance ()); const timepos_t presnap = start; @@ -649,6 +683,8 @@ Pianoroll::snap_to_internal (timepos_t& start, Temporal::RoundMode direction, Sn void Pianoroll::set_samples_per_pixel (samplecnt_t spp) { + EC_LOCAL_TEMPO_SCOPE; + CueEditor::set_samples_per_pixel (spp); if (view) { @@ -666,54 +702,72 @@ Pianoroll::set_samples_per_pixel (samplecnt_t spp) samplecnt_t Pianoroll::current_page_samples() const { + EC_LOCAL_TEMPO_SCOPE; + return (samplecnt_t) _track_canvas_width * samples_per_pixel; } bool Pianoroll::canvas_bg_event (GdkEvent* event, ArdourCanvas::Item* item) { + EC_LOCAL_TEMPO_SCOPE; + return typed_event (item, event, RegionItem); } bool Pianoroll::canvas_control_point_event (GdkEvent* event, ArdourCanvas::Item* item, ControlPoint* cp) { + EC_LOCAL_TEMPO_SCOPE; + return typed_event (item, event, ControlPointItem); } bool Pianoroll::canvas_note_event (GdkEvent* event, ArdourCanvas::Item* item) { + EC_LOCAL_TEMPO_SCOPE; + return typed_event (item, event, NoteItem); } bool Pianoroll::canvas_velocity_base_event (GdkEvent* event, ArdourCanvas::Item* item) { + EC_LOCAL_TEMPO_SCOPE; + return typed_event (item, event, VelocityBaseItem); } bool Pianoroll::canvas_velocity_event (GdkEvent* event, ArdourCanvas::Item* item) { + EC_LOCAL_TEMPO_SCOPE; + return typed_event (item, event, VelocityItem); } bool Pianoroll::canvas_cue_start_event (GdkEvent* event, ArdourCanvas::Item* item) { + EC_LOCAL_TEMPO_SCOPE; + return typed_event (item, event, ClipStartItem); } bool Pianoroll::canvas_cue_end_event (GdkEvent* event, ArdourCanvas::Item* item) { + EC_LOCAL_TEMPO_SCOPE; + return typed_event (item, event, ClipEndItem); } void Pianoroll::set_trigger_start (Temporal::timepos_t const & p) { + EC_LOCAL_TEMPO_SCOPE; + if (ref.trigger()) { ref.trigger()->the_region()->trim_front (p); } else { @@ -728,6 +782,8 @@ Pianoroll::set_trigger_start (Temporal::timepos_t const & p) void Pianoroll::set_trigger_end (Temporal::timepos_t const & p) { + EC_LOCAL_TEMPO_SCOPE; + if (ref.trigger()) { ref.trigger()->the_region()->trim_end (p); } else { @@ -742,12 +798,16 @@ Pianoroll::set_trigger_end (Temporal::timepos_t const & p) Gtk::Widget& Pianoroll::contents () { + EC_LOCAL_TEMPO_SCOPE; + return _contents; } bool Pianoroll::idle_data_captured () { + EC_LOCAL_TEMPO_SCOPE; + if (!ref.box()) { return false; } @@ -764,6 +824,8 @@ Pianoroll::idle_data_captured () bool Pianoroll::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type) { + EC_LOCAL_TEMPO_SCOPE; + if (event->type != GDK_BUTTON_PRESS) { return false; } @@ -792,6 +854,8 @@ Pianoroll::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, Item bool Pianoroll::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type) { + EC_LOCAL_TEMPO_SCOPE; + NoteBase* note = nullptr; Editing::MouseMode mouse_mode = current_mouse_mode(); switch (item_type) { @@ -894,12 +958,16 @@ Pianoroll::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, It bool Pianoroll::button_press_handler_2 (ArdourCanvas::Item*, GdkEvent*, ItemType) { + EC_LOCAL_TEMPO_SCOPE; + return true; } bool Pianoroll::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type) { + EC_LOCAL_TEMPO_SCOPE; + if (!Keyboard::is_context_menu_event (&event->button)) { /* see if we're finishing a drag */ @@ -941,6 +1009,8 @@ Pianoroll::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, It void Pianoroll::popup_region_context_menu (ArdourCanvas::Item* item, GdkEvent* event) { + EC_LOCAL_TEMPO_SCOPE; + using namespace Gtk::Menu_Helpers; if (!view) { @@ -976,6 +1046,8 @@ Pianoroll::popup_region_context_menu (ArdourCanvas::Item* item, GdkEvent* event) bool Pianoroll::button_press_dispatch (GdkEventButton* ev) { + EC_LOCAL_TEMPO_SCOPE; + /* this function is intended only for buttons 4 and above. */ Gtkmm2ext::MouseButton b (ev->state, ev->button); @@ -985,6 +1057,8 @@ Pianoroll::button_press_dispatch (GdkEventButton* ev) bool Pianoroll::button_release_dispatch (GdkEventButton* ev) { + EC_LOCAL_TEMPO_SCOPE; + /* this function is intended only for buttons 4 and above. */ Gtkmm2ext::MouseButton b (ev->state, ev->button); @@ -994,6 +1068,8 @@ Pianoroll::button_release_dispatch (GdkEventButton* ev) bool Pianoroll::motion_handler (ArdourCanvas::Item*, GdkEvent* event, bool from_autoscroll) { + EC_LOCAL_TEMPO_SCOPE; + if (_drags->active ()) { //drags change the snapped_cursor location, because we are snapping the thing being dragged, not the actual mouse cursor return _drags->motion_handler (event, from_autoscroll); @@ -1005,6 +1081,8 @@ Pianoroll::motion_handler (ArdourCanvas::Item*, GdkEvent* event, bool from_autos bool Pianoroll::key_press_handler (ArdourCanvas::Item*, GdkEvent* ev, ItemType) { + EC_LOCAL_TEMPO_SCOPE; + switch (ev->key.keyval) { case GDK_d: @@ -1021,12 +1099,16 @@ Pianoroll::key_press_handler (ArdourCanvas::Item*, GdkEvent* ev, ItemType) bool Pianoroll::key_release_handler (ArdourCanvas::Item*, GdkEvent*, ItemType) { + EC_LOCAL_TEMPO_SCOPE; + return true; } void Pianoroll::set_mouse_mode (Editing::MouseMode m, bool force) { + EC_LOCAL_TEMPO_SCOPE; + if (m != Editing::MouseDraw && m != Editing::MouseContent) { return; } @@ -1037,6 +1119,8 @@ Pianoroll::set_mouse_mode (Editing::MouseMode m, bool force) void Pianoroll::midi_action (void (MidiView::*method)()) { + EC_LOCAL_TEMPO_SCOPE; + if (!view) { return; } @@ -1047,6 +1131,8 @@ Pianoroll::midi_action (void (MidiView::*method)()) void Pianoroll::escape () { + EC_LOCAL_TEMPO_SCOPE; + if (!view) { return; } @@ -1057,12 +1143,16 @@ Pianoroll::escape () Gdk::Cursor* Pianoroll::which_track_cursor () const { + EC_LOCAL_TEMPO_SCOPE; + return _cursors->grabber; } Gdk::Cursor* Pianoroll::which_mode_cursor () const { + EC_LOCAL_TEMPO_SCOPE; + Gdk::Cursor* mode_cursor = MouseCursors::invalid_cursor (); switch (current_mouse_mode()) { @@ -1084,6 +1174,8 @@ Pianoroll::which_mode_cursor () const Gdk::Cursor* Pianoroll::which_trim_cursor (bool left_side) const { + EC_LOCAL_TEMPO_SCOPE; + abort (); /*NOTREACHED*/ return nullptr; @@ -1093,6 +1185,8 @@ Pianoroll::which_trim_cursor (bool left_side) const Gdk::Cursor* Pianoroll::which_canvas_cursor (ItemType type) const { + EC_LOCAL_TEMPO_SCOPE; + Gdk::Cursor* cursor = which_mode_cursor (); Editing::MouseMode mouse_mode = current_mouse_mode (); @@ -1180,6 +1274,8 @@ Pianoroll::which_canvas_cursor (ItemType type) const bool Pianoroll::enter_handler (ArdourCanvas::Item* item, GdkEvent* ev, ItemType item_type) { + EC_LOCAL_TEMPO_SCOPE; + choose_canvas_cursor_on_entry (item_type); switch (item_type) { @@ -1209,6 +1305,8 @@ Pianoroll::enter_handler (ArdourCanvas::Item* item, GdkEvent* ev, ItemType item_ bool Pianoroll::leave_handler (ArdourCanvas::Item* item, GdkEvent* ev, ItemType item_type) { + EC_LOCAL_TEMPO_SCOPE; + EditorAutomationLine* al; set_canvas_cursor (which_mode_cursor()); @@ -1242,6 +1340,8 @@ Pianoroll::leave_handler (ArdourCanvas::Item* item, GdkEvent* ev, ItemType item_ std::list Pianoroll::selectable_owners() { + EC_LOCAL_TEMPO_SCOPE; + if (view) { return view->selectable_owners(); } @@ -1252,6 +1352,8 @@ Pianoroll::selectable_owners() void Pianoroll::trigger_prop_change (PBD::PropertyChange const & what_changed) { + EC_LOCAL_TEMPO_SCOPE; + if (what_changed.contains (Properties::region)) { std::shared_ptr mr = std::dynamic_pointer_cast (ref.trigger()->the_region()); if (mr) { @@ -1263,6 +1365,8 @@ Pianoroll::trigger_prop_change (PBD::PropertyChange const & what_changed) void Pianoroll::region_prop_change (PBD::PropertyChange const & what_changed) { + EC_LOCAL_TEMPO_SCOPE; + if (what_changed.contains (Properties::length)) { std::shared_ptr mr = view->midi_region(); if (mr) { @@ -1274,6 +1378,8 @@ Pianoroll::region_prop_change (PBD::PropertyChange const & what_changed) void Pianoroll::set_trigger (TriggerReference & tref) { + EC_LOCAL_TEMPO_SCOPE; + if (ref == tref) { return; } @@ -1309,6 +1415,8 @@ Pianoroll::set_trigger (TriggerReference & tref) void Pianoroll::make_a_region () { + EC_LOCAL_TEMPO_SCOPE; + std::shared_ptr new_source = _session->create_midi_source_for_session (_track->name()); SourceList sources; sources.push_back (new_source); @@ -1334,6 +1442,8 @@ Pianoroll::make_a_region () void Pianoroll::unset (bool trigger_too) { + EC_LOCAL_TEMPO_SCOPE; + CueEditor::unset (trigger_too); view->set_region (nullptr); } @@ -1341,6 +1451,8 @@ Pianoroll::unset (bool trigger_too) void Pianoroll::set_track (std::shared_ptr track) { + EC_LOCAL_TEMPO_SCOPE; + CueEditor::set_track (track); if (view) { @@ -1369,6 +1481,8 @@ Pianoroll::set_track (std::shared_ptr track) void Pianoroll::set_region (std::shared_ptr region) { + EC_LOCAL_TEMPO_SCOPE; + CueEditor::set_region (region); if (_visible_pending_region) { @@ -1438,6 +1552,8 @@ Pianoroll::set_region (std::shared_ptr region) bool Pianoroll::user_automation_button_event (GdkEventButton* ev, MetaButton* mb) { + EC_LOCAL_TEMPO_SCOPE; + if (mb->is_menu_popup_event (ev)) { return false; } @@ -1462,6 +1578,8 @@ Pianoroll::user_automation_button_event (GdkEventButton* ev, MetaButton* mb) void Pianoroll::user_led_click (GdkEventButton* ev, MetaButton* metabutton) { + EC_LOCAL_TEMPO_SCOPE; + if (ev->button != 1) { return; } @@ -1478,6 +1596,8 @@ Pianoroll::user_led_click (GdkEventButton* ev, MetaButton* metabutton) bool Pianoroll::automation_button_event (GdkEventButton* ev, Evoral::ParameterType type, int id) { + EC_LOCAL_TEMPO_SCOPE; + if (ev->button != 1) { return false; } @@ -1492,6 +1612,8 @@ Pianoroll::automation_button_event (GdkEventButton* ev, Evoral::ParameterType ty void Pianoroll::automation_led_click (GdkEventButton* ev, Evoral::ParameterType type, int id) { + EC_LOCAL_TEMPO_SCOPE; + if (ev->button != 1) { return; } @@ -1511,6 +1633,8 @@ Pianoroll::automation_led_click (GdkEventButton* ev, Evoral::ParameterType type, void Pianoroll::automation_state_changed () { + EC_LOCAL_TEMPO_SCOPE; + assert (view); for (ParameterButtonMap::iterator i = parameter_button_map.begin(); i != parameter_button_map.end(); ++i) { @@ -1537,6 +1661,8 @@ Pianoroll::automation_state_changed () void Pianoroll::note_mode_clicked () { + EC_LOCAL_TEMPO_SCOPE; + assert (bg); if (bg->note_mode() == Sustained) { @@ -1549,6 +1675,8 @@ Pianoroll::note_mode_clicked () void Pianoroll::set_note_mode (NoteMode nm) { + EC_LOCAL_TEMPO_SCOPE; + assert (bg); if (nm != bg->note_mode()) { @@ -1564,6 +1692,8 @@ Pianoroll::set_note_mode (NoteMode nm) void Pianoroll::point_selection_changed () { + EC_LOCAL_TEMPO_SCOPE; + if (view) { view->point_selection_changed (); } @@ -1572,6 +1702,8 @@ Pianoroll::point_selection_changed () void Pianoroll::delete_ () { + EC_LOCAL_TEMPO_SCOPE; + /* Editor has a lot to do here, potentially. But we don't */ cut_copy (Editing::Delete); } @@ -1579,6 +1711,8 @@ Pianoroll::delete_ () void Pianoroll::paste (float times, bool from_context_menu) { + EC_LOCAL_TEMPO_SCOPE; + if (view) { // view->paste (Editing::Cut); } @@ -1587,6 +1721,8 @@ Pianoroll::paste (float times, bool from_context_menu) void Pianoroll::keyboard_paste () { + EC_LOCAL_TEMPO_SCOPE; + } /** Cut, copy or clear selected regions, automation points or a time range. @@ -1596,6 +1732,8 @@ Pianoroll::keyboard_paste () void Pianoroll::cut_copy (Editing::CutCopyOp op) { + EC_LOCAL_TEMPO_SCOPE; + using namespace Editing; /* only cancel selection if cut/copy is successful.*/ @@ -1655,6 +1793,8 @@ Pianoroll::cut_copy (Editing::CutCopyOp op) void Pianoroll::select_all_within (Temporal::timepos_t const & start, Temporal::timepos_t const & end, double y0, double y1, std::list const & ignored, ARDOUR::SelectionOperation op, bool preserve_if_selected) { + EC_LOCAL_TEMPO_SCOPE; + std::list found; if (!view) { @@ -1737,6 +1877,8 @@ Pianoroll::select_all_within (Temporal::timepos_t const & start, Temporal::timep void Pianoroll::set_session (ARDOUR::Session* s) { + EC_LOCAL_TEMPO_SCOPE; + CueEditor::set_session (s); if (with_transport_controls) { @@ -1757,6 +1899,8 @@ Pianoroll::set_session (ARDOUR::Session* s) void Pianoroll::map_transport_state () { + EC_LOCAL_TEMPO_SCOPE; + if (!_session) { loop_button.unset_active_state (); play_button.unset_active_state (); @@ -1794,6 +1938,8 @@ Pianoroll::map_transport_state () bool Pianoroll::allow_trim_cursors () const { + EC_LOCAL_TEMPO_SCOPE; + auto mouse_mode = current_mouse_mode (); return mouse_mode == Editing::MouseContent || mouse_mode == Editing::MouseTimeFX; } @@ -1801,6 +1947,8 @@ Pianoroll::allow_trim_cursors () const void Pianoroll::shift_midi (timepos_t const & t, bool model) { + EC_LOCAL_TEMPO_SCOPE; + if (!view) { return; } @@ -1811,6 +1959,8 @@ Pianoroll::shift_midi (timepos_t const & t, bool model) InstrumentInfo* Pianoroll::instrument_info () const { + EC_LOCAL_TEMPO_SCOPE; + if (!view || !view->midi_track()) { return nullptr; } @@ -1821,6 +1971,8 @@ Pianoroll::instrument_info () const void Pianoroll::update_tempo_based_rulers () { + EC_LOCAL_TEMPO_SCOPE; + if (!_session) { return; } @@ -1833,6 +1985,8 @@ Pianoroll::update_tempo_based_rulers () void Pianoroll::set_note_selection (uint8_t note) { + EC_LOCAL_TEMPO_SCOPE; + if (!view) { return; } @@ -1847,6 +2001,8 @@ Pianoroll::set_note_selection (uint8_t note) void Pianoroll::add_note_selection (uint8_t note) { + EC_LOCAL_TEMPO_SCOPE; + if (!view) { return; } @@ -1861,6 +2017,8 @@ Pianoroll::add_note_selection (uint8_t note) void Pianoroll::extend_note_selection (uint8_t note) { + EC_LOCAL_TEMPO_SCOPE; + if (!view) { return; } @@ -1875,6 +2033,8 @@ Pianoroll::extend_note_selection (uint8_t note) void Pianoroll::toggle_note_selection (uint8_t note) { + EC_LOCAL_TEMPO_SCOPE; + if (!view) { return; } @@ -1889,6 +2049,8 @@ Pianoroll::toggle_note_selection (uint8_t note) void Pianoroll::begin_write () { + EC_LOCAL_TEMPO_SCOPE; + if (view) { view->begin_write (); } @@ -1897,6 +2059,8 @@ Pianoroll::begin_write () void Pianoroll::end_write () { + EC_LOCAL_TEMPO_SCOPE; + if (view) { view->end_write (); } @@ -1905,6 +2069,8 @@ Pianoroll::end_write () void Pianoroll::manage_possible_header (Gtk::Allocation& alloc) { + EC_LOCAL_TEMPO_SCOPE; + if (prh) { double w, h; prh->size_request (w, h); @@ -1916,6 +2082,8 @@ Pianoroll::manage_possible_header (Gtk::Allocation& alloc) void Pianoroll::show_count_in (std::string const & str) { + EC_LOCAL_TEMPO_SCOPE; + if (view) { view->set_overlay_text (str); } @@ -1924,6 +2092,8 @@ Pianoroll::show_count_in (std::string const & str) void Pianoroll::hide_count_in () { + EC_LOCAL_TEMPO_SCOPE; + if (view) { view->hide_overlay_text (); } @@ -1932,6 +2102,8 @@ Pianoroll::hide_count_in () void Pianoroll::instant_save () { + EC_LOCAL_TEMPO_SCOPE; + region_ui_settings.draw_length = draw_length(); region_ui_settings.draw_velocity = draw_velocity(); region_ui_settings.channel = draw_channel(); @@ -1944,6 +2116,8 @@ Pianoroll::instant_save () void Pianoroll::parameter_changed (std::string param) { + EC_LOCAL_TEMPO_SCOPE; + if (param == X_("note-name-display")) { if (prh) { prh->instrument_info_change ();