13
0
Commit Graph

37 Commits

Author SHA1 Message Date
Mads Kiilerich
1e77814c62 MainClock: drop 'primary' parameter
The main clock no longer use direct access to the config system, and
is no longer restricted to know whether it is primary clock or not.
2022-11-20 02:31:22 +01:00
Mads Kiilerich
c805ff5fdf MainClock: introduce change_display_delta_mode signal
Avoid MainClock directly telling the config system which of the
MainClock instances was requested changed through the menu.
2022-11-20 02:29:33 +01:00
Mads Kiilerich
38d7d28b25 MainClock: introduce actual set_display_delta_mode
Make MainClock more self-contained and generic by moving logic from the
Config system and to the class itself, while making the class less aware
of how it is used in the config system.

It is slightly dirty to store the initial AudioClock widget name in
MainClock, but less dirty than having to pass the whole name correctly
every time the delta mode changes.

Also avoid confusing use of 'mode', which in AudioClock is used for the
units/formatting of the clock.
2022-11-20 02:12:40 +01:00
Mads Kiilerich
75f6b8fb66 MainClock: rename fake setter to change_display_delta_mode
We would like to introduce an actual setter, but the most appropriate
name for it was used by something else: the high level callback invoked
when selecting the menu item.
2022-11-20 02:12:40 +01:00
Mads Kiilerich
8f5b7aff3a MainClock: drop absolute_time as an alias for last_when 2022-11-20 02:12:40 +01:00
Mads Kiilerich
728e463d01 AudioClock: make last_when public and use it instead of current_time
Having current_time as a public alias of the private last_when did not
add any clarity to the abstraction of last_time. A small step, but still
room for improvement.
2022-11-17 18:04:08 +01:00
Mads Kiilerich
96d98ba320 AudioClock: drop unnecessary qualification of set_duration
This setter is not virtual.
2022-11-17 18:04:08 +01:00
Mads Kiilerich
8c74099e80 AudioClock: drop unused offset
Recent refactorigns made it dead code. Kill it, even though it seems on
track to something useful ...
2022-11-17 18:04:08 +01:00
Mads Kiilerich
6e9730ad6e
Fix negated origin time in main clock
When selecting "Origin" for the clock, it is expected that it should
work like "Absolute", except measuring from the selected Origin.
Positions to the right of origin should be positive.

However, recently, it got negated. As playback progressed, time got more
and more negative. Fix that by negating again.
2022-11-04 19:18:10 +01:00
45e21de209 implement and adopt new conventions for AudioClock use
The class now has two separate methods for setting a duration or a point
value. They MUST be used appropriately, because their behavior is different.

When ::set_duration() is used in timecode mode, an extent (inclusive-end
length) is shown rather than a length.

Some objects, such as the TimeInfoBox, now deliberately shown an inclusive end
for their "end" clock, but this not universally followed, pending more feedback
from users and investigating of conventions in other DAWs.
2022-10-07 16:24:56 -06:00
7e10061d16
Disambiguate "Meter" use "Time Signature for music meter
In general we should use
* "meter": signal level meter
* "time-signature": music meter / metrum
2022-04-05 18:56:10 +02:00
710c5b9b78 do not use PublicEditor::instance() in MainClock, since these obejcts can exist before the editor
The AudioEngine on the other hand is created in the global libardour init method, so use that instead
2021-11-17 12:16:39 -07:00
5f3ad2cde9 follow new const requirements associated with Meter/Tempo 2021-08-13 12:51:35 -06:00
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
f0d055ad4d more updates for new tempo map API 2021-08-13 12:51:30 -06:00
2a08e4bdaa continued work on timeline types conversion. in theory, just editor_ops.cc remains 2021-08-13 12:51:29 -06:00
1ee38e7a7f another in-progress snapshot of gtk2_ardour after getting audio_clock.cc to compile 2021-08-13 12:51:29 -06:00
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
15150c57c1 Implement clock delta modes
* use new config variable
* update GUI to select delta-modes
* delegate delta-calculation to MainClock
* save offset to calculate absolute-time
2017-11-23 00:13:32 +01:00
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
1a25b906b3 Commence transport tool bar re-layout 2016-12-17 02:43:42 +01:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
nick_m
c9b6e0a7b3 Fix crash when editing meter via main clock. 2016-06-09 06:44:39 +10:00
nick_m
98455f2744 Fix crash when editing tempo via main clock. 2016-06-09 05:54:53 +10:00
nick_m
aad7b129b6 Tempo ramps - rename meter/tempo_section_at() -> meter/tempo_section_at_frame() 2016-05-27 23:38:18 +10:00
6b019a4953 Move UIConfiguration Singleton into UIConfiguration header
This removes the direct dependence on ardour_ui.h from 39 files
2015-09-16 16:55:17 -04:00
6847b59721 Fix crash when clicking on tempo or meter in main clock to edit with no Session 2015-08-18 11:04:49 +10:00
eafb66d001 update some calls to use new get_preferred_edit_position; needs testing 2015-04-21 10:22:28 -05:00
f7a2df1c9a Make editing of meter work at the current position
Add a function TempoMap::meter_section_at(), similar to
TempoMap::tempo_section_at() but returning the meter section at the given
position, and use this to make editing meter changes from the main clock
work on the meter that's in effect at the current position.
2015-03-09 19:17:53 +00:00
99e15d9402 Make left-click on tempo/meter in main clock edit current tempo/meter 2015-03-09 19:17:52 +00:00
760e00b028 Remove useless parameters from MainClock constructor
Remove (always false) duration & is_transient and (always true) editable,
with_info & follows_playhead parameters from MainClock constructor, and just
pass the requisite true & false values along to the AudioClock constructor
instead.
2015-03-09 19:17:52 +00:00
ecd265222a Add/edit tempo/meter change at right position with 'delta to edit cursor'
Find the absolute position of the main clock when 'display delta to edit
cursor' is set when adding/editing tempo/meter changes from the context
menu.
2015-02-12 18:06:16 +00:00
7de6128169 Add tempo and meter editing functions to main clock context menu
Add 'Edit Tempo/Meter' and 'Insert Tempo/Meter Change' to the main clock's
context menu.
2015-02-12 18:06:16 +00:00
64fa63212f move all (G)UI related configuration parameters into UIConfiguration, not RCConfiguration 2014-12-22 13:39:46 -05:00
c08b336292 Fix ambiguous type CheckMenuItem that is also defined via windows.h 2013-07-11 15:32:31 -04:00
09194dcf88 clock-delta mode restore: anticipate toggling set_active callback
git-svn-id: svn://localhost/ardour2/branches/3.0@13439 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-11 18:15:13 +00:00
Carl Hetherington
6624f9be37 Move delta-to-edit-point options to the main clock context menus (#4472).
git-svn-id: svn://localhost/ardour2/branches/3.0@12517 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-31 23:14:03 +00:00