Commit graph

18681 commits

Author SHA1 Message Date
Paul Davis
1ab49bcc32 change MidiStateTracker to MidiNoteTracker
The old name will become a bigger class/object that tracks all MIDI state,
not just notes
2022-02-01 18:06:40 -07:00
Robin Gareus
77a60d9e2d
Remove unused API 2022-02-02 00:27:35 +01:00
Robin Gareus
f103b984ab
Fix bounce + callback concurrency
Prevent Session::write_one_track to commence while latency
callback is already in progress. See also
* 19067f8c87
* 2eaa0183ef
2022-02-02 00:27:35 +01:00
Robin Gareus
19067f8c87
Another refinement to address bounce + callback concurrency
see also 2eaa0183ef
2022-02-01 23:49:38 +01:00
Robin Gareus
200469dce8
Remove 18 month old debug messages 2022-02-01 22:01:41 +01:00
Robin Gareus
031a05b07a
Return early if processing is blocked
There is no need to setup thread-local variable
if they are never used.
2022-02-01 21:40:11 +01:00
Robin Gareus
2eaa0183ef
Fix bounce + latency update concurrency
When bouncing Region or Range, Session::write_one_track()
blocks processing, but takes no process-lock.

It is possible that a latency-callback arrives at the same
time while Route::bounce_process is active and calls ::run.

This can trigger a delayline.cc  Assertion `lm.locked ()' failed
in either thread.

Now latency-callbacks are postponed until the session can
process normally again
2022-02-01 21:40:11 +01:00
Robin Gareus
c17fbd5abc
Fix poor_mans_glob, ~' for $HOME' is only valid at the start of a path 2022-02-01 15:47:54 +01:00
Robin Gareus
6f04296635
Expand default clip-library-dir preference at application start
This is in preparation for allowing to use it in Preferences.
Previously it was lazily set when first used.
2022-02-01 15:47:54 +01:00
Paul Davis
8e4fdb071b triggerbox: keep track of, and make available, "empty" status for a triggerbox.
Includes PBD::Signal that notifies when a TriggerBox's empty status changes
2022-01-31 22:40:05 -07:00
Robin Gareus
b55ef8543d
Fix compilation of triggerbox.cc (amend ca6c99586f) 2022-02-01 03:50:23 +01:00
Ben Loftis
2fdf54874a triggerbox: remove unused enable_triggers config var (reverts 21ed6a) 2022-01-31 20:25:05 -06:00
Paul Davis
ca6c99586f triggerbox: minor arithmetic fix to help with clicks at clip end
process_index should not be compared/combined with expected_end_sample, since
the former is a process-cycle count and the latter is a timeline position.
2022-01-31 15:57:13 -07:00
Paul Davis
866ba8b174 playlist: find_prev_region_start() should return zero if no earlier region is found (used during rippling 2022-01-30 22:49:52 -07:00
Robin Gareus
cc426b6d14
Dim text rendered with ShadedPlusSign 2022-01-31 01:58:42 +01:00
Robin Gareus
f4dd5d9a6f
Add folder icon 2022-01-30 22:44:39 +01:00
Paul Davis
d43e2c25bc triggerbox: remove passthru property and everything related.
TriggerBox is always a passthru processor now. Monitoring (or not) is intended
to be controlled via other means
2022-01-30 13:37:52 -07:00
Ben Loftis
4450b5be2c triggerbox: potentially useful comment about the process of slot property-setting
* first the region is scanned for bpm and one-shot status
* then we handle properties that should be applied from a drag&drop
* then we handle the existing arrangement-style slot properties that should persist
2022-01-30 13:44:41 -06:00
Robin Gareus
3689068561
Clip Library support
This allows to export Regions to a shared folder.
2022-01-29 16:22:47 +01:00
Robin Gareus
01d964b176
Do not announce exported MIDI files
This would otherwise trigger ARDOUR::Session::add_source
which will add the external path to as session search location.
2022-01-29 16:22:33 +01:00
Robin Gareus
6dc66ea78f
Prioritize self-deletion
This addresses the issue described in 83719fba1a.
First process all queued self_delete() requests before scheduling
Editor::redisplay_track_views() which uses PRIORITY_DEFAULT.
2022-01-29 05:17:00 +01:00
Paul Davis
c6a31250ba alter Source::_length from timecnt_t to timepos_t
THe length of a Source(File) is always measured from its start. In this sense,
the length is like a position on the timeline, which is a duration with an
implicit origin, or a Region start, also a duration with an implicit origin (in
that case the start of the Source). There is no good reason for using
a timecnt_t for this value, because the position component of a timecnt_t
(the origin for the duration) is implicit and always zero. So we make
this property into a timepos_t, and include a number of asserts() to check
for common possible coding errors related to the time domain
2022-01-28 15:52:27 -07:00
Paul Davis
8e749d7e76 fix length of whole file region for captured MIDI
The length needs to use consistent time domains for duration and position,
and total_capture is a sample count. The "real" length of a whole
file region is the length of its source, so just defer to that.
2022-01-28 11:16:02 -07:00
Robin Gareus
562cb7cb3a
Cancel audition when the backend is stopped 2022-01-28 06:41:37 +01:00
Robin Gareus
b2360a9a0a
Fix process graph changes during audition
Session::process_audition calls Graph::swap_process_chain()
to handle any pending graph changes (notably route removal
depends the graph to switch chains to drop references).

However this must not change the Graph::_trigger_queue
(which is refilled when processing resumes).

Previously routes were added to the trigger_queue, leading to
an inconsistent Graph state. When the terminal-count was reached
the trigger-queue was not empty. Process threads ran after processing
already completed and or concurrently with processing.

A common result of that was:
delayline.cc:70: virtual void ARDOUR::DelayLine::run(ARDOUR::BufferSet&, ARDOUR::samplepos_t, ARDOUR::samplepos_t, double, ARDOUR::pframes_t, bool): Assertion `lm.locked ()' failed.
2022-01-28 06:40:57 +01:00
Robin Gareus
2c9c80ae62
Amend f322c4ded7, clean up includes, fix visibility 2022-01-28 02:29:11 +01:00
Robin Gareus
ec6cd4539d
Implement Region::export()
This adds an abstract API, matching the exiting MIDIRegion::do_export(),
which allows to export multi-channel audio-files.
2022-01-28 01:58:37 +01:00
Robin Gareus
f322c4ded7
Separate sndfile.hh implementation into C++ source
This is required to be able to include
"audiographer/sndfile/sndfile_writer.h" in more than
one source file. which would otherwise lead to
duplicate symbol: AudioGrapher::SndfileHandle::..
2022-01-28 01:52:07 +01:00
Paul Davis
98ad20529b fix loading of regions in older session files
In session file formats earlier than 7000, region position and length
are stored in distinct XML node properties. For 7000 or later, both
position and length are part of the "length" member. Fix reloading
this by noting session file format and loading position and length
more explicitly
2022-01-27 15:36:06 -07:00
Robin Gareus
7eb53828a9
Do not warn about TB sidechain connection when preference is unset 2022-01-27 23:04:30 +01:00
Paul Davis
15bb91cf4f canvas: fixing missing initializer for _scroll_translation in 3rd Item constructor 2022-01-27 14:02:34 -07:00
Ben Loftis
7a3624af6f TriggerBox: copy over a subset of user-settings into a dropped slot using a static variable (@robin) 2022-01-27 13:22:46 -06:00
Ben Loftis
3605f51e7e TriggerBox: trigger_by_id searches the box for a trigger with matching pbd::id 2022-01-27 13:15:27 -06:00
Ben Loftis
63e134097c Session::trigger_by_id finds a trigger from its pbd::id 2022-01-27 13:15:27 -06:00
Paul Davis
15f0e4dbbf triggerbox: fix cue playback and recording
Somewhat alarmed that gcc (at least) allows if (cue_recording ...) to be
used just like if (_cue_recording) even though the former is a class method
and the latter is a class member.
2022-01-27 11:36:04 -07:00
Paul Davis
0dc19a2b31 triggerbox: allow setting of start to work correctly (for audio triggers) 2022-01-26 21:23:40 -07:00
Paul Davis
fdf0c069ca triggerbox: take start offset into account when computing ends 2022-01-26 21:22:40 -07:00
Robin Gareus
729ff35faf
Mark session as modified when stripable order chanes
Previously this was handled by the Editor/Mixer Treeviews,
centralizing it in Session makes more sense.
2022-01-27 01:28:49 +01:00
Ben Loftis
a274c1473a Triggerbox: Preserve some settings when dragging a new clip into a slot 2022-01-26 17:57:55 -06:00
Ben Loftis
b1c04f1108 Triggerbox: Empty slots act as a Stop unless cue_isolated is set (TODO: can we report this to user?) 2022-01-26 17:57:55 -06:00
Robin Gareus
036ad841bf
Remove using namespace Gtk; from headers
This causes issues if the header is included early on
in particular a conflict with gdkx.h
The reference to ‘Window’ is ambiguous `Gtk::Window` vs [X11]Window.
2022-01-26 22:32:28 +01:00
Robin Gareus
c9f40a0bf5
Fix pane size for widgets that explicitly allow 0 size
Amend 1aca71e22b
2022-01-26 22:32:27 +01:00
Ben Loftis
3362f7d4fa Triggerbox: support for files that use a space between bpm value and bpm text 2022-01-26 11:51:08 -06:00
Ben Loftis
efb44fc640 triggerbox: barcnt -> beatcnt (libardour part) 2022-01-26 11:51:07 -06:00
luz paz
364f2f0788 Fix typos in gtk2_ardour/ directory
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sur,te,trough,ue`
2022-01-26 12:35:38 -05:00
Paul Davis
f20966cbad triggerbox: formalize setter/getter methods for Trigger properties
These are all defined via macros now. We send PropertyChange notifications when the value is set
even though it may not yet be in use.

This also changes the std::atomic used to protect the UIState<->Properties interlocking to
unsigned, to get defined behavior when the generation counter wraps
2022-01-26 10:12:13 -07:00
Robin Gareus
1aca71e22b
Fix ArdourWidgets::Pane honor child min-size
This doesn't yet correctly fix Pane::constrain_fract() constraints,
when moving the divider, but it does prevent child widgets from
being allocated with a size smaller than their minimum.

This fixes some layout and rendering issues (widgets that have
a too small allocation are not exposed and/or bleed into neighbors)
2022-01-26 17:24:31 +01:00
Paul Davis
9ac93a4792 triggerbox: sidechain should only process "its" MIDI buffer when looking for events 2022-01-26 07:57:32 -07:00
Paul Davis
a7645022e1 triggerbox; fix i/o configuration of sidechain 2022-01-26 07:57:05 -07:00
Paul Davis
ccf90a9181 triggerbox: change to a CAS-based mechanism for setting UI-controlled properties
UIs only set a "shadow" value of most trigger properties, and use CAS to interlock (contention
is not expected to ever be an issue, it would imply two UIs being used to control this at
precisely the same time. The actual properties are updated whenever the trigger calls ::retrigger()
2022-01-25 18:07:21 -07:00