diff options
author | nick_m <mainsbridge@gmail.com> | 2015-05-17 04:26:05 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-05-17 04:26:05 +1000 |
commit | 91a34c596d1bb72f33ccaa17d6ebfa3a435f629c (patch) | |
tree | e4597f925fb4f65d7aba9b52eac61f13095f418b /gtk2_ardour/midi_region_view.h | |
parent | bbafb8f137bd9f8a18a7242e2628d309a1f8f991 (diff) |
Relative snap - support magnetic mode (hackishly for now)
Diffstat (limited to 'gtk2_ardour/midi_region_view.h')
-rw-r--r-- | gtk2_ardour/midi_region_view.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h index cfdb50a99c..7329c6facc 100644 --- a/gtk2_ardour/midi_region_view.h +++ b/gtk2_ardour/midi_region_view.h @@ -254,12 +254,24 @@ public: */ double snap_to_pixel(double x); + /** Snap a region relative pixel coordinate to pixel units explicitly (no magnetic snap). + * @param x a pixel coordinate relative to region start + * @return the explicitly snapped pixel coordinate relative to region start + */ + double snap_to_pixel_no_magnets (double x); + /** Snap a region relative pixel coordinate to frame units. * @param x a pixel coordinate relative to region start * @return the snapped framepos_t coordinate relative to region start */ framepos_t snap_pixel_to_sample(double x); + /** Explicitly snap a region relative pixel coordinate to frame units (no magnetic snap). + * @param x a pixel coordinate relative to region start + * @return the explicitly snapped framepos_t coordinate relative to region start + */ + framepos_t snap_pixel_to_sample_no_magnets (double x); + /** Convert a timestamp in beats into frames (both relative to region position) */ framepos_t region_beats_to_region_frames(Evoral::Beats beats) const; /** Convert a timestamp in beats into absolute frames */ |