Commit Graph

38208 Commits

Author SHA1 Message Date
Robin Gareus 4c1db67957
Speed up building Lua doc 2023-09-22 16:28:03 +02:00
Alexandre Prokoudine 34c40e0a44 Update Russian translation, Part 2 2023-09-22 12:38:29 +02:00
Violet Purcell 8aa716d437
Backport VST3 libc++ fix on linux
LLVM libc++ does not have the ext/atomicity.h header. This fix is copied
from the upstream vst3_pluginterfaces repo.

Signed-off-by: Violet Purcell <vimproved@inventati.org>
2023-09-22 04:41:11 +02:00
Alexandre Prokoudine 22e15b135e Update Russian translation, Part 1 2023-09-22 04:38:32 +02:00
Paul Davis c642611fe8 fix crash in ghostregions after adding notes but not invalidating optimization iter (#9452) 2023-09-21 16:26:59 -06:00
Robin Gareus 0633254820
macOS: Allow altool to use either @keychain to @env
see also b59e1f936d
2023-09-21 21:15:55 +02:00
Robin Gareus 0a1ab716a1
Try to track down abort() reported by Nathan
This should have had a `fatal` message like other
all abort() calls.
2023-09-21 20:49:36 +02:00
Paul Davis 40b5af144c macos: fix find predicate order to actually exclude MIDI files from codesign 2023-09-21 07:11:56 -06:00
Paul Davis b59e1f936d macos: change password method for altool from @keychain to @env 2023-09-21 07:11:38 -06:00
Paul Davis 0d8e783d25 macos restore inclusion of media files, but skip codesigning for all MIDI files (there are too many) 2023-09-21 07:02:38 -06:00
Paul Davis ad7bcd2ebe temporal: add clarification on why the non-ramped ::quarters@superclock is so complex 2023-09-20 13:38:15 -06:00
Mads Kiilerich c5e7e5c4df pbd: clarify int62_t comments 2023-09-20 12:51:52 -06:00
Mads Kiilerich 3478acfcf9 temporal: clarify timepos_t and timecnt_t comments
It tooke me a while to get an understanding of this. It might also be
helpful to others to make the description more explicit.
2023-09-20 12:51:52 -06:00
Mads Kiilerich d2c48debd1 temporal: drop timecnt_t "origin" as alias for "position"
The alias was only used when it was exposed in lua. It was without any
indication that it was a deprecated alias, but let's just bite the
bullet and get rid of it.
2023-09-20 12:51:52 -06:00
Mads Kiilerich cbcb7b1ce2 temporal: refactor to expose superbeat tech debt
A group of functionality was only used once, in
TempoPoint::quarters_at_superclock . Keep things simple and enable
further refactoring and cleanup by inlining everything and dropping
superbeat, big_numerator and super_note_type_per_second from Tempo.

The use of big_numerator right next to superclock_ticks_per_second
seems error prone. It should perhaps just be refactored to work in
superclock domain all the time.

It seems weird that the ramped case is much simpler than the non-ramped.

This (pretty much) removes the last references to "superbeat", which
I thus doesn't have to understand ;-)
2023-09-20 12:51:52 -06:00
Mads Kiilerich e5ec516611 temporal: drop unused superclocks_per_ppqn
superclocks-per-pulses-per-quarter-note is too meta to have any actual
use.
2023-09-20 12:51:52 -06:00
Mads Kiilerich 40bf4ce82d temporal: drop nused note_type_as_beats
The note_type_as_beats was the only temporal thing using hardcoded value
of 1920. It seems like it just should use the usual Ardour PPQN (aka
ticks_per_beat) ... which also has the value 1920.

It is however not used after d77db816de.
2023-09-20 12:51:52 -06:00
Mads Kiilerich 368f0aec44 temporal: minor comment fixes
Some typos and copy editing to remove a (pretty much) duplicated chunk.
2023-09-20 12:51:52 -06:00
Mads Kiilerich 69c5c6e1e8 temporal: drop old tempo-experiment.h 2023-09-20 12:51:52 -06:00
Mads Kiilerich f244972b5a temporal: simplify DEBUG_EARLY_SCTS_USE
There is no need for scts_set now. "Early" use of SCTS will just give the
value 0. DEBUG_EARLY_SCTS_USE can thus just check that
_superclock_ticks_per_second doesn't have the initial value of 0.
2023-09-20 12:30:53 -06:00
Mads Kiilerich f3aedc55d9 temporal: fix superclock DEBUG_EARLY_SCTS_USE
If DEBUG_EARLY_SCTS_USE somehow was set, compilation would fail because
of includes inside a namespace.

(Even without DEBUG_EARLY_SCTS_USE, any early use of superclock will
probably fail clearly with division by zero. There is thus not much need
for DEBUG_EARLY_SCTS_USE now.)
2023-09-20 12:30:53 -06:00
Mads Kiilerich 91314b68a5 temporal: always use Temporal::reset() for superclock and TempoMap default values
Make sure all code paths that use Temporal will initialize and reset it
properly. Some code paths (in tet runners) doesn't use Sessions, so
Temporal::reset() has to be invoked directly.

Just set the static superclock variable to 0 as initial value.
TempoMap will still be initialized early as a singleton, but we
introduce a new constructor so it is created empty (and thus not really
usable until Temporal::reset() or similar has populated it).

We can thus drop the static initialization of superclock. The default
superclock rate of 282240000 will now only live in Temporal::reset().

With this change there should no longer be any uninitialized use of
superclock_ticks_per_second(), and there should not be any problems for
DEBUG_EARLY_SCTS_USE to catch. (It is however broken in other ways -
that will be fixed next.)
2023-09-20 12:30:53 -06:00
Mads Kiilerich 622876c8ab temporal: reset global superclock rate when creating a new session
The superclock rate is variable and is stored in session files since
7.0 . It is set globally when reading from a session file, and it really
should be reset to a known state whenever a new blank session is
created from an existing one. Currently, that doesn't happen. We fix
that by resetting it in Temporal::reset().

For now, we are duplicating the default superclock rate 282240000 from
superclock.h , but we can drop that when all code paths that use
superclock also use Temporal::reset().

This will provide an (extra) guarantee that
set_superclock_ticks_per_second() always is invoked before creating
TempoMap or using superclock_ticks_per_second() in other ways. The
DEBUG_EARLY_SCTS_USE in superclock.h is thus closer to passing.
2023-09-20 12:30:53 -06:00
Mads Kiilerich 80ffa58c81 temporal: introduce Temporal::reset() with TempoMap initialization
Ardour uses some global variables and singletons. These global variables
can be initialized with a value prior to program execution (especially
if they are const), but some of the static variables are modified, and
it is crucial that they always are reset when switching to another
session. To keep things simple and explicit and consistent, we thus
introduce Temporal::reset() to reset TempoMap (and later on also the
superclock rate). This is somewhat similar to Temporal::init(), which
usually only is invoked once (on program start) to initialize singletons
(such as the TempoMap).

9964f20c added TempoMap initialization to Session::create() ... but only
when not using a template. This create method is mainly preparing the
filesystem for a new session, and TempoMap initialization doesn't seem
like a perfect fit for it. It also seemed odd that it only initialized
TempoMap for clean new sessions, while existing sessions and templates
initialized it elsewhere.

Instead, invoke the TempoMap initialization early in the Session
creation process. This might introduce an extra and unnecessary TempoMap
initialization when loading an existing session or using a template, but
that will be cheap and do no harm, while providing a guarantee that we
always use the same default value.
2023-09-20 12:30:53 -06:00
Mads Kiilerich 226ff63e3c temporal: avoid using superclock in Editor::initialize_canvas before creating the session
cb78043adc "Indicate selection extents in time ruler" introduced use of
superclock before it has been set. But as it only is used at time 0, the
actual superclock doesn't matter. Still, we work around it in order to
avoid triggering any warnings of uninitialized use.
2023-09-20 12:30:53 -06:00
Mads Kiilerich 51333165e8 session: clarify comment about reading sample rate from templates 2023-09-20 12:30:53 -06:00
Paul Davis d91930b53c macos: temporarily exclude media files from packaging 2023-09-20 10:55:29 -06:00
Robin Gareus b3f26354a9
New Session dialog, reorder folder/timebase options
This keeps the folder option next to the filename.
Which is handy when using Tab to move focus.
2023-09-20 00:31:33 +02:00
Paul Davis 2f502b28c7 temporal: fix weird typo in tempo map cut/copy code 2023-09-19 14:16:18 -06:00
Paul Davis 50a4ad4470 on windows and macos, disable translation by default 2023-09-19 14:16:18 -06:00
Robin Gareus f715640aeb
Initialize uninitialized variable
Fixes crash when mapping files cannot be found of read.
2023-09-19 18:28:00 +02:00
Robin Gareus b18533119b
Fix "Branch condition evaluates to a garbage value"
in PBD::RingBuffer, vec.buf[1] is not set when vec.len[1] == 0
2023-09-19 18:25:31 +02:00
Robin Gareus 6edbc21929
NO-OP: whitespace 2023-09-19 06:18:21 +02:00
Paul Davis d7bbc9078f another instance where we should use timecnt_t::set_time_domain() 2023-09-18 21:10:30 -06:00
Paul Davis 727b666c18 NOOP: reformat comment 2023-09-18 19:57:37 -06:00
Paul Davis 1344851912 fix Region::set_position_internal() to use TempoMap provided conversions
rolling our own beat<->audio conversion code here was doomed to fail.

this fixes the absurd length of a consolidated region.
2023-09-18 19:56:06 -06:00
Paul Davis 5122036054 startup: fix use-after free of startup FSM object
In some startup flows, the entire loading process happens inside
StartupFSM::start(). In others, that call gets things moving but
we return from it and loading is not complete until later.

Deleting the StartupFSM while still inside the ::start() call
led to a use-after-free error. This new code will leak the StartupFSM
in some startup flows.
2023-09-18 16:27:11 -06:00
Paul Davis bc91ea3c42 startup: fix logic/design error that led to deep errors
The old state in this commit would lead to an existing session
being loaded with the claim that it was a new session. This went
unnoticed until 4bed642d71, where newness impacted the time
domain of the session (and actually led to it being set to a random memory
value).
2023-09-18 16:27:11 -06:00
Paul Davis 9dd50d4536 provide an easy way to get core dumps with address sanitizer
The options to make this work are quite long and hard to remember. So just set
ASAN_COREDUMP and adev_common.sh.in will take care of it for you
2023-09-18 16:27:11 -06:00
Robin Gareus f5fabb595a
Section operations need to use audio-time
cut/copy section does copy the tempo-map, so copying
a 4 Bar MIDI section will be 4 Bars after the paste.

This does not work the other way around:
With a tempo-map, 4 bars may correspond to 10 seconds
at the source position. While 4 bars at the target
position may correspond to a different audio-time
duration. This can lead to gaps or overlaps.
2023-09-18 17:14:40 +02:00
Paul Davis 6a8946a746 NOOP: whitespace fix 2023-09-17 20:38:34 -06:00
Paul Davis 75e12993c6 temporal: fix grid generation in trivial case (1 tempo, 1 meter at zero)
We need to do the same "round up to bar/beat" trick that we do when we reach a BBT
marker
2023-09-17 20:38:23 -06:00
Holger Dehnhardt 6bcf0c2d74 Make it C++11 compatible 2023-09-17 11:29:47 -06:00
Hoger Dehnhardt 0e759d5523 Console1 - refine channel selection 2023-09-17 11:29:47 -06:00
Hoger Dehnhardt 827f61ad58 Console1: add shift operations for plugins 2023-09-17 11:29:47 -06:00
Hoger Dehnhardt e22a0eb1db add options to swap mute and solo and to create mapping stops 2023-09-17 11:29:47 -06:00
Hoger Dehnhardt 7634c4936c Store mappings as XML 2023-09-17 11:29:47 -06:00
Hoger Dehnhardt ac00b4a0bb fix plugin selection 2023-09-17 11:29:47 -06:00
Hoger Dehnhardt 4dd58961d2 Enable controlling of plugin 2023-09-17 11:29:47 -06:00
Hoger Dehnhardt 835598c802 Console1: Add plugin interface 2023-09-17 11:29:47 -06:00