+ void change_note_velocity(ArdourCanvas::CanvasNoteEvent* ev, int8_t vel, bool relative=false);
+ void change_note_note(ArdourCanvas::CanvasNoteEvent* ev, int8_t note, bool relative=false);
+ void change_note_time(ArdourCanvas::CanvasNoteEvent* ev, ARDOUR::MidiModel::TimeType, bool relative=false);
+ void trim_note(ArdourCanvas::CanvasNoteEvent* ev, ARDOUR::MidiModel::TimeType start_delta,
+ ARDOUR::MidiModel::TimeType end_delta);
+
+ void clear_selection_except(ArdourCanvas::CanvasNoteEvent* ev);
+ void clear_selection() { clear_selection_except(NULL); }
+ void update_drag_selection(double last_x, double x, double last_y, double y);
+
+ void add_to_selection (ArdourCanvas::CanvasNoteEvent*);
+ void remove_from_selection (ArdourCanvas::CanvasNoteEvent*);
+
+ int8_t _force_channel;
+ uint16_t _last_channel_selection;
+ double _default_note_length;
+ uint8_t _current_range_min;
+ uint8_t _current_range_max;
+
+ /// MIDNAM information of the current track: Model name of MIDNAM file
+ std::string _model_name;
+
+ /// MIDNAM information of the current track: CustomDeviceMode
+ std::string _custom_device_mode;
+
+ typedef std::list<ArdourCanvas::CanvasNoteEvent*> Events;
+ typedef std::vector< boost::shared_ptr<ArdourCanvas::CanvasProgramChange> > PgmChanges;
+ typedef std::vector< boost::shared_ptr<ArdourCanvas::CanvasSysEx> > SysExes;
+
+ boost::shared_ptr<ARDOUR::MidiModel> _model;
+ Events _events;
+ PgmChanges _pgm_changes;
+ SysExes _sys_exes;
+ ArdourCanvas::CanvasNote** _active_notes;
+ ArdourCanvas::Group* _note_group;
+ ARDOUR::MidiModel::DeltaCommand* _delta_command;
+ ARDOUR::MidiModel::DiffCommand* _diff_command;
+
+ MouseState _mouse_state;
+ int _pressed_button;
+
+ typedef std::set<ArdourCanvas::CanvasNoteEvent*> Selection;
+ /// Currently selected CanvasNoteEvents
+ Selection _selection;
+
+ bool _sort_needed;
+ void time_sort_events ();
+
+ MidiCutBuffer* selection_as_cut_buffer () const;
+
+ /** New notes (created in the current command) which should be selected
+ * when they appear after the command is applied. */
+ std::set< boost::shared_ptr<NoteType> > _marked_for_selection;
+
+ /** New notes (created in the current command) which should have visible velocity
+ * when they appear after the command is applied. */
+ std::set< boost::shared_ptr<NoteType> > _marked_for_velocity;
+
+ std::vector<NoteResizeData *> _resize_data;
+
+ /* connection used to connect to model's ContentChanged signal */
+ PBD::ScopedConnection content_connection;
+
+ ArdourCanvas::CanvasNoteEvent* find_canvas_note (boost::shared_ptr<NoteType>);
+ Events::iterator _optimization_iterator;
+
+ void update_note (ArdourCanvas::CanvasNote*);
+ void update_hit (ArdourCanvas::CanvasHit*);
+
+ MidiListEditor* _list_editor;
+ bool no_sound_notes;
+
+ PBD::ScopedConnection note_delete_connection;
+ void maybe_remove_deleted_note_from_selection (ArdourCanvas::CanvasNoteEvent*);