void display_model(boost::shared_ptr<ARDOUR::MidiModel> model);
- void start_delta_command(std::string name = "midi edit");
- void delta_add_note(const boost::shared_ptr<NoteType> note, bool selected, bool show_velocity=false);
- void delta_remove_note(ArdourCanvas::CanvasNoteEvent* ev);
-
void start_diff_command(std::string name = "midi edit");
void diff_add_change(ArdourCanvas::CanvasNoteEvent* ev, ARDOUR::MidiModel::DiffCommand::Property, uint8_t val);
void diff_add_change(ArdourCanvas::CanvasNoteEvent* ev, ARDOUR::MidiModel::DiffCommand::Property, Evoral::MusicalTime val);
+ void diff_add_note(const boost::shared_ptr<NoteType> note, bool selected, bool show_velocity=false);
+ void diff_remove_note(ArdourCanvas::CanvasNoteEvent* ev);
- void apply_delta();
void apply_diff();
- void apply_delta_as_subcommand();
void apply_diff_as_subcommand();
void abort_command();
void note_selected(ArdourCanvas::CanvasNoteEvent* ev, bool add, bool extend=false);
void note_deselected(ArdourCanvas::CanvasNoteEvent* ev);
void delete_selection();
+ void delete_note (boost::shared_ptr<NoteType>);
size_t selection_size() { return _selection.size(); }
void move_selection(double dx, double dy);
void note_dropped(ArdourCanvas::CanvasNoteEvent* ev, double d_pixels, int8_t d_note);
+ void select_matching_notes (uint8_t notenum, uint16_t channel_mask, bool add, bool extend);
+ void toggle_matching_notes (uint8_t notenum, uint16_t channel_mask);
+
/** Return true iff the note is within the extent of the region.
* @param visible will be set to true if the note is within the visible note range, false otherwise.
*/
*/
void begin_resizing(bool at_front);
- /** Update resizing notes while user drags.
- * @param at_front which end of the note (true == note on, false == note off)
- * @param x the difference in mouse motion, ie the motion difference if relative=true
- * or the absolute mouse position (track-relative) if relative is false
- * @param relative true if relative resizing is taking place, false if absolute resizing
- */
- void update_resizing(bool at_front, double x, bool relative);
-
- /** Finish resizing notes when the user releases the mouse button.
- * @param at_front which end of the note (true == note on, false == note off)
- * @param event_x the absolute mouse position (track-relative)
- * @param relative true if relative resizing is taking place, false if absolute resizing
- */
- void commit_resizing(bool at_front, double event_x, bool relative);
+ void update_resizing (ArdourCanvas::CanvasNote *, bool, double, bool);
+ void commit_resizing (ArdourCanvas::CanvasNote *, bool, double, bool);
/** Adjust the velocity on a note, and the selection if applicable.
* @param velocity the relative or absolute velocity
nframes64_t beats_to_frames(double beats) const;
/** Convert a timestamp in frames to beats (both relative to region start) */
- double frames_to_beats(nframes64_t beats) const;
+ double frames_to_beats(nframes64_t) const;
void goto_previous_note ();
void goto_next_note ();
void show_list_editor ();
- void selection_as_notelist (Notes& selected);
+ void selection_as_notelist (Notes& selected, bool allow_all_if_none_selected = false);
protected:
/** Allows derived types to specify their visibility requirements
Gdk::Color& basic_color,
TimeAxisViewItem::Visibility);
- void region_resized (ARDOUR::Change);
+ void region_resized (const PBD::PropertyChange&);
void set_flags (XMLNode *);
void store_flags ();
int8_t _force_channel;
uint16_t _last_channel_selection;
- double _default_note_length;
uint8_t _current_range_min;
uint8_t _current_range_max;
SysExes _sys_exes;
ArdourCanvas::CanvasNote** _active_notes;
ArdourCanvas::Group* _note_group;
- ARDOUR::MidiModel::DeltaCommand* _delta_command;
ARDOUR::MidiModel::DiffCommand* _diff_command;
+ ArdourCanvas::CanvasNote* _ghost_note;
+ double _last_ghost_x;
+ double _last_ghost_y;
+ double _drag_start_x;
+ double _drag_start_y;
+ double _last_x;
+ double _last_y;
+ ArdourCanvas::SimpleRect* _drag_rect;
MouseState _mouse_state;
int _pressed_button;
void update_note (ArdourCanvas::CanvasNote*);
void update_hit (ArdourCanvas::CanvasHit*);
+ void create_ghost_note (double, double);
+ void update_ghost_note (double, double);
MidiListEditor* _list_editor;
+ bool no_sound_notes;
+
+ PBD::ScopedConnection note_delete_connection;
+ void maybe_remove_deleted_note_from_selection (ArdourCanvas::CanvasNoteEvent*);
+
+ void snap_changed ();
+ PBD::ScopedConnection snap_changed_connection;
+
+ void show_verbose_canvas_cursor (boost::shared_ptr<NoteType>) const;
+
+ bool motion (GdkEventMotion*);
+ bool scroll (GdkEventScroll*);
+ bool key_press (GdkEventKey*);
+ bool key_release (GdkEventKey*);
+ bool button_press (GdkEventButton*);
+ bool button_release (GdkEventButton*);
+ bool enter_notify (GdkEventCrossing*);
+ bool leave_notify (GdkEventCrossing*);
+
+ void drop_down_keys ();
+ void maybe_select_by_position (GdkEventButton* ev, double x, double y);
+ void get_events (Events& e, Evoral::Sequence<Evoral::MusicalTime>::NoteOperator op, uint8_t val, int chan_mask = 0);
};