diff options
author | nick_m <mainsbridge@gmail.com> | 2016-06-16 00:18:27 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-07-10 02:18:36 +1000 |
commit | 94e0a15325278ec26dbeba4990a0e883db859338 (patch) | |
tree | e4d97368112f92ba8a66c673b68c68f7a76b025a /libs/ardour/ardour/midi_region.h | |
parent | 2d5238d87581bc0ff9dcaaa8aad9e255b5d9c370 (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/midi_region.h')
-rw-r--r-- | libs/ardour/ardour/midi_region.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/ardour/midi_region.h b/libs/ardour/ardour/midi_region.h index 3a097c907e..9de79a9513 100644 --- a/libs/ardour/ardour/midi_region.h +++ b/libs/ardour/ardour/midi_region.h @@ -115,7 +115,7 @@ class LIBARDOUR_API MidiRegion : public Region MidiRegion (const SourceList&); MidiRegion (boost::shared_ptr<const MidiRegion>); - MidiRegion (boost::shared_ptr<const MidiRegion>, frameoffset_t offset); + MidiRegion (boost::shared_ptr<const MidiRegion>, frameoffset_t offset, const int32_t& sub_num = 0); framecnt_t _read_at (const SourceList&, Evoral::EventSink<framepos_t>& dst, framepos_t position, @@ -131,11 +131,11 @@ class LIBARDOUR_API MidiRegion : public Region void recompute_at_start (); void recompute_at_end (); - void set_position_internal (framepos_t pos, bool allow_bbt_recompute); - void set_length_internal (framecnt_t len); + void set_position_internal (framepos_t pos, bool allow_bbt_recompute, const int32_t& sub_num); + void set_length_internal (framecnt_t len, const int32_t& sub_num); void set_start_internal (framecnt_t, const int32_t& sub_num); void trim_to_internal (framepos_t position, framecnt_t length, const int32_t& sub_num); - void update_length_beats (); + void update_length_beats (const int32_t& sub_num); void model_changed (); void model_automation_state_changed (Evoral::Parameter const &); |