summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/playlist.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/playlist.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/playlist.h')
-rw-r--r--libs/ardour/ardour/playlist.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h
index bdf17eabf0..580b245c47 100644
--- a/libs/ardour/ardour/playlist.h
+++ b/libs/ardour/ardour/playlist.h
@@ -135,14 +135,14 @@ public:
/* Editing operations */
- void add_region (boost::shared_ptr<Region>, framepos_t position, float times = 1, bool auto_partition = false, const int32_t sub_num = 0);
+ void add_region (boost::shared_ptr<Region>, framepos_t position, float times = 1, bool auto_partition = false, int32_t sub_num = 0, double quarter_note = 0.0, bool for_music = false);
void remove_region (boost::shared_ptr<Region>);
void get_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
void get_region_list_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
void get_source_equivalent_regions (boost::shared_ptr<Region>, std::vector<boost::shared_ptr<Region> >&);
void replace_region (boost::shared_ptr<Region> old, boost::shared_ptr<Region> newr, framepos_t pos);
- void split_region (boost::shared_ptr<Region>, framepos_t position, const int32_t sub_num);
- void split (framepos_t at, const int32_t sub_num);
+ void split_region (boost::shared_ptr<Region>, MusicFrame position);
+ void split (MusicFrame at);
void shift (framepos_t at, frameoffset_t distance, bool move_intersected, bool ignore_music_glue);
void partition (framepos_t start, framepos_t end, bool cut = false);
void duplicate (boost::shared_ptr<Region>, framepos_t position, float times);
@@ -372,7 +372,7 @@ public:
virtual XMLNode& state (bool);
- bool add_region_internal (boost::shared_ptr<Region>, framepos_t position, const int32_t sub_num = 0);
+ bool add_region_internal (boost::shared_ptr<Region>, framepos_t position, int32_t sub_num = 0, double quarter_note = 0.0, bool for_music = false);
int remove_region_internal (boost::shared_ptr<Region>);
void copy_regions (RegionList&) const;
@@ -390,7 +390,7 @@ public:
void begin_undo ();
void end_undo ();
- void _split_region (boost::shared_ptr<Region>, framepos_t position, const int32_t sub_num);
+ virtual void _split_region (boost::shared_ptr<Region>, MusicFrame position);
typedef std::pair<boost::shared_ptr<Region>, boost::shared_ptr<Region> > TwoRegions;