Commit Graph

192 Commits

Author SHA1 Message Date
Paul Davis 5b2a435e02 getting editor_drag.cc to compile 2021-08-13 12:51:29 -06:00
Paul Davis 9d69fa3820 another day or two's work on timeline type conversion 2021-08-13 12:51:29 -06:00
Paul Davis f4490f54c5 change Timecode::BBT_Time to use Temporal namespace, plus a couple of other minor changes to enable compilation
This still uses the tempo map object in libs/ardour, not the new one in libs/temporal, and isn't likely to be functional
(though it could be)
2021-08-13 12:51:28 -06:00
Ben Loftis 1fb5c443c7 and the 1/128 2021-02-21 07:14:49 -06:00
Paul Davis b146e45df5 make sure that the 1/64ths grid case is covered 2021-02-20 18:37:56 -07:00
Robin Gareus 4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
Ben Loftis 808dc8ad64 new_grid: fix some thinkos in ruler math, to better match sensible grid lines.
Tweak enums to better match the Grid values they represent.
2018-07-27 00:26:21 +02:00
Ben Loftis a699a637e4 Switch CDFrame grid to use MinSec ruler rather than Sample ruler. 2018-02-26 18:52:28 -06:00
Ben Loftis e1b380b302 Rename SMPTE enum back to Timecode. 2018-02-26 18:38:18 -06:00
Ben Loftis 22819b8d2f Fix a rather large naming thinko: GridTypeSamples should be CDFrames. 2018-02-26 17:02:24 -06:00
Ben Loftis dc61256466 new_grid: Rewrite of Snap and Grid. (squashed commit)
Separate Snap from Grid.  Lots of naming changes.
Multiple simultaneous snap options allowed. Grid is one of the possible Snap options.
Grid uses the same data as the rulers.  Replace complicated tempo_lines with simple grid_lines.
The Grid is zoom-scale-sensitive along with the rulers.  If you are zoomed out, grid becomes coarser.
2018-02-09 09:59:39 -06:00
Paul Davis 30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
nick_m 1399ef391d Remove redundant beat arg from TempoMap::add_meter
BBT time should be enough to determine the beat.
2017-07-22 02:15:20 +10:00
Thomas Brand 63ea7b6516 NO-OP whitespace (updated GH PR #357) 2017-07-01 19:28:26 +02:00
nick_m b4ddbce1ff Fix incorrect positioning of tempo line subdivisions if first meter is non-zero
Commit cebefe6 assumed that frame 0 was the music origin.
Silly me.
2017-06-09 11:05:56 +10:00
nick_m cebefe69d9 Tempo lines display subdivisions correctly over a tempo change
TempoMap::get_grid() supplies a list of beat positions, leaving the lines
to work out any subdivision positions.
This is fine, unless a tempo section falls in between beats.
Use a BeatsFramesConverter along with a quarter note position
(in the BBTPointsList) to make this easier.
2017-06-09 01:44:48 +10:00
Ben Loftis 830728aaee compute_bbt_ruler_scale should not be necessary for every redraw of the timeline. Works OK here without it... 2017-03-10 08:50:29 -06:00
nick_m 589c13c0eb allow setting end bpm in new tempo from tempo dialog. 2017-03-07 04:00:38 +11:00
nick_m 5c741b7a07 tempo editing updates
- a tempo marker may now be set to always continue (clamped)
	  this means that the end tempo of the previous section will
	  track the start tempo during tempo ops.
	  it mimics the behaviour in 5.8, with the gui indicating
	  the curves to be changed.
2017-03-05 05:21:56 +11:00
nick_m 4496babc8f initial rework of tempo text display (numbers are curve items)
- move tempo numbers to a layer above the curve.

	- the offset of the text box in Marker is horrible here.
	  what to do?
2017-02-27 20:16:10 +01:00
nick_m 5b38fbab4d fix compilation 2017-02-27 20:16:10 +01:00
nick_m f69f546717 poor man's display of end tempo for ramps. 2017-02-27 20:16:10 +01:00
nick_m 3a7bc1fd3f Tempo Marks : set point colour by discontinuity, display non-quarter pulse if we are non-quarter.
- a jump in tempo by more than 1 ntpm results in a red
	 tempo mark pointer.

	- ignore UIConfiguration::get_allow_non_quarter_pulse()
	  when displaying note type in the marker text (only display
	  note type if we are non-quarter).
2017-02-27 20:16:10 +01:00
nick_m 8e944953c6 highlight the tempo curve that is to be altered, modify text to suit. 2017-02-27 20:16:10 +01:00
nick_m 97c4c2a28c complete changes to tempo type.
- this implements in the intention behind the previous commit.
	  a tempo mark is constant until its end has been changed by a
	  shift-drag on the next marker.
2017-02-27 20:16:10 +01:00
nick_m ccb51a8ddb rework tempo editing.
most changes are due to a new design where tempo discontinuities at the
beginning of a ramped section may be set.
this allows easier mapping of live performance, especially in
the common case of a ramped ritard before the beginning of a new section.

feature summary:

holding constraint modifier (shift) while dragging the BBT ruler area
drags the tempo lines by changing the start tempo (as before)

holding copy modifier (control) while dragging the BBT ruler area
drags the tempo lines by changing the end tempo (ahem. not quite there)

dragging a tempo mark while holding constraint (shift) will change the
previous end tempo to match the marker position *worth trying*.

holding constraint and copy modifier (control + shift) while dragging
the BBT ruler area attempts to'pinch' or twist the surrounding tempi
sp that later ones are not repositioned (currently suffereng from
rounding errors)
2017-02-27 20:16:10 +01:00
nick_m 7b9784fff4 mark session dirty when dragging tempo markers. 2017-01-27 03:05:32 +11:00
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
Paul Davis 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