nick_m
9674b15358
more documentation in tempo.cc, fix constant bug in pulse_at_tempo_locked()
2016-11-11 03:37:08 +11:00
nick_m
1fa7c0d829
remove remaining frame api from TempoSection.
2016-11-11 03:37:08 +11:00
nick_m
594137f5cc
remove public pulse methods from TempoMap.
...
- the only object whose musical position is not expressed in
quarter notes is MetricSection.
there is now no need to expose this.
2016-11-11 03:37:08 +11:00
nick_m
3db68b4f9e
add some documentation for TempoMap.
2016-11-11 03:37:08 +11:00
nick_m
0e867b544b
Refactor tempo api, include quarter-note distance in frames method.
...
- moves frame rounding up to TempoMap, which is needed
in order to calculate pulse distance without frame rounding.
- the time unit for tempo is still minute, but this now also
applies to meter sections. (new audio locked meter sections no
longer require a frame position).
- there is no longer a discontinuity
in the pulse for audio-locked meter/tempi.
- temporarily add debugging output in Region::set_position()
to test for region beat not matching region frame.
2016-11-11 03:37:08 +11:00
nick_m
715b178130
Improve bbt ruler drawing performance for large time ranges.
...
- when the timeline displays many bars, zoom/autoscroll
speed is improved by calculating the bbt ruler scale first
then requesting a suitably scaled grid.
2016-10-19 03:56:43 +11:00
nick_m
3a0a628a75
Rework duration clock and TempoMap::insert_time to include meter at offset.
...
- should fix 7072
- also fixes scroll behavior over multiple tempi.
2016-10-16 02:33:49 +11:00
nick_m
2f72b42385
TempoSection methods deal in beats rather than pulses per minute.
...
- removes note type from curve function for a slightly more
accurate result.
2016-10-09 03:46:50 +11:00
nick_m
af289cab62
Remove unused methods, add tests to ensure meter divisors don't mess with Beats.
...
- TempoMap::framepos_minus_beats() was only used by its test,
so don't build the test.
2016-10-02 03:55:18 +11:00
nick_m
c26636b0ec
Fix locking bug in tempo map.
2016-10-01 10:19:38 +10:00
nick_m
74a604d261
Fix the tempo note-type hallucination.
...
- after reports that a tempo with non-4.0 note type
would produce a ramp in the preceding section, an incorrect
assumption was made leading to a bogus 'fix' that redefined
Tempo's pulses_per_minute().
the real fix was simple:
the ramp's function constant was calculated using the note type
of the proceding tempo rather than the current one.
- this patch reverts e82482e8e9 and a4d67279e0
and maintains the old definition of Tempo::pulses_per_minute()
2016-09-05 16:28:46 +10:00
nick_m
dd7c0cca6c
Sanity check for TempoMap::get_grid ()
2016-09-04 04:19:34 +10:00
nick_m
d50df82799
Fix various paste errors in tempo.cc. Should fix recent regressions.
2016-09-03 01:22:41 +10:00
nick_m
46858a2925
Consolidate the meaning of beat divisions.
...
- bar and beat snapping is BBT beat based while other
music divisions are quarter note based. Reflect this in
the way exact_beat/qn is calculated.
2016-09-02 05:10:32 +10:00
nick_m
4a953174c3
Attempt to clarify tempo map comments.
2016-09-01 04:01:29 +10:00
nick_m
d05bfa7206
Revert 894cdb6f5c.
...
- once again we snap to BBT beats when snapping to 'beat'.
2016-09-01 02:43:29 +10:00
nick_m
894cdb6f5c
Snap to beat snaps to quarter note.
2016-09-01 01:35:53 +10:00
nick_m
b2190cc4ff
TempoMap::pulse_at_frame() handles separated musical sections as per beat_at_frame().
2016-08-31 23:12:11 +10:00
nick_m
e82482e8e9
Fix incorrect inclusion of note_type in Tempo::pulses_per_minute().
2016-08-31 23:12:11 +10:00
nick_m
11a68f7dd3
Amend f3c0c1a865 (Add quarter-note position methods).
2016-08-31 23:12:11 +10:00
nick_m
395183ee7b
Add quarter-note position methods to TempoMap.
2016-08-31 23:12:11 +10:00
nick_m
88f723e8d8
Tempo marker movement snaps to the future grid, rather than the current one.
...
- fixes jittery tempo movement when snapping within large gradients.
2016-08-24 03:38:46 +10:00
nick_m
9a66e1e2c6
Round to bar correctly in TempoMap::exact_beat_at_frame_locked().
2016-08-24 03:23:04 +10:00
nick_m
b243af48c7
Add methods for plugin APIs to obtsin quarter pulses ('beats' for AU) from the tempo map.
2016-08-18 05:36:24 +10:00
nick_m
4848cb6d42
Enforce rounding to beat as >= 0.0
2016-08-16 00:43:08 +10:00
Robin Gareus
f77d1e0a36
Don't call any Transmitter from realtime context
...
This fixes a crash when TempoMap::bbt_at_frame_rt() is called
for a latent effect at position 00:00:00:00 and frame is < 0.
2016-08-14 00:47:03 +02:00
nick_m
5c2ccc4f3e
Allow negative return in TempoMap::beat_at_frame() and its exact_ variant.
...
- audio-locked midi regions can be start-trimmed properly
when close to 1|1|0
- a midi region placed before the first meter
will continue the tempo curve and first meter.
Only a couple of callers require change, as bbt_at_beat() already
deals with this.
2016-08-14 03:04:53 +10:00
nick_m
4ddb6b74f5
Allow -ve framepos handling in TempoMap::framepos_plus_beats()
...
- also handles frame positions previous to the initial
meter (beat_at_frame() would return 0 in this case).
2016-08-10 00:48:53 +10:00
Robin Gareus
eec294a97e
the endless quest to plug memory leaks -- episode 378
2016-07-25 17:16:32 +02:00
nick_m
5f2ee3328f
Fix stored type confusion in Meter/TempoSection::get_state().
2016-07-18 02:58:59 +10:00
Paul Davis
cf52d6e4b4
enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
2016-07-14 14:45:23 -04:00
Robin Gareus
140258d8ab
remove reference "const int32_t&" -> const int32_t"
...
this simplifies lua-bindings and also let's the compiler worry about
constant primitive types.
2016-07-10 15:30:41 +02:00
nick_m
33dab757ee
Tempo map updates.
...
- cleanup audio-locked meter removal code
- recompute and warn if map is left unsolved due to adding a metric
- handle corner case wrt overlapping audio-locked musical sections.
2016-07-10 02:18:38 +10:00
nick_m
49159e9585
Fix long-standing spelling bug.
...
- should be a no-op.
2016-07-10 02:18:37 +10:00
nick_m
7a6f8abc1d
Fix missing tempi recompute, improve adding meter/tempo failure.
2016-07-10 02:18:37 +10:00
nick_m
828cb52f86
Fail properly when adding a new audio locked meter's tempo.
2016-07-10 02:18:37 +10:00
nick_m
f4ec7f12d1
Fix broken meter manipulation in exact_beat.
2016-07-10 02:18:37 +10:00
nick_m
4bdbe77414
Avoid the use of dynamic_cast in TempoMap for performance improvement.
...
- review / comment would be appreciated here.
2016-07-10 02:18:37 +10:00
nick_m
8e99b59af5
Make TempoMap::bbt_at_frame() more efficient.
...
- should be a no-op
2016-07-10 02:18:37 +10:00
nick_m
c6f2095fb7
Improve the performance of TempoMap::frame_at_beat ().
...
- should be a no-op
2016-07-10 02:18:36 +10:00
nick_m
2d5238d875
Make some musical operations on music-locked regions operate in beats.
...
- use exact beats to determine frame position.
- see comments in tempo.cc for more.
- this hasn't been done for split yet, but dragging and
trimming are supported.
2016-07-10 02:18:36 +10:00
nick_m
bcf683df00
Fix exact tempo pulse for snap to bars case.
2016-06-12 03:26:02 +10:00
nick_m
24f64b3ea7
Make exact beat calculation of tempi a bit less cumbersome. Move tempi on an audio basis for non-musical snap.
2016-06-12 02:46:13 +10:00
nick_m
e973e39f06
Set tempo sections to the exact pulse when snapped to a musical grid.
2016-06-12 00:42:43 +10:00
nick_m
ae99b93cc2
Apply some constraints to bbt dragging.
...
- max tempo 1000 bpm
- apply a minimum measurement distance.
- ensure result is positive (!)
2016-06-10 11:45:40 +10:00
nick_m
260a0ca12c
Amend last commit.
2016-06-10 01:14:08 +10:00
nick_m
e05b0862b5
Audio locked meters with an existing tempo may be dragged past that tempo's location.
2016-06-10 01:07:25 +10:00
nick_m
8de12a4015
Possible fix for memory pool problem in session click.
2016-06-09 05:16:38 +10:00
nick_m
b4a020cdf5
Fix ignored note_type in TempoMap::frames_per_beat_at().
2016-06-05 07:10:06 +10:00
nick_m
829c257f45
Make TempoMap::framepos_plus_beats() & TempoMap::framepos_minus_beats() more correct.
2016-05-30 11:03:45 +10:00