13
0
Commit Graph

20808 Commits

Author SHA1 Message Date
b8a330c1bf lpp: fix more "eclipse induced" stupidity 2023-10-14 11:20:57 -06:00
7028450ea0 fix LPPro crash if device is not present 2023-10-14 10:20:05 -06:00
1d6c2a946d second attempt at fixing the launchpad pro port name mess
It turns out that slightly older versions of ALSA create different "pretty"
port names for USB MIDI devices than slightly newer ones. The new versions
use names that match those seen on other platforms.

This means that to do port matching on Linux now requires a regexp
to match the possible alternatives. This matters much more for the LPP,
which has 3 input ports and 3 output ports, than it does for most devices
that have a single input and single output, and we can "find" the ports
just using simple string searching
2023-10-13 21:16:27 -06:00
Nils Philippsen
c90dc9a647
Deal with kissfft >= 130
The kissfft library changed its SONAME and how the various libraries
were organized, e.g. the functions for complex and real numbers aren’t
in separate libraries anymore.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2023-10-13 22:01:32 +02:00
da4d16b1f2 launchpad pro: remember to destroy GUI to avoid use-after-free in its connection handler 2023-10-13 09:47:22 -06:00
e61c1f6993 launchpad pro: use regexes more extensively to find ports to connect to
Hopefully this works for ALSA, Windows and macOS, whereas the previous version worked only
for JACK1
2023-10-12 21:19:21 -06:00
4f2c86f670 enforce time domains for region trims 2023-10-09 11:19:22 -06:00
c5b2c4432e
Fix tracing internally connected MIDI ports
MIDI track A -> MIDI track B
The data on Track B's input is not available at cycle-start.
2023-10-07 22:43:27 +02:00
a5712d1f85 remove comment referring to glue-to-time-domain 2023-10-07 13:16:08 -06:00
bebe6587a2 tweak launchpad pro port name for probe to be x-platform 2023-10-07 11:43:07 -06:00
afe74bb460 use Meter::round_to_bar() rather than BBT_Time::round_(up|down)_to_bar
this gives slightly better behavior when dragging a meter marker
2023-10-07 11:11:31 -06:00
64458c2430 prevent meter changes being dragged "through" a BBT marker
might want to do this for tempo drags too
2023-10-07 11:11:31 -06:00
ec34c2137d avoid a crash when dragging a meter change near a BBT marker 2023-10-07 11:11:31 -06:00
bdd0fda188 remove debug output 2023-10-06 17:08:28 -06:00
26eed327ad amend 405574184 with correct lock scope and do not hold state 2023-10-06 17:07:44 -06:00
405574184a use a RegionWriteLock while modifying Playlist region list in ::region_bounds_changed 2023-10-06 16:17:12 -06:00
d95179f571
NO-OP: remove unused, unimplemented functions 2023-10-05 21:56:42 +02:00
eba00287cd fix SNAFU with ordering of adding stripables and selecting them
when Session emits RouteAdded, each handler (editor, mixer, trigger pages etc) will
execute their callbacks in order. But Editor::add_routes() selects the routes too,
which triggers a PresentationInfo::Change signal. This is received by e.g. the Mixer
before it has even found out about the newly added stripables. This in turn
leads to severe confusion regarding the state of the selection in the mixer,
and potentially elsewhere.

So, just add a PresentationInfo::ChangeSuspender for the scope of the RouteAdde
signal emission
2023-10-05 12:57:16 -06:00
cd1d83f366 reintroduce a fake XML "active" property for Tempo to allow 7.x to load 8.x sessions 2023-10-05 11:22:38 -06:00
John Emmas
14973bd894 Simplify the MSVC / superclock change which should now be compatible with all compilers 2023-10-05 14:01:32 +01:00
62416ee276 remove unnecessary argument from Playlist::shift() 2023-10-04 18:50:42 -06:00
c3b881327c
Possible fix for MSVC build 2023-10-05 01:50:37 +02:00
49cb4a1f33
Revert "Fix superclock init on Windows"
This reverts commit febc345414.
2023-10-05 01:50:36 +02:00
febc345414
Fix superclock init on Windows
Static global symbols on windows (even identical symbols) are
not mapped to the same address when mixing .dll + .exe.

see also d3cd621f7a
2023-10-04 23:34:40 +02:00
0e3cf0454c
Yet another plugin parameter automation time-domain fix
see also fded5063d9
2023-10-04 21:45:06 +02:00
7f2637fa96
Fix find_next_event return value in case no music-time event is found 2023-10-04 21:45:03 +02:00
0c3791117c remove much debug output associated with tempo map copy/pasta, et al. 2023-10-04 08:37:26 -06:00
9ace3c6d56
Remove debug messages (VST2 bypass feature) 2023-10-04 16:26:24 +02:00
c7745ffd43
Double check our assumptions when merging MIDI 2023-10-04 15:12:31 +02:00
923e6a554e
Fix MIDI combine (#9466)
Initially thew new region has a length of zero (0:0). When
merging Notes from a truncated region (no explicit note-off)
those notes are lost:
"Stuck note resolution - end time @ 0:0 is before note on: @ 0:0"

Truncate (or split) a region so that a note is cut short:
```
  Region [{<--Note-------->}]
```
becomes
```
  Region [{<--Note--]
                    ^ implicit note-off at region boundary
```

When combining this region with an empty Region after gap,
```
  Region [{<--Note--]  [    ]
```
the result should be
```
  Region [{<--Note->}       ]
```

For this reason, even without a gap between the regions,
the original note length must not be restored.
The result MUST NOT be the same as the original:
```
  Region [{<--Note-------->}]
```
2023-10-04 15:10:06 +02:00
94562a0238
Fix typo in Lua documentation 2023-10-04 14:34:41 +02:00
2b0bb54599
Update LuaState API (4/4)
Now that all calls use explicit parameters, we can remove
the default params, and make ::sandbox() private
2023-10-04 02:50:44 +02:00
6b3f25eb2a
Update Lua instances (2/4)
This is effectively a NO-OP.
2023-10-04 02:48:26 +02:00
7c10a54334
Prepare for explicit Lua Sandboxing (API update) 1/4 2023-10-04 02:46:58 +02:00
Krzysztof Gajdemski
7e7337aa61 Update Polish translation 2023-10-04 01:09:24 +02:00
364c892c68 remove debug output 2023-10-03 11:13:57 -06:00
f53ff625d1 commit to BeatTime as the most likely desired session timebase 2023-10-02 14:48:44 -05:00
cda1f12845 Update Russian translation 2023-10-02 11:00:05 +02:00
dfd44c2ebf
Fix 3-point edit undo/redo #9464
Playlist::split can result in removal of a region
(adding two others instead). In this case the state
of the removed region (if modified) is not saved.
2023-10-02 03:13:31 +02:00
afa295d4af
Unset playlist's TimeDomain Parent when deleting Track
This fixes a heap-use-after-free, when deleting a Track
and then doing a 3-point edit which iterates over all
playlists.
2023-10-02 01:57:07 +02:00
f6d60abda8 remove debug output 2023-10-01 13:26:53 -06:00
6c68817b26 add a user config var for preferred time domain (libardour part)
(as opposed to default_time_domain which is the per-session default)
2023-10-01 13:57:28 -05:00
cd99fed7cd canvas: add PolyItem::clear() 2023-09-30 11:09:58 -06:00
ff021b83d3 libardour: add Region::absolute_time_to_source_time() 2023-09-30 11:09:58 -06:00
b89dd73324 NOOP: no need for virtual keyword here 2023-09-30 11:09:58 -06:00
243f40e10d fix unset-looping-because-monitoring-input (#9458) 2023-09-28 16:52:35 -06:00
c4f6385d22
Fix playlist partitioning when mixing time domains 2023-09-27 22:15:25 +02:00
9651a2c2e2 region groups: more fixes for Duplicate operations 2023-09-27 11:06:40 -05:00
72761734e8 region groups: more fixes for drag-copy and range-paste operations 2023-09-27 11:06:40 -05:00
40a9ba746e
Freeze plugin cache version
This allows to copy existing VST2/3 cache files to
a new major version
2023-09-27 17:28:20 +02:00
John Emmas
ea8742b030 #include <sys/utime.h> when building with MSVC 2023-09-27 09:36:26 +01:00
947e6c7815
I/O Plugins: fix a heap-use-after-free
I/O plugin Controls are destroyed with ~IOPlug, however
Session::destroy()'s call to drop_references() still
triggers AutomationControl::session_going_away() on the
binding proxy.

This is even properly documented in session_object.h:

> A named object associated with a Session. Objects derived
> from this class are expected to be destroyed before the
> session calls drop_references().
2023-09-27 02:22:22 +02:00
e79ca8f9ba
Copy plugin cache with old config 2023-09-27 02:22:22 +02:00
6494214622
Add option to prefer file timestamps with recursive copy 2023-09-27 02:22:22 +02:00
7f453cab9e
Allow to query cache-dir by major version
Luckily "cachename" parameter was unused, so this API
can be changed.
2023-09-27 02:22:22 +02:00
245aac887b
Fix saving patch-change channel undo/redo commands 2023-09-26 05:32:57 +02:00
0a6ac2678a canvas: if LineSet does the 0.5 pixel shift, make it the right direction 2023-09-25 20:01:21 -06:00
5fa5c5d202 canvas: NOOP fix comment about docs on single pixel lines 2023-09-25 19:52:10 -06:00
bc78694a1a canvas: fix bounding box of a LineSet (lower edge was not lower enough) 2023-09-25 19:51:33 -06:00
496957efdf
Fix layering when copy/pasting regions (1/2)
Playlist::add_region, Playlist::add_region_internal always
adds the region to the top of the playlist, ignoring the
region's layer.

Note that there is also difference between
Region::layer and Region::layering_index.
2023-09-25 22:36:27 +02:00
300de26b3e
Fix XML read error when creating new export profiles
Previously creating a new preset first attempted to load
it from disk, before creating it. This resulted in a
`XML error: failed to load external entity`.
2023-09-25 22:36:24 +02:00
JungHee Lee
f9da85639d
Update ko.po 2023-09-25 18:56:56 +02:00
5082dc62a4
Copy more old config files from v7 to v8 2023-09-25 17:21:10 +02:00
6db28ef08d remove debug output 2023-09-24 15:01:04 -06:00
Martin Vlk
5ec2c9ed4d
Czech translation updated for the 8.0 release. 2023-09-24 19:57:25 +02:00
Violet Purcell
6e24a409f4
Use <atomic> instead of <stdatomic.h> in libc++ fix
The definitions from <stdatomic.h> conflict with <atomic>, which causes
a build failure since <atomic> is included previously.

Signed-off-by: Violet Purcell <vimproved@inventati.org>
2023-09-23 23:53:05 +02:00
616273cfab temporal: slightly tweak DEBUG_TRACE output 2023-09-22 22:54:53 -06:00
14e7f62891 fix BBT_Time::round_up_to_beat_div() (partially)
Math is now correct for cases where "beats" in BBT are quarters.
Incorrect for others
2023-09-22 22:54:37 -06:00
1c2cd78f41 Revert "temporal: fix superclock time used to find relevant tempo & meter"
This reverts commit b192eea65a.
2023-09-22 15:35:40 -06:00
e2f6241dd6 temporal: NOOP whitespace 2023-09-22 15:35:39 -06:00
1cdfe2aa2f temporal: actually iterate 2023-09-22 15:30:31 -06:00
b192eea65a temporal: fix superclock time used to find relevant tempo & meter 2023-09-22 15:30:20 -06:00
d6565cce77 temporal: NOOP whitespace 2023-09-22 15:18:27 -06:00
d282c317d0 temporal: use new BBT variant of get_tempo_and_meter() 2023-09-22 15:18:27 -06:00
a89108c9af temporal: removed #if 0'ed old code 2023-09-22 15:18:27 -06:00
374283cc3f temporal: provide a new variant of ::get_tempo_and_meter() for BBT time
This one is more complex than the Beats or superclock variants, because
we cannot just start from the front of the map. Instead, we have to
first iterate through the map so that we start the code in
_get_tempo_and_meter<...> from the TempoPoint and MeterPoint
in effect at the BBT_Argument's reference time.
2023-09-22 15:18:27 -06:00
3aacbc453e temporal::remove version of get_tempo_and_meter() that was never used 2023-09-22 15:18:27 -06:00
8e3e78c116 temporal: optimize common case for ::get_tempo_and_meter() 2023-09-22 15:18:27 -06:00
8c2bf116f5 fix crash when using OSC in a session with no master bus and no stripables selected 2023-09-22 15:18:27 -06:00
a37f4e194d
Remove redundant RegionGroupRetainer
Track::use_captured_midi_sources is called from use_captured_sources().
which is only called from DiskWriter::transport_stopped_wallclock(),
which is only called from Session::non_realtime_stop().
2023-09-22 18:29:11 +02:00
0a12986639
Preserve existing region-group relationships
This solves several issues related to splitting or pasting regions, when
there is more than one layer.

Rather than assign a new group-id for "all the regions on the right of a
split", only ions that had a *prior* group-relationship should be
propagated into the new group.

Signed-off-by: Robin Gareus <robin@gareus.org>
2023-09-22 18:21:34 +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
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
51333165e8 session: clarify comment about reading sample rate from templates 2023-09-20 12:30:53 -06:00
2f502b28c7 temporal: fix weird typo in tempo map cut/copy code 2023-09-19 14:16:18 -06:00
50a4ad4470 on windows and macos, disable translation by default 2023-09-19 14:16:18 -06:00
f715640aeb
Initialize uninitialized variable
Fixes crash when mapping files cannot be found of read.
2023-09-19 18:28:00 +02:00