diff options
author | nick_m <mainsbridge@gmail.com> | 2017-01-27 00:41:17 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2017-02-04 22:57:36 +1100 |
commit | 59daffea1d78cb55b35fe19c135cc4ab472bd01d (patch) | |
tree | 45e514f2e4f5a1935e360fd4fa3e2475ec217006 /libs/ardour/ardour/tempo.h | |
parent | a21a414615505269bf770ad2358482e698e841af (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/tempo.h')
-rw-r--r-- | libs/ardour/ardour/tempo.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index a3ab8d68f6..1dce6347a0 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -386,10 +386,10 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible void replace_meter (const MeterSection&, const Meter&, const Timecode::BBT_Time& where, framepos_t frame, PositionLockStyle pls); - framepos_t round_to_bar (framepos_t frame, RoundMode dir); - framepos_t round_to_beat (framepos_t frame, RoundMode dir); + MusicFrame round_to_bar (framepos_t frame, RoundMode dir); + MusicFrame round_to_beat (framepos_t frame, RoundMode dir); framepos_t round_to_beat_subdivision (framepos_t fr, int sub_num, RoundMode dir); - framepos_t round_to_quarter_note_subdivision (framepos_t fr, int sub_num, RoundMode dir); + MusicFrame round_to_quarter_note_subdivision (framepos_t fr, int sub_num, RoundMode dir); void set_length (framepos_t frames); @@ -564,7 +564,7 @@ private: void recompute_meters (Metrics& metrics); void recompute_map (Metrics& metrics, framepos_t end = -1); - framepos_t round_to_type (framepos_t fr, RoundMode dir, BBTPointType); + MusicFrame round_to_type (framepos_t fr, RoundMode dir, BBTPointType); const MeterSection& first_meter() const; MeterSection& first_meter(); |