Commit Graph

12032 Commits

Author SHA1 Message Date
luz paz 3d395585c1
Fix various typos
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sord,sur,te,trough,ue`  
Follow-up to 364f2f078
2022-04-08 19:51:02 +02:00
luz paz 59320b378f
wscript: fix 'testing equality is none' issue
ref: https://lgtm.com/rules/7900090/
2022-04-08 18:27:10 +02:00
Edgar Aichinger 77fe1c6d32
amend previous commit 2022-04-08 18:17:27 +02:00
Edgar Aichinger 55988b5456
retranslate corrected sourc strings/finish german translation at current state 2022-04-08 18:17:27 +02:00
Edgar Aichinger 13c8af3620
libs/ardour part of german translation 2022-04-08 18:17:27 +02:00
Paul Davis f8dc6d93ec constification: clean up final warning
This explains why we use const_cast<>. We also fix a logic error that
crept in here, in which a source might have its state saved twice
2022-04-07 15:13:30 -06:00
Paul Davis 04d34c4061 constification: use const_cast to resolve a CONSTIFICATION warning 2022-04-07 11:27:46 -06:00
Paul Davis 7bf89ce109 Constification: make Stateful::get_state() const, with all other required const-ness added (libs) 2022-04-06 21:56:59 -06:00
Paul Davis 9e69c0d184 make use TempoMap::fetch() in RTproc threads more explicit
This also places the call in a more optimal location, right after it is woken
because there is Route processing to be done
2022-04-06 21:56:59 -06:00
Paul Davis c0eb86b586 hide debug iteration inside #ifdef 2022-04-05 20:52:10 -06:00
Paul Davis 8410161ae2 remove debug output 2022-04-05 20:52:10 -06:00
Paul Davis fc731419c5 fix potentially incorrect use of strncpy(3) when copying URI for ladspa preset 2022-04-05 20:52:10 -06:00
Paul Davis 55752ed8b7 NOOP: blank line deletion 2022-04-05 20:52:10 -06:00
Paul Davis 1be72e7a4e NOOP: whitespace for alignment in argument list 2022-04-05 20:52:09 -06:00
Paul Davis 3321ae74ab missing changes to MidiAutomationListBinder header file related to 4bc9f9319c014e 2022-04-05 20:52:09 -06:00
Paul Davis 892b7b9772 use correct header includes to handle temporal enum conversions 2022-04-05 20:52:09 -06:00
Paul Davis bbfb1bd229 MidiRegion: take reader lock before cloning data into new source 2022-04-05 20:52:09 -06:00
Paul Davis 718b3fcfa9 no need for enable_shared_from_this<> in MidiSource 2022-04-05 20:52:09 -06:00
Paul Davis bc38f8d424 MidiSource: change thread mutual exclusion object from Mutex to a RWLock
This allows two reader threads to proceed without blocking each other, as can
happen when the butler renders a MIDI track into an RT-safe buffer while the
GUI reads the same MidiModel/Source for visual display.
2022-04-05 20:52:09 -06:00
Paul Davis 1686db8b0c Change the type of reference held by a MidiModel to its MidiSource
This also requires a change in the type of reference held by
a MidiAutomationListBinder.

Both the MidiSource and MidiModel have a reference to each other, and it is
important that we avoid circular references to avoid problems with object
destruction. We had been accomplishing this by having the Model hold a
weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel
are coincident and there's really no need to use a smart ptr at all. A normal
reference is just fine. However, due to constructors that accept a serialized
state, we cannot use an actual reference (we cannot set the constructor in the
initializer list), so we use a bare ptr instead.

This forces a similar change in MidiAutomationListBinder, which also maintains
a reference to the Source. However, the only purpose of this object is to
ensure that if the Source is destroyed, relevant commands will be removed from
the undo/redo history, and so all that matters here is that the binder connects
to the Destroyed signal of the source, and arranges for its own destruction
when received.

Note that the previous construction of the binder, actually holding a
shared_ptr<MidiSource> would appear have prevented the Destroyed signal from
ever being emitted (from ~Destructible), and so this may also be a bug fix that
allows MidiSources to actually be deleted (the memory object, not the file).
2022-04-05 20:52:09 -06:00
Paul Davis 54597bd803 change the type of reference held by a MidiModel to its MidiSource
This also requires a change in the type of reference held by
a MidiAutomationListBinder.

Both the MidiSource and MidiModel have a reference to each other, and it is
important that we avoid circular references to avoid problems with object
destruction. We had been accomplishing this by having the Model hold a
weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel
are coincident and there's really no need to use a smart ptr at all. A normal
reference is just fine. However, due to constructors that accept a serialized
state, we cannot use an actual reference (we cannot set the constructor in the
initializer list), so we use a bare ptr instead.

This forces a similar change in MidiAutomationListBinder, which also maintains
a reference to the Source. However, the only purpose of this object is to
ensure that if the Source is destroyed, relevant commands will be removed from
the undo/redo history, and so all that matters here is that the binder connects
to the Destroyed signal of the source, and arranges for its own destruction
when received.

Note that the previous construction of the binder, actually holding a
shared_ptr<MidiSource> would appear have prevented the Destroyed signal from
ever being emitted (from ~Destructible), and so this may also be a bug fix that
allows MidiSources to actually be deleted (the memory object, not the file).
2022-04-05 20:52:09 -06:00
Paul Davis 3454353aa3 remove concept of "note-mode" from Evoral::Sequence (and thus ARDOUR::MidiModel)
This note-mode had no effect on anything at all, at least as far back
as 5.12. There is a note-mode in the GUI which affects the duration of notes
added using the GUI, and that remains in place. It is not clear
if the _percussive member of Evoral::Sequence ever had any effect on
the actual MIDI event stream the Sequence could generate.
2022-04-05 20:52:09 -06:00
Paul Davis e0fa447d29 NOOP: whitespace and multiline -> one line changes 2022-04-05 20:52:09 -06:00
Robin Gareus a946046532
Add API to copy Biquad parameters
This is handy for stereo or higher-order plugin configurations,
the coefficients have to be calculated only once.
2022-04-02 19:10:08 +02:00
Robin Gareus b411eeb74e
Fix crash when exporting multiple timespans with MIDI tracks
::start_audio_export() may be called from a background thread
which does not yet have a thread-local TempoMap.

Track::seek() calls ARDOUR::AudioPlaylist::read()
which calls Playlist::regions_touched_locked() which may require
a TempoMap to calculate overage with Temporal::Beats
2022-04-01 21:41:30 +02:00
Robin Gareus 8c7157df6c
Ignore LD-environment for mp3 im/export
This fixes mp3 export on Linux/ARM (Raspberry Pi) with
system-wide dynamically linked ffmpeg. Otherwise the there
would be library conflicts with ardour-bundled libz and libcairo.
2022-04-01 18:19:59 +02:00
Robin Gareus 82d491cb80
Allow to unset LD_LIBRARY_PATH on exec
This is useful when using distro-packaged video-tools
(e.g. on Linux/ARM), or when running post-export commands.
2022-04-01 18:19:55 +02:00
Robin Gareus 66a3d727cd
Process rt-tasks (resample ports) in parallel (again).
This was changed to single-thread execution in
in bd229936ec
and likely accidentally committed.
2022-03-31 21:51:28 +02:00
Damien Zammit 6bbe684304 import_pt: Simplify region to track mapping
This allows regions to be correctly imported to their
actual track number now that they are numbered from zero
without any gaps by ptformat, removing the need for a lookup table.
2022-03-29 19:02:19 +11:00
Robin Gareus d841b13673
Fix moving automation with region
This issue was introduced in
eae9d276fe
by using the incorrect new nutempo methods for the case at hand.
2022-03-28 19:39:45 +02:00
Robin Gareus 3f37d54d85
Fix path to user-clip library
This is only used when the path is initially unset (`@default@`),
existing config paths are left as-is.
2022-03-28 18:55:27 +02:00
Robin Gareus edc94c5213
VST3: allow to query presets via PluginInfo
This fixes an issue with the mixer-sidebar treeview
not listing VST3 user-presets.
2022-03-22 04:06:31 +01:00
Ben Loftis ea4a6f6215 triggerbox: d+d: follow count should be carried over as part of the arrangement 2022-03-21 12:07:43 -05:00
Ben Loftis 333e19a2cf triggerbox: patch_changes must also use the ui_state API 2022-03-20 15:36:07 -05:00
Ben Loftis 8cba60bfd4 triggerbox: used_channels must use ui_state API (see prior commits) 2022-03-20 15:36:07 -05:00
Ben Loftis 1b08fa1581 triggerbox: commenting the ui_state process 2022-03-20 15:36:07 -05:00
Ben Loftis ca94b63a55 triggerbox: allow-patch-changes should use DIRECT_SET 2022-03-20 15:36:07 -05:00
Ben Loftis 1a3b82a12e triggerbox: TRIGGER_DIRECT_SET should also set ui_state
bugfix: changing the FA state can overwrite the clip's name and color

Some params (like gain) can and should take effect immediately
by directly setting the properties.  TRIGGER_DIRECT_SET does that.
But we still, ALSO have to set the ui_state, because when the
triggerbox imports ui_state via update_properties() it will
overwrite your changes.

Said another way:  since we use a queued ui_state to set the properties,
you ALWAYS have to set and use the ui_state mechanism, even if you want
to short-circuit the process for specific properties.
2022-03-20 15:36:07 -05:00
Robin Gareus 40744c672a
Fix VST2 callbacks querying tempo-map
Some VST2 use a custom thread to make callbacks, in this case
the corresponding thread will not have fetched a thread-local
tempo-map.
2022-03-20 15:42:47 +01:00
Robin Gareus 6bcc0163cd
Fix VST3 processor refcount
This fixes an issue with JUCE plugins remaining alive
after closing the session (and causing issues at exit).
see also 789949ed8e
2022-03-20 15:42:43 +01:00
Ben Loftis 0aabdc0849 remove errant stacktrace 2022-03-19 17:00:09 -05:00
Paul Davis 9f91747ac5 triggerbox: improve speed of TriggerBox::fast_forward() and handle a couple of logic errors
Having identified the trigger that will be running at a given transport position, we determine its effective
length (not necessarily its own length) and last start, then "jump" forward to the next-earliest start
point prior to the transport position. This greatly reduces the amount of actual audio processing we
need to do to prepare the trigger to run in sync at the transport position.

This commit also adjusts the targetted transport position by the processor's playback offset, so that
it is correctly prepared to run() once the transport starts again.

Logic errors when using cue-isolated or empty triggers were also fixed.
2022-03-19 15:25:14 -06:00
Paul Davis a4459ebf9c avoid double-locates when locate-while-rolling
We know when we call non_realtime_stop() if we will be subsequently
locating. If so, do not do an additional non_realtime_locate() from
within the stop.
2022-03-17 17:43:43 -06:00
Paul Davis a803dd0df8 superclock_ticks_per_second: use an (inline) accessor, change value
We do not want a value as large as the previous one, which limits the time
range that can be represented in 62 bits unnecessarily. The new value is
9 times smaller than the previous value, and loses only 384000 as a significant
factor.

This commit also switches to using an (inline) accessor for superclock_ticks_per_second,
making it possible in debug/testing phases to spot early/illegal uses of the value.
2022-03-17 14:15:59 -06:00
Paul Davis e72cff4ab1 triggerbox: reset all trigger states when locating/stopping
We also exclude anything from happening during TriggerBox::run() while locating/stopping
is taking place.
2022-03-17 12:20:34 -06:00
Paul Davis 2b630c4887 triggerbox: add TriggerBox::dump() to check trigger states 2022-03-17 12:20:34 -06:00
Paul Davis 1af0e7cc4f triggerbox: provide ::shutdown_from_fwd() method
This does the internal shutdown of a Trigger that is shared between
a normal shutdown and when stopping for a locate/stop. There's no
output to buffers possible.

This method/design may need to change if/when we add declicking for
various conditions
2022-03-17 12:20:34 -06:00
Paul Davis 1cc8a3f92c extend Session API to provide ::transport_locating() 2022-03-17 12:20:34 -06:00
Ben Loftis 13da06feb9 triggerbox: remove debug messages 2022-03-16 11:21:29 -05:00
Robin Gareus e603b2e12d
Remove debug messages (1/2) 2022-03-16 17:08:14 +01:00