diff options
author | nick_m <mainsbridge@gmail.com> | 2017-02-05 05:02:01 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2017-02-05 05:02:01 +1100 |
commit | 5031bdcf10bf7dbc8521598f3a60a0285b9abe1b (patch) | |
tree | 7ac0a6c5bddb47925878abe9c5e3d518af3c61f4 /gtk2_ardour/editor_drag.h | |
parent | fac04afbba35976dbf13a0e0c298b8af6f42a70f (diff) |
midi note drags are music-based.
- wysiwyg (during drag) when dragging more than one note across
a tempo change.
- introduces a muscal equivalent of snap_delta (only used for
note drags atm)
- split earliest note in selection into a separate function
- MRV::copy_selection() returns the equivalent _primary note
to avoid offset hell.
- RV::snap_frame_to_frame returns a MusicFrame
- prevent note drag moving before region start.
Diffstat (limited to 'gtk2_ardour/editor_drag.h')
-rw-r--r-- | gtk2_ardour/editor_drag.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index 95eaf1409b..711b5095c7 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -242,12 +242,13 @@ protected: } ARDOUR::frameoffset_t snap_delta (guint const) const; + double snap_delta_music (guint const) const; double current_pointer_x () const; double current_pointer_y () const; /* sets snap delta from unsnapped pos */ - void setup_snap_delta (framepos_t pos); + void setup_snap_delta (ARDOUR::MusicFrame pos); boost::shared_ptr<ARDOUR::Region> add_midi_region (MidiTimeAxisView*, bool commit); @@ -282,6 +283,7 @@ private: * framepos. used for relative snap. */ framepos_t _snap_delta; + double _snap_delta_music; CursorContext::Handle _cursor_ctx; ///< cursor change context bool _constraint_pressed; ///< if the keyboard indicated constraint modifier was pressed on start_grab() }; @@ -557,15 +559,17 @@ class NoteDrag : public Drag void finished (GdkEvent *, bool); void aborted (bool); + void setup_pointer_frame_offset (); private: - ARDOUR::frameoffset_t total_dx (const guint) const; + double total_dx (GdkEvent * event) const; // total movement in quarter notes int8_t total_dy () const; MidiRegionView* _region; NoteBase* _primary; double _cumulative_dx; double _cumulative_dy; + double _earliest; // earliest quarter note in note selection bool _was_selected; double _note_height; bool _copy; |