summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/region.h
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-06-16 00:18:27 +1000
committernick_m <mainsbridge@gmail.com>2016-07-10 02:18:36 +1000
commit94e0a15325278ec26dbeba4990a0e883db859338 (patch)
treee4d97368112f92ba8a66c673b68c68f7a76b025a /libs/ardour/ardour/region.h
parent2d5238d87581bc0ff9dcaaa8aad9e255b5d9c370 (diff)
Exact beat - provide audio->music mapping for region split.
- for those not in the know, this series provides a way to remove the temporal distortion introduced when using an audio frame-based gui for music-locked objects. In short, the gui uses an audio frame representation to move objects. It displays the object using frame_at_beat(), quantizing the time value to audio frames. This is fine until the user selects that frame but expects it to be interpreted as a beat. Thus beat_at_frame() would not produce the user-expected beat (temporal quantization error of up to 0.5 audio samples). This is one method of mapping audio time to music time accurately.
Diffstat (limited to 'libs/ardour/ardour/region.h')
-rw-r--r--libs/ardour/ardour/region.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h
index e0dd159ce5..ec4f559a87 100644
--- a/libs/ardour/ardour/region.h
+++ b/libs/ardour/ardour/region.h
@@ -171,9 +171,9 @@ class LIBARDOUR_API Region
Trimmable::CanTrim can_trim () const;
PositionLockStyle position_lock_style () const { return _position_lock_style; }
- double beat () { return _beat; }
+ double beat () const { return _beat; }
void set_position_lock_style (PositionLockStyle ps);
- void recompute_position_from_lock_style ();
+ void recompute_position_from_lock_style (const int32_t& sub_num);
void suspend_property_changes ();
@@ -205,7 +205,7 @@ class LIBARDOUR_API Region
/* EDITING OPERATIONS */
- void set_length (framecnt_t);
+ 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_initial_position (framepos_t);
@@ -339,7 +339,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);
+ Region (boost::shared_ptr<const Region>, frameoffset_t start_offset, const int32_t& sub_num);
/** Construct a region as a copy of another region, but with different sources */
Region (boost::shared_ptr<const Region>, const SourceList&);
@@ -356,8 +356,8 @@ class LIBARDOUR_API Region
void send_change (const PBD::PropertyChange&);
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);
- virtual void set_length_internal (framecnt_t);
+ virtual void set_position_internal (framepos_t pos, bool allow_bbt_recompute, const int32_t& sub_num);
+ 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&);
void first_edit ();