Commit Graph

12987 Commits

Author SHA1 Message Date
Ben Loftis f53ff625d1 commit to BeatTime as the most likely desired session timebase 2023-10-02 14:48:44 -05:00
Alexandre Prokoudine cda1f12845 Update Russian translation 2023-10-02 11:00:05 +02:00
Robin Gareus 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
Robin Gareus 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
Paul Davis f6d60abda8 remove debug output 2023-10-01 13:26:53 -06:00
Ben Loftis 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
Paul Davis ff021b83d3 libardour: add Region::absolute_time_to_source_time() 2023-09-30 11:09:58 -06:00
Paul Davis b89dd73324 NOOP: no need for virtual keyword here 2023-09-30 11:09:58 -06:00
Paul Davis 243f40e10d fix unset-looping-because-monitoring-input (#9458) 2023-09-28 16:52:35 -06:00
Robin Gareus c4f6385d22
Fix playlist partitioning when mixing time domains 2023-09-27 22:15:25 +02:00
Ben Loftis 9651a2c2e2 region groups: more fixes for Duplicate operations 2023-09-27 11:06:40 -05:00
Ben Loftis 72761734e8 region groups: more fixes for drag-copy and range-paste operations 2023-09-27 11:06:40 -05:00
Robin Gareus 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
Robin Gareus 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
Robin Gareus e79ca8f9ba
Copy plugin cache with old config 2023-09-27 02:22:22 +02:00
Robin Gareus 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
Robin Gareus 245aac887b
Fix saving patch-change channel undo/redo commands 2023-09-26 05:32:57 +02:00
Robin Gareus 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
Robin Gareus 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
Robin Gareus 5082dc62a4
Copy more old config files from v7 to v8 2023-09-25 17:21:10 +02:00
Paul Davis 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
Robin Gareus 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
Ben Loftis 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
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 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 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
Paul Davis 50a4ad4470 on windows and macos, disable translation by default 2023-09-19 14:16:18 -06: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 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
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
Mads Kiilerich f1bb18ae53 wscript: drop unused path_prefix
It is not referenced anywhere, and also not set consistently.
2023-09-17 07:34:55 -06:00
Mads Kiilerich d220f477ed wscript: drop unused "mandatory variables" 'top' and 'out' in libs
Variables by these names are only used from the local wscript and when
running "waf configure", which already for other reasons only can run at
the top-level.

These variables are thus not mandatory and not used.
2023-09-17 07:34:55 -06:00
Mads Kiilerich 69e987909e wscript: inline top = '.' for build_i18n
'top' was a constant that was set to '.', even when inside
subdirectories. It is thus not really top.

I don't know if the intent was to use the actual top (which is available
as bld.top_dir), but for now we make it explicit what we have and do.
2023-09-17 07:34:55 -06:00
Mads Kiilerich 2e367de4f0 wscript: drop unused imports, manual
Manual fix of pyflake warnings:
libs/ardour/wscript:3:1 'waflib.Tools' imported but unused
wscript:9:1 'waflib.Build.Context' imported but unused
2023-09-17 07:34:55 -06:00
Mads Kiilerich 7737c17d52 wscript: drop unused imports, scripted
Done with ad hoc scripting hacks processing unused imports found by pyflakes:

for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Logs.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^import waflib.Logs as Logs,/import/g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/import waflib.Options as Options, /import /g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^from waflib import Options,/from waflib import/g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep ' imported but unused$' | sed "s/^\([^:]*\):[0-9]*:[0-9]* '\(.*\)'.*/\1 \2/g" | while read f lib; do sed -i "/^import $lib$/d" $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import Options$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.TaskGen.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import TaskGen$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Task.Task.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Task import Task$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Tools.winres.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Tools import winres$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Utils.* but unused' | cut -d: -f1 | while read f; do sed -i '/^import waflib.Utils as Utils$/d' $f; done
2023-09-17 07:34:55 -06:00
Edgar Aichinger 9aaf5d2c8c
update german translation 2023-09-17 14:20:33 +02:00
Ben Loftis 8ba74e2a51
Add an argument to move markers during tempo-map 2023-09-14 23:13:11 +02:00
Paul Davis 73d559056e partial Route::set_state() calls with a MementoCommand should not reset processor state (#9434) 2023-09-14 07:49:13 -06:00
Paul Davis d44c9787b6 MIDI tracks: split immediate events into ardour- and user-generated
This now allows the already-apparently possible recording of user-input from the kbd
in the MIDI track header to actually be successful
2023-09-13 23:58:31 -06:00
Robin Gareus 810da43be6
Safeguard `stripable_list_to_control_list` API
See also 976e03c15c which does this for `route_list_to_control_list`.
Fix crashes with empty route-lists e.g. momentary solo which was
introduced in 03105aa760.
2023-09-13 00:28:57 +02:00
Robin Gareus c625e13a6f
Reduce clutter when loading session with loop range
```
  ARDOUR::TransportFSM::process_events()
  ARDOUR::TransportFSM::enqueue(ARDOUR::TransportFSM::Event*)
  ARDOUR::Session::process_event(ARDOUR::SessionEvent*)
  ARDOUR::SessionEventManager::merge_event(ARDOUR::SessionEvent*)
  ARDOUR::Session::queue_event(ARDOUR::SessionEvent*)
  ARDOUR::Session::request_locate(long, bool, ARDOUR::LocateTransportDisposition, ARDOUR::TransportRequestSource)
  ARDOUR::Session::auto_loop_changed(ARDOUR::Location*)
  ARDOUR::Session::set_auto_loop_location(ARDOUR::Location*)
[...]

```
2023-09-11 20:25:28 +02:00
Ben Loftis e99305c4dd add enumeration type for SnapTarget
this defines how the grid interacts with other snap targets (ph, etc)

* Grid: we ignore other snap targets when the grid is enabled
* Both: we snap to both grid and other snap-targets when grid is enabled
* Other: we only snap to other snap-targets and ignore the grid, even
    though the grid is enabled
2023-09-11 12:18:15 -05:00
Paul Davis c7e5f38aa5 remove debug output 2023-09-11 10:26:54 -06:00
Paul Davis 4eb58e104c remove double-macro'ed debug of undo history; use nullptr
Also, prefer early return to conditionalized function body
2023-09-11 10:26:54 -06:00
Paul Davis 511c3ef048 remove debug output 2023-09-10 18:20:35 -06:00