Commit Graph

293 Commits

Author SHA1 Message Date
Robin Gareus 65956407bb
Fix initial display of markers that are glued to BeatTime 2022-06-28 02:55:53 +02:00
Paul Davis e2e6274956 libardour: change API of Session::request_locate() to include "force" argument (GUI edition) 2022-05-27 18:49:23 -06:00
Paul Davis 399a5b3f25 convert use of operator* for tim::line types with ::scale(ratio_t) (GUI edition) 2022-05-27 12:47:44 -06:00
Paul Davis bd3fdaeb67 clean up editor's set_ramped() and set_continuing() code
Now that the libardour methods return bool, we can identify whether or not any
change actually took place, and act appropriately.
2022-05-24 17:10:25 -06:00
Paul Davis d8ba73f542 temporal: change "clamped" terminology to "continuing" (since that's what the GUI calls it) (GUI edition) 2022-05-23 08:07:08 -06:00
Paul Davis 7293904e53 use new TempoCommand when putting tempo map ops into undo/redo history 2022-04-08 11:58:04 -06:00
Paul Davis 883a44e6a4 temporal: TempoMap::use() returns a const ptr to enforce semantics (GUI version)
This commit leaves two issues outstanding:

1. unclear/ugly semantics for drag operations that reset the GUI thread's tempo map to the writable copy
2. undo/redo for the tempo map

These will be addressed in future commits
2022-04-08 11:58:04 -06:00
Ben Loftis 5f0c7fe3d6 move cue-behavior to session config (gtk part) 2022-02-19 11:49:01 -06:00
Paul Davis 17e5667216 triggerbox: use translatable marker name function in GUI 2022-02-11 11:33:43 -07:00
luz paz 364f2f0788 Fix typos in gtk2_ardour/ directory
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sur,te,trough,ue`
2022-01-26 12:35:38 -05:00
Ben Loftis f6813e0749 Ruler Markers: customize the menus for Cue Marks, including a way to change the Cue-ID 2022-01-21 10:13:11 -06:00
Ben Loftis 48c5974b2b Ruler Marker: watch for -my- location cue-id to change 2022-01-21 10:07:48 -06:00
Ben Loftis 85f05eaca5 Ruler Markers: only listen to -this- marker (NameChanged), not all of them (name_change) 2022-01-21 10:04:04 -06:00
Ben Loftis 60cbe57a6e Marker Rulers: changes to match mini-timeline aesthetic
Highlight ruler lanes when you enter, instead of showing many lines
2022-01-20 18:59:21 -06:00
Paul Davis 41ade3b024 add a distinct Marker type enum for cue markers
Plan is to change the shape before this is considered done; for now
it uses the same shape as a regular marker
2022-01-19 09:06:38 -07:00
Paul Davis c916d3d952 Substantial overhaul of tempo display code
Major changes: do not delete and recreate markers and curves for every tempo map
change, attach tempo curves directly to their (preceding) tempo marker, notable
cleanup of TempoCurve class to remove unnecessary members.

More tweaks expected since algorithm for matching markers and tempo map
points is not correct yet.
2022-01-18 19:47:20 -07:00
Paul Davis 0baf0d859d GUI side of cue behavior (makes it available in the ruler context menu) 2022-01-06 12:00:18 -07:00
Paul Davis 7c35783d63 various fixes for cue marker creation, dragging, naming 2022-01-05 13:27:47 -07:00
Paul Davis 73ca08933d fix default naming of cue markers 2022-01-05 13:27:47 -07:00
Paul Davis b1f73d25bf actual GUI interaction for cue marker ruler 2022-01-04 15:23:51 -07:00
Paul Davis 77d83540b1 copy-n-paste addition of cue marker ruler (based on cd marker ruler) 2022-01-04 15:23:51 -07:00
Robin Gareus 3c03e4951e
Use updated temporal API 2/2 2021-12-11 15:51:31 +01:00
Paul Davis fd5594f831 use Editor::reassociate_metric_markers() before performing edits on tempo map
The objects referenced by markers point to the copy of the map held by the per-thread ptr. But
the edits must be done on a writable copy of the map. ::reassociate_metric_markers() fixes
the references to use the writable copy, so that when we pass references to the objects in the map
to the writable copy, it will find them and modify them (rather then ones in the previous
generation of the tempo map)
2021-11-17 12:16:39 -07:00
Paul Davis 2bad9e0a85 do not create timepos_t from timepos_t unnecessarily 2021-08-13 12:51:36 -06:00
Paul Davis 40c29640f5 fix crash when dragging markers 2021-08-13 12:51:36 -06:00
Paul Davis b6f290add2 timeline type changes for new ripple code and post-conflict-resolution fixups 2021-08-13 12:51:36 -06:00
Paul Davis 7938d8de4f fix (some) editing based on tempo & meter marks
After beginning an edit operation with TempoMap::write_copy(), the tempoPoint and meterPoint objects
referenced by markers are incorrect, since they refer to the original map, not the copy we are working
on. Fix this with Editor::reassociate_metric_markers()

Some instances requiring this fix may still remain
2021-08-13 12:51:35 -06:00
Paul Davis ce3fb0507c change return type of Tempo::set_{ramped,clamped} and fix call sites 2021-08-13 12:51:35 -06:00
Paul Davis 5153124664 change (GUI) Marker objects to accept any Canvas::Item as parent, and use this to draw BBT position markers in the BBT ruler 2021-08-13 12:51:34 -06:00
Paul Davis 9d4d3908e6 remove some nutempo #warnings and fix up Location time domain API 2021-08-13 12:51:33 -06:00
Paul Davis 87dfef28f6 allow new locations creation from playhead to use default time domain 2021-08-13 12:51:33 -06:00
Paul Davis 9c1e88e675 remove NUTEMPO #warning (dealt with in caller) 2021-08-13 12:51:33 -06:00
Paul Davis 7e6f0ea2bb remove NUTEMPO warning 2021-08-13 12:51:33 -06:00
Paul Davis eab0bdfde0 fix next set of tempo map changing code blocks to use RCU 2021-08-13 12:51:32 -06:00
Paul Davis 90553b315f fix up memento command use for tempo map undo/redo 2021-08-13 12:51:30 -06:00
Paul Davis 3c00fab75e remove/hide Session::tempo_map() and use TempoMap::use() instead (thread local shared ptr) (GUI edition) 2021-08-13 12:51:30 -06:00
Paul Davis 7ef11dc698 continued work on using new tempo map API (before switch to RCU) 2021-08-13 12:51:30 -06:00
Paul Davis 749a49c278 incorporating new tempo map API 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 1ee38e7a7f another in-progress snapshot of gtk2_ardour after getting audio_clock.cc to compile 2021-08-13 12:51:29 -06:00
Paul Davis 7433bc27e0 intermediate, unfinished snapshot of ongoing timeline types work on GTK GUI 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
Paul Davis 23aa663f9d when doing a ripple-all drag, move relevant markers during the drag too
Note that this is purely GUI-level: the ARDOUR::Locations are changed at the end of the drag
in Editor::ripple_marks()
2021-08-13 12:51:28 -06:00
Paul Davis 537b8ff12d fix crash when context-clicking on a region/source cue marker 2021-06-27 22:13:54 -06:00
Paul Davis 3047b25527 split out region marker actions to their own submenu; implement remove and clear all 2021-05-18 20:59:37 -06:00
Paul Davis 60a972a7de implement region marker deletion 2021-05-18 18:01:38 -06:00
Paul Davis bd2d8b8c87 tweak Editor remove-marker APIs to set state for removing region cue markers 2021-05-18 16:50:55 -06:00
Paul Davis 91ec860b3b redesign color mgmt when entering/leaving markers of various kinds 2021-05-18 16:17:37 -06:00
Paul Davis 1685843082 global marker objects do not need a canvas height, so remove member and API to manage it
They extend (down) from an origin to COORD_MAX. The height is irrelevant
2021-05-14 18:37:50 -06:00
Paul Davis ac53a9bbf8 remove unnecessary 2nd argument from Session::request_locate() calls (default value is identical) 2021-05-03 17:40:41 -06:00
Robin Gareus 39334279b5
LAN for ranges 2021-04-13 00:10:38 +02:00
Paul Davis 187e2521fb remove debug message 2020-07-05 18:08:58 -06:00
Paul Davis 1ceb153037 fix "Loop Range" in marker context menu 2020-07-05 17:48:16 -06:00
Paul Davis 47767738b9 rename DoTheRightThing to RollIfAppropriate 2020-01-18 08:49:18 -07:00
Paul Davis 3c00048b0c Session::request_locate() takes a tri-valued second argument for "roll-after-locate"
This allows callers to defer logic about auto-play/current rolling state and more to TransportFSM where it
can be cnentralized and is less ambiguous
2020-01-18 08:49:18 -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
Robin Gareus e8284def1f
Fix marker context-menu (bug missed in 12a415f07) 2019-03-12 15:45:32 +01:00
Robin Gareus 12a415f077
Cleanup Editor/Marker context-menu
This could have caused crashes previously:
::build_range_marker_menu() may have created range_marker_menu
while the GUI wanted transport_marker_menu.
2019-03-07 23:50:46 +01:00
Robin Gareus 98439cf88c GUI to set clock-origin marker 2017-11-23 00:13:44 +01: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 2925fd52e5 Rework tempo marker editing menu functions
Setting a tempo to 'Continue' via right click puts it in a permanent state
of continuing the previous section's end tempo (basically what
'Lock Continue' should have been). This can be disabled (unlocked) by
selecting 'Don't Continue'.

Remove the previous temporary 'Continue' function.

Reorganise menu to separate position lock style from more commonly
used functions.
2017-07-22 02:15:20 +10:00
nick_m 33c06fd3ca Indicate musical position lock style of regions and locations using BEAMED EIGHTH NOTES in name
Also attempt to indicate lock type with symbols CROSS OF JERUSALEM and
LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR
2017-07-22 02:15:20 +10:00
Robin Gareus 1f5ebc5485 Remove ArdourPrompter wrapper 2017-07-17 21:06:04 +02:00
Thomas Brand 63ea7b6516 NO-OP whitespace (updated GH PR #357) 2017-07-01 19:28:26 +02:00
Paul Davis b4346862e1 context click on marker > loop range should set loop range 2017-05-11 13:16:07 +01:00
Robin Gareus 962e7a214a Revert "consistent use of context-menu popups"
This reverts commit b3722f7063.

In some cases ardour shows context-menu on right-mouse-button
release. In this case selecting a menu-entry should happen
with the left-mouse button (or any button?!)

Using ev->button is only correct if the menu is temporary and only
visible while the button is held, button release then activates the
menu-item.

This needs further work, in some cases allowing any button (0) to work
makes sense and overall consistency needs to be improved.
Different places use different strategies for context-menus which
don't always match the button used in the event-handler.

This is a hotfix (to make TAV context menus work again with left-click)
2017-03-24 14:48:46 +01:00
Robin Gareus b3722f7063 consistent use of context-menu popups 2017-03-16 02:36:48 +01: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 38b5d88795 allow continuation of tempo via right-click 'Continue' where appropriate.
- this is the opposite of 'Ramp to Next'.
	  it removes discontinuities between the
	  last end tempo and the current by altering the current one.
2017-03-01 01:58:53 +11:00
nick_m 25d78ef306 only allow 'ramp to next' if the next tempo is actually different. 2017-02-27 20:16:10 +01:00
nick_m f41748803a remove commented line 2017-02-27 20:16:10 +01:00
nick_m bb8b229a1e fix tempo marker ramp to next. 2017-02-27 20:16:10 +01:00
nick_m 663d0e1743 add right-click 'Ramp to Next' tempo marker menu item. 2017-02-27 20:16:10 +01:00
nick_m c9387055e4 remove "Make Ramped" from right click tempo marker menu. 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
Paul Davis 3d3f2a79f6 use leave/enter from track canvas to be the primary driver of region action sensitivity
This works for context menus also, because GTK sends us leave/enter notify
events when they appear.
2017-02-15 20:07:49 +01:00
nick_m 0938b6a9c1 add undo for changing marker lock style from menu 2017-01-27 03:39:33 +11:00
nick_m d0580ecfbc allow all types of range location (loop, start, end etc.) to be glued to bars and beats. 2016-12-29 01:39:31 +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 34e41a3ca6 rename MetricSection movable -> initial, but of course initial is !movable.. 2016-12-12 02:07:00 +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 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
Paul Davis cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04: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 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 2d3d7a5355 Tempo ramps - fix ambiguous api, fix flickering tempo curves. 2016-05-27 23:38:16 +10:00
nick_m 37ed0f6e9b Tempo ramps - restore correct drag behaviour wrt audio-locked meters and right-click of associalted tempo 2016-05-27 23:38:15 +10:00
nick_m e0607ca913 Tempo ramps - add gui dilation of tempos.
- a meter can be dragged using the constraint modifier, which
	  sets the previous tempo accordingly.
	  This could be added to the bbt ruler to allow direct dragging
	  of beats and bars, but the exact behavior of that is still
	  undecided. comments?

	- also preliminary work on the necessary tempos locked to
	  audio-locked meters.
2016-05-27 23:38:15 +10:00
nick_m 4f8fa6787a Tempo ramps - add undo to right-click lock style & ramp type changes. 2016-05-27 23:38:15 +10:00
nick_m eb70cdce1f Tempo ramps - don't set incorrect lock style when changing tempo type.
- fixes random crashes when changing tempo type with right click.
2016-05-27 23:38:15 +10:00
nick_m b6afce7173 Tempo ramps - ok so you really do need to redisplay when tempo lock style is changed.. 2016-05-27 23:38:15 +10:00
nick_m f0955aeb57 Tempo ramps - redraw correctly when changing meter lock style. 2016-05-27 23:38:15 +10:00
nick_m c6a66f1014 Tempo ramps - redraw after setting tempo type (ramped, constant) from context menu.
- not needed for lock style change.
2016-05-27 23:38:15 +10:00
nick_m 85c3284adc Tempo ramps - add some right-click options to meter and tempo markers. 2016-05-27 23:38:15 +10:00
nick_m cb43d485fa Tempo ramps - another approach to first meter/tempo.
- first tempo is glued to first meter position as they are now
	  both locked to AudioTime.
	- all existing audio-locked tempos to the left of the first meter
	  are made inactive. all to the right are made active.
2016-05-27 23:38:12 +10:00
Paul Davis 6991a07902 remove all trace of SAE from source code.
This had become incoherent over time, and posed a development hazard and burden going forward
2016-02-22 15:31:24 -05:00
Robin Gareus 22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
Paul Davis 621fd845e6 Revert "add new action and loop marker menu item for setting up loop record"
This reverts commit ebb43508f1.
2015-09-28 17:44:04 -04:00