Commit Graph

165 Commits

Author SHA1 Message Date
nick_m
2ca06335f7 amend 4cb009058 (if newly active tempo became last it had no curve) 2017-01-07 03:39:24 +11:00
nick_m
4cb0090583 fix some inactive tempi bugs
- no tempo curve for inactive tempi

	- inactive and meter-locked tempi cannot be deleted.
2017-01-07 01:12:09 +11:00
nick_m
27b95300e2 add frame parameter for Meter ctor and TempoMap::replace_meter(). allow for various failures. 2016-12-19 04:02:01 +11:00
nick_m
9c5e1ffb0d sort tempo curves initially as well. 2016-12-12 02:07:00 +11:00
nick_m
782b28a1a8 amend previous commit 2016-12-12 02:07:00 +11:00
nick_m
dbbe65777f fix flickering in tempo curve when markers are reordered. 2016-12-11 23:46:49 +11:00
nick_m
33e95a1577 rename Tempo _beats_per_minute to _note_types_per_minute, provide pulse helpers.
- adds quarter_notes_per_minute(), note_divisions_per_minute (double)
	  pulses_per_minute() and frames_per_quarter_note()

	- this should be a no-op except for the use of tempo by
	  the vst callback which definitely uses quarter notes per minute.

	- the XML node for TempoSection named 'beats-per-minute'
	  has been renamed.
2016-11-11 03:37:08 +11:00
nick_m
ac23496b40 MidiRegion _start/_length beats are frame based only when lock style is Audiotime 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
949dd8245d Add a colour for music-locked meters. 2016-08-20 04:33:51 +10: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
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
nick_m
99653ae2ca Simplify Editor::mouse_add_new_meter_event() a bit. 2016-07-10 02:18:38 +10:00
nick_m
0bdbe56cf1 Stop passing references to things that may disappear when a metric section is replaced. 2016-07-10 02:18:37 +10:00
nick_m
180445c18c Indicate meter frame even when adding a music-locked meter from the gui. 2016-07-10 02:18:37 +10:00
nick_m
8b0c5b8426 Register colour aliases for tempo curve. 2016-06-16 02:06:40 +10:00
nick_m
b3b246b724 Pick a colour for music-locked tempo markers. 2016-06-13 04:27:53 +10:00
nick_m
34c9ac9dd7 Tempo ramps - rename bbt_time() -> bbt_at_frame(), frame_time() -> frame_at_bbt() 2016-05-27 23:38:17 +10:00
nick_m
8f3bc6f809 Tempo ramps - rename tempo_at() -> tempo_at_frame().. 3 decimals for the audioclock tempo display. 2016-05-27 23:38:17 +10:00
nick_m
a9921c10eb Gd Lk ramps - rework auto scaling. change colour. 2016-05-27 23:38:17 +10:00
nick_m
1927a707c5 Tempo ramps - fix huge marker height mark, remove unused var. 2016-05-27 23:38:17 +10:00
nick_m
6309807bc7 Tempo ramps - rename for consistency, remove some testing code, add meter based bbt->pulse conversions. 2016-05-27 23:38:17 +10:00
nick_m
8b2f73d5ac Tempo ramps - rework tempo drags, improve comments. 2016-05-27 23:38:17 +10:00
nick_m
f182235410 Tempo ramps - consolidate TempoMap::predict_tempo() 2016-05-27 23:38:17 +10:00
nick_m
d1a075110a Tempo ramps - more code cleanup, fix cross-marker jumping using tempo dialog bbt 2016-05-27 23:38:17 +10:00
nick_m
074db3b861 Tempo ramps - more code consolidation wrt add meter/tempo. 2016-05-27 23:38:16 +10:00
nick_m
82d876b48b Tempo ramps - clean up add/replace tempo 2016-05-27 23:38:16 +10:00
nick_m
cfbc42cd3a Tempo ramps - ensure displayed grid extends beyond the leftmost frame. 2016-05-27 23:38:16 +10:00
nick_m
2d3d7a5355 Tempo ramps - fix ambiguous api, fix flickering tempo curves. 2016-05-27 23:38:16 +10:00
nick_m
058b781258 Tempo ramps - tempo marker's mark indicates curve height ar point. 2016-05-27 23:38:16 +10:00
nick_m
5ccfeea5bc Tempo ramps - more bbt dragging work.
- display prev tempo and tempo at mouse while dragging
	- simplify ramp dilation somewhat.
2016-05-27 23:38:16 +10:00
nick_m
86b0268e8b Tempo ramps - add visualtempo curve, dragging bbt or music rulers with constraint modifier dilates previous tempo. 2016-05-27 23:38:16 +10:00
nick_m
105999956e Tempo ramps - remove unused var. 2016-05-27 23:38:15 +10:00
nick_m
06f294fa18 Tempo ramps - prevent adding tempos before the first tempo. 2016-05-27 23:38:15 +10:00
nick_m
932c7b07fd Tempo ramps - adding a new tempo doesn't involve a dialog. 2016-05-27 23:38:15 +10:00
nick_m
663814bf22 Tempo ramps - tempo marks use mvc-style copy drag, don't crash if two successive ramped tempos are the same :| 2016-05-27 23:38:14 +10:00
nick_m
3d07cd79e1 Tempo ramps - api change, remove some code. 2016-05-27 23:38:13 +10:00
nick_m
69b6379b23 Tempo ramps - pressing constraint modifier keys during tempo drag changes tempo with vertical movement, incorporating beat constraint (if present).
- makes it easy to find suitable accelerandos for hit points in conjunction
	  with playhead position, beat-locked tempos and initial meter frame.
2016-05-27 23:38:12 +10:00
nick_m
33e98186e4 Tempo ramps - small bug fixes/cleanup. 2016-05-27 23:38:12 +10:00
nick_m
58d4889ad3 Tempo ramps - music-locked meters now use beats rather than pulses as their reference.
- fixes many problems with a non-zero audio-locked first meter.
2016-05-27 23:38:12 +10:00
nick_m
b47bb55226 Tempo ramps - improve music-locked meter drags, improve dump().
- dump now shows cross-calculation of tempo positions.
2016-05-27 23:38:11 +10:00
nick_m
f16089ba88 Tempo ramps - allow moving the first meter if audio locked.
- strangely broken wrt the grid, but kind-of works.
2016-05-27 23:38:11 +10:00
nick_m
278ad73259 Tempo ramps - check for impossible locations tempo dialog bbt entry. reorganise code. 2016-05-27 23:38:11 +10:00
nick_m
989089a4e9 Tempo ramps - add method to handle beat-based tempo reordering. clean code. 2016-05-27 23:38:11 +10:00
nick_m
77abc08d6f Tempo ramps - fix crash-causing locking errors. clean up code a bit. 2016-05-27 23:38:10 +10:00
nick_m
474784c8ba Tempo ramps - setting bbt of an audio-locked tempo marker in the tempo dialog works. 2016-05-27 23:38:10 +10:00
nick_m
b8b6d562a4 Tempo ramps - restore bbt settings in tempo dialog for audio-locked tempo markers
- see comments
2016-05-27 23:38:10 +10:00
nick_m
c7ff67004a Tempo ramps - fix messed up meter section state, audio-locked tempos ignore the bbt setting in the tempo dialog for now. 2016-05-27 23:38:10 +10:00
nick_m
bc42dea451 Tempo ramps - first stab at metric marks locked to frames or beats.
- pretty much untested.
2016-05-27 23:38:10 +10:00