summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/region.h
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2017-01-27 00:41:17 +1100
committernick_m <mainsbridge@gmail.com>2017-02-04 22:57:36 +1100
commit59daffea1d78cb55b35fe19c135cc4ab472bd01d (patch)
tree45e514f2e4f5a1935e360fd4fa3e2475ec217006 /libs/ardour/ardour/region.h
parenta21a414615505269bf770ad2358482e698e841af (diff)
rework snap
snap now fills in a struct (MusicFrame) which contins a snapped frame along with a music divisor. this gives useful information wrt magnetic snap which may or may not have rounded to an exact musical position. region position may now be set musically (using quarter notes for now). this patch fixes several problems in the current code: - dragging a list of music-locked regions now maintains correct musical offsets within the list. - splitting regions using magnetic snap works correctly (#7192) - cut drag should now work correctly with magnetic snap. - musical length of split midi regions is no longer frame based.
Diffstat (limited to 'libs/ardour/ardour/region.h')
-rw-r--r--libs/ardour/ardour/region.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h
index a01ef703f3..85e0442a41 100644
--- a/libs/ardour/ardour/region.h
+++ b/libs/ardour/ardour/region.h
@@ -215,6 +215,7 @@ class LIBARDOUR_API Region
void set_length (framecnt_t, const int32_t sub_num);
void set_start (framepos_t);
void set_position (framepos_t, int32_t sub_num = 0);
+ void set_position_music (double qn);
void set_initial_position (framepos_t);
void special_set_position (framepos_t);
virtual void update_after_tempo_map_change (bool send_change = true);
@@ -346,7 +347,7 @@ class LIBARDOUR_API Region
Region (boost::shared_ptr<const Region>);
/** Construct a region from another region, at an offset within that region */
- Region (boost::shared_ptr<const Region>, frameoffset_t start_offset, const int32_t sub_num);
+ Region (boost::shared_ptr<const Region>, ARDOUR::MusicFrame start_offset);
/** Construct a region as a copy of another region, but with different sources */
Region (boost::shared_ptr<const Region>, const SourceList&);
@@ -364,6 +365,7 @@ class LIBARDOUR_API Region
virtual int _set_state (const XMLNode&, int version, PBD::PropertyChange& what_changed, bool send_signal);
void post_set (const PBD::PropertyChange&);
virtual void set_position_internal (framepos_t pos, bool allow_bbt_recompute, const int32_t sub_num);
+ virtual void set_position_music_internal (double qn);
virtual void set_length_internal (framecnt_t, const int32_t sub_num);
virtual void set_start_internal (framecnt_t, const int32_t sub_num = 0);
bool verify_start_and_length (framepos_t, framecnt_t&);