13
0
Commit Graph

21780 Commits

Author SHA1 Message Date
0a36cdedac
Add missing include (fix windows builds) 2024-10-19 04:46:35 +02:00
74c4ca3e52
Reduce reliance on boost - the hard part
the rest from `tools/convert_boost.sh`.

* replace boost::function, boost::bind with std::function and std::bind.

This required some manual fixes, notably std::placeholders,
some static_casts<>, and boost::function::clear -> = {}.
2024-10-19 03:47:21 +02:00
ff95d81612
Reduce reliance on boost - the easy part
* boost::unordered_map -> std::unordered_map
* BOOST_STATIC_ASSERT/static_assert
* BOOST_FOREACH -> for
* boost::tuple -> std::tuple/g
* boost::math::isnormal -> std::isnormal
* boost::container::set -> std::set
* boost::none -> std::nullopt
* boost::optional -> std::optional
2024-10-19 03:41:16 +02:00
168b917730
Prepare for std::optional 2024-10-19 03:40:04 +02:00
8eb9263af2
Replace boost::format with PBD::string_compose 2024-10-19 03:39:57 +02:00
Alejandro Domínguez
2436b4df06
Replace boost::noncopyable with C++11 deleted copy constructors 2024-10-19 01:04:15 +02:00
Alejandro Domínguez
915200699b
Replace boost::lexical_cast with std equivalent functions 2024-10-19 01:04:15 +02:00
Alejandro Domínguez
7a0428644f
Replace boost::assign::map_list_of with initializer_list constructor 2024-10-19 01:04:15 +02:00
Alejandro Domínguez
abf7a78984
Replace boost::ptr_list with std::list 2024-10-19 01:04:14 +02:00
Alejandro Domínguez
e326426dbc
Replace boost type traits with std version 2024-10-19 01:04:14 +02:00
Alejandro Domínguez
88e38b2699
Replace boost atomics with std version 2024-10-19 01:04:14 +02:00
Alejandro Domínguez
1ee044c5fc
Replace boost::erase_first with std equivalent 2024-10-19 01:04:14 +02:00
Alejandro Domínguez
1ffb70f670
Replace boost::scoped_ptr with std::unique_ptr (1/2) 2024-10-19 01:04:14 +02:00
30dc9ccc86
Replace boost::scoped_array<T> 2024-10-19 01:04:02 +02:00
2c503eab09
Remove old Coreaudio OSX 10.5 support 2024-10-18 22:52:34 +02:00
99906a2215
Drop build-system support for macOS < 10.13 (require C++17) 2024-10-18 22:52:29 +02:00
bd8525e5f1
Remove deprecated PBD::SignalN 2024-10-18 20:46:31 +02:00
2d7cce44f1
Replace PBD::Signals (1/2) 2024-10-18 20:41:08 +02:00
Alejandro Domínguez
0ade0b2212
Deduplicate SignalWithCombiner<Combiner, void, A...> specialization 2024-10-18 20:41:08 +02:00
Alejandro Domínguez
16dd8528c8
Make SignalN template variadic 2024-10-18 20:41:05 +02:00
837ea32898 actally stop doing clip recording visual stuff when disarmed (libs) 2024-10-18 09:50:48 -06:00
92e452609a
Fix I/O Tasklist RR schedule option 2024-10-18 15:11:08 +02:00
7608d4ade2 API changes for clip recording in TriggerBox
Also, disarm all triggers when track-level rec-enable is disabled
2024-10-17 07:44:33 -06:00
a8f58105a9 provide a class-level static PBD::Signal for Trigger (Slot) arming 2024-10-17 07:44:33 -06:00
6b1659497d add #warning 2024-10-17 07:44:33 -06:00
7c944687c9 preparations for clip data display (MIDI) while recording 2024-10-17 07:44:33 -06:00
c03c3dd918 fix unused variable warning from clang 2024-10-17 07:44:32 -06:00
dab9775223 fix bitwise-vs-logic AND (thanks, clang!) 2024-10-17 07:44:32 -06:00
c2deacdd54 fix definition of Trigger::playable()
The recent change to only use the data object breaks GUI handling
of a PropertyChange signal after _region is set following a drag
and drop
2024-10-17 07:44:32 -06:00
62a4df52c7 tentative steps in infrastructure for displaying clip data during capture 2024-10-17 07:44:32 -06:00
6193535a31 apply a fade in & out to captured audio clip data, before writing to disk
This policy may need revising later.
2024-10-17 07:44:32 -06:00
87ab0a9e0f add config vars to control max size of captured MIDI and audio clips 2024-10-17 07:44:32 -06:00
8305ea5762 during MIDI clip recording, convert audio->beat time at capture time
This distributes whatever cost there is associated with the domain conversion across
multiple process() calls, rather than doing it all in the process() call where
capture finishes.
2024-10-17 07:44:32 -06:00
Paul Davis
cbc0021182 fix typo (| instead of ||) 2024-10-17 07:44:32 -06:00
1e8b2c521c provide a better method to decide if a trigger(slot) is occupied
This is necessary with clip recording because for some short time after recording,
a trigger may be playable despite not yet having a region.

libs edition.
2024-10-17 07:44:32 -06:00
596c54d742 fix ups for record state in TriggerBox 2024-10-17 07:44:32 -06:00
d7d208dc34 move RecordState enum from ARDOUR::Session to ARDOUR so we can use it in TriggerBox (libs) 2024-10-17 07:44:32 -06:00
6ef4a74728 cleanup of bits of clip recording code 2024-10-17 07:44:32 -06:00
4466563a89 avoid double delete of clip recording audio buffers 2024-10-17 07:44:32 -06:00
25400a4936 fix appending new audio data during clip recording 2024-10-17 07:44:32 -06:00
7455b99b45 account for clip recording when computing monitoring state 2024-10-17 07:44:32 -06:00
a357575954 less debugging 2024-10-17 07:44:32 -06:00
423148c2af tweaks to cleanup and get much closer to full audio clip recording 2024-10-17 07:44:32 -06:00
26fb50d1a9 a bit more type-safety when handling audio data during clip recording 2024-10-17 07:44:32 -06:00
d7c424c440 attempt to write and use audio data to disk for audio clip recording 2024-10-17 07:44:32 -06:00
0959696070 NO-OP: remove pointless embedded whitespace 2024-10-17 07:44:32 -06:00
b4d0b06d95 const-ify first "src" argument in AudioSource::write() and derivatives 2024-10-17 07:44:32 -06:00
74132b60a0 get the data collection and initial setup part of audio clip recording working
Not yet implemented: writing the data to disk and creating a new Region
2024-10-17 07:44:32 -06:00
ac4bb55f13 first functioning MIDI clip recording (libs) 2024-10-17 07:44:32 -06:00
a2d44ba97d remove ClipRecProcessor, whose functionality will move into TriggerBox where it should have been 2024-10-17 07:44:32 -06:00
1fa42dcb95 provide rec-enable state for TriggerBoxen 2024-10-17 07:44:32 -06:00
052ef18c4a cliprec: add processor to tracks, and get MIDITrigger prepared for capture 2024-10-17 07:44:32 -06:00
86b01a5d2f provide an interesting method to convert an RTMidiBuffer<samples> to RTMidiBuffer<beats> without any memory reallocation 2024-10-17 07:44:32 -06:00
88c326aee0 more clip recording refactoring 2024-10-17 07:44:32 -06:00
aa9a998f60 small steps towards clip recording 2024-10-17 07:44:32 -06:00
107706af8a some tiny steps towards using new data structures for clip recording 2024-10-17 07:44:32 -06:00
75f56cd3e1 the great onceification (libs)
Replace use of #ifndef header guards with #pragma once

Modern C++, baby!
2024-10-17 07:44:31 -06:00
a9205ffd55 use nullptr, not NULL 2024-10-17 07:44:31 -06:00
8baaa7eb66 TriggerReference requires some sort of lifetime tracking
For now we use std::weak_ptr and std::enable_shared_from_this to accomplish tracking. There
may be an argument for using our own (PBD::Destructible) mechanisms instead.
2024-10-17 07:44:31 -06:00
e3ff81efcb remove dangling line of code that does nothing 2024-10-17 07:44:31 -06:00
7901b4119f we're gonna need a bigger debug set 2024-10-17 07:44:31 -06:00
c8924f4133 fix lollipop drawing
Cairo coordinate/argument limits are much smaller than the canvas. Trying
to clip to a gigantic rectangle throws cairo into a weird state, so
make sure we only clip to a part an exposed area
2024-10-17 07:44:31 -06:00
e67a3387fd Fix Editor Lua bindings
Methods that have been moved to EditingContext need
to reference the abstract definition there, and PublicEditor's
first parent class also need to be EditingContext (same
memory address)
2024-10-17 07:44:31 -06:00
7e7440bc33 Fix Lua bindings, Session is-a HistoryOwner
For derived classes to work in Lua w/o explicit cast,
it needs to be the first parent.
2024-10-17 07:44:31 -06:00
2fceb66193 manual fixups for errors during rebasing against master 2024-10-17 07:44:31 -06:00
911ad78c06 add API to access PBD::UndoHistory member of HistoryOwner 2024-10-17 07:44:31 -06:00
a61f49ad4f show Bindings _name in DEBUG_TRACE output 2024-10-17 07:44:31 -06:00
42959b1313 adjust MidiModel API to require HistoryOwner not Session for commands 2024-10-17 07:44:31 -06:00
8c086693af show HistoryOwner::_name in DEBUG_TRACE messages 2024-10-17 07:44:31 -06:00
b989464914 NO-OP: add useful comment 2024-10-17 07:44:31 -06:00
e8fdbb8cd9 Session IS-A history owner 2024-10-17 07:44:31 -06:00
d30c8a1286 abstract concept of a history owner from ARDOUR::Session into libpbd 2024-10-17 07:44:31 -06:00
fd6afb30e6 use MidiModel::ContentsChanged to drive MIDI cue edit swaps
No need for a special method called post-edit
2024-10-17 07:44:31 -06:00
62d36832c6 more changes to get MIDI clip editing working
MIDITrigger now has a direct reference to a MidiModel, and uses
that as the basis for discovering what state has changed and needs
updated after an edit operation pushes a new state to the trigger
2024-10-17 07:44:30 -06:00
7bf464795a add ::render() to MidiModel since that's what we'll be editing 2024-10-17 07:44:30 -06:00
06d5496f70 further preparation for MIDI cue editing in triggerbox code 2024-10-17 07:44:30 -06:00
9060a32c34 MIDI state trackers: dump() is const
Plus minor fixes to ::resolve_diff()
2024-10-17 07:44:30 -06:00
7dee98279a extend MidiModel and MIDITrigger in preparation for edit-change handling 2024-10-17 07:44:30 -06:00
5da8de05ca NO-OP: internal whitespace and newline cleanup 2024-10-17 07:44:30 -06:00
4267d5b0d7 MidiStateTracker: extend API to allow "diffs" between two MidiStateTrackers 2024-10-17 07:44:30 -06:00
d550292f8f additional DEBUG_TRACE (Destruction) output 2024-10-17 07:44:30 -06:00
e7731f2e89 add -D actions to gtkmm2ext 2024-10-17 07:44:30 -06:00
009a0e6ffb stacktraces to help track down missing actions 2024-10-17 07:44:30 -06:00
59ed3d7138 cleanup canvas piano roll header so that it can exist with no current MidiView 2024-10-17 07:44:30 -06:00
10244c0360 tempo bar and BBT ruler in MIDI cue editor 2024-10-17 07:44:30 -06:00
b35b30c230 factor out code to extract a TempoMap from an SMF 2024-10-17 07:44:29 -06:00
e3205bded0 do something to make MIDI bindings accessible in any EditingContext 2024-10-17 07:44:29 -06:00
10b48d2cc4 lock in some major steps for the midi cue/pianoroll editor 2024-10-17 07:44:29 -06:00
0eeb281bd6 remove debug output 2024-10-17 07:44:29 -06:00
8e4edd0c07 Revert "separate out all bounds/position info from Region into "Slice""
This reverts commit f3da2cfd8b9dc077ee35fc3bbaf133adec23d463.
2024-10-17 07:44:29 -06:00
7a5d7cfe69 Revert "add set_* methods to Slice; remove property additions"
This reverts commit 81eee23baab2817218c1766c7d3c37fb7435e619.
2024-10-17 07:44:29 -06:00
659382ecd8 convert debug output from printf to type-safe iostreams 2024-10-17 07:44:29 -06:00
a6e02d7a94 add set_* methods to Slice; remove property additions
Derived classes (currently only Region) just register the Slice properties
_start and _length.
2024-10-17 07:44:29 -06:00
45328723b0 separate out all bounds/position info from Region into "Slice"
The idea here is to be able to describe region size, start and position
independently of an actual Region object.
2024-10-17 07:44:29 -06:00
7799adc8db make Stateful a virtual base class of StatefulDestructible
This permits dual inheritance from Stateful.
2024-10-17 07:44:29 -06:00
204d4237f8 further steps towards MidiRegionView outside the Editor 2024-10-17 07:44:29 -06:00
e3d790207f modify MIDITrigger to use an RTMidiBuffer<Beats,Beats> for playback, not a MidiModel
Creating an iterator on a MidiModel (Sequence) creates a read-lock on the same,
which exists until the iterator is destroyed.

This new designs renders the model/source to an RTMidiBuffer, then atomically
swaps in a new RTMidiBuffer in an RT context.

Not yet implemented in this temporary branch is handling required
state-changing messages when the buffer is swapped.
2024-10-17 07:44:28 -06:00
a4a277c141 templatize RTMidiBuffer to allow use in different time domains
Also add ::track_state() method to configue a MidiStateTracker
to correspond to the state implied by an RTMidiBuffer<T,D>
at a given point in time.
2024-10-17 07:44:28 -06:00
b693d07fcb Add a new ::render() method to MidiSource that writes to an EventSink 2024-10-17 07:44:28 -06:00
9c292ed6f4
Merge branch 'ardour' 2024-10-17 15:38:42 +02:00
0986b8d1e8
Revert "Only enable RegionFX in debug builds for the time being"
This reverts commit d525f8d60c.
2024-10-17 15:36:29 +02:00
John Emmas
b6cb758357 Another minor tweak to fix a build issue with MSVC/c++17
Fixes a conflict between 'std::byte' (new in c++17) and earlier declarations / typedef's that defined 'byte'
2024-10-17 12:07:05 +01:00
d525f8d60c
Only enable RegionFX in debug builds for the time being
This reverts commit 14ff2f2e68.
2024-10-16 18:29:51 +02:00
6149771910 fix yet more cases where SMF are imported and named incorrectly 2024-10-15 22:35:04 -06:00
Mads Kiilerich
0d4bce8663
backends: Fix class name in debug and error messages for set_latency_range and get_latency_range traces 2024-10-15 00:41:12 +02:00
Mads Kiilerich
99ba70384a
FaderPort8: Improve DEBUG_TRACE messages 2024-10-15 00:41:12 +02:00
Mads Kiilerich
5c763c99ba
FaderPort8: Use explicit "Port 1" for FP8 too
84e38b4c65 made the same change for FP16.

It has apparently not been necessary for FP8 so far, because backends
have happened to report "Port 1" before the control port. But that is
not necessarily the case. It failed for me when playing around.

Change FP8 handling to also not make assumptions about the device order
returned by the backend.
2024-10-15 00:41:12 +02:00
Mads Kiilerich
b7249c8fe7
build: Set _POSIX_C_SOURCE=200809L instead of comment about -std=gnu99 in 8fea1ea42e
We are converging towards setting it globally.
2024-10-14 22:57:15 +02:00
eb87b0e2eb
Remove old safety check
These days it only produces false positives (locate at start
of session export).

We leave `ENSURE_PROCESS_THREAD` in place, since it may
come in handy at some point (eg. static analysis, documentation)
2024-10-14 22:52:37 +02:00
8115578d4e
Add RT thread priority debugging 2024-10-14 21:49:56 +02:00
63d3d1ff3d
Initialize fader's numeric entry adjustment
Previously the internal adjustment used for numeric entry
was left at 0 if the BarController's adjustment was never modified.
2024-10-14 17:58:00 +02:00
John Emmas
fd8808d7b8 Minor declaration issue that upsets MSVC/c++17 2024-10-13 11:39:48 +01:00
0aff098541
Fix IO Thread priority
This adds `pbd_pthread_priority` indirection to correctly get
the absolute thread priority.

and for consistency a 4 letter enum is used.
2024-10-11 10:06:49 +02:00
be4dab7336
Merge branch 'ardour' 2024-10-10 03:18:28 +02:00
5efa5b4529
Optimize audio region read when no regionFX are used 2024-10-10 02:45:03 +02:00
43dd75b10e invalidate audio region cache when the region _start changes 2024-10-09 16:53:55 -06:00
14ff2f2e68
Revert "Only enable RegionFX in debug builds for the time being"
This reverts commit cae710cd7c.
2024-10-09 20:49:36 +02:00
2a96c9ce98 fix issues with MIDI playback (and who knows what else) near start of roll 2024-10-08 08:36:23 -06:00
cae710cd7c
Only enable RegionFX in debug builds for the time being 2024-10-08 16:23:43 +02:00
59e98bd824
Fix reading peak-file after EOF
This issue was introduced in b28090c64c
2024-10-08 11:54:14 +02:00
33806a2735
Revert "Only enable RegionFX in debug builds for the time being"
This reverts commit 2d076cccb1.
2024-10-03 17:28:09 +02:00
e3e014bfe6 NO-OP: comment work 2024-10-02 11:03:08 -06:00
52336eb2f0 fix MIDI Clock output times by using the correct call to get tempo at a position
Could be worth a double check of the codebase/hiding the API that ignores ramping
2024-10-02 09:13:28 -06:00
adc9d9e0af
VST3: work around plugins that do not heed ContextInfo::kSendCount
see also c5618f01d6
2024-10-01 23:03:19 +02:00
John Emmas
07c79ce92c Small changes to make pthread_utils.cc buildable again with MSVC 2024-10-01 20:28:16 +01:00
44b2377e72
VST3: Fix possible deadlock when using PSL extension for sends
see also c5618f01d6
2024-10-01 19:24:36 +02:00
ca7ac7027b
VST3: add more debug messages for PSL extensions 2024-10-01 01:21:35 +02:00
22a2cb0624
Ignore inactive routes for pre-roll sub-cycles 2024-09-30 23:36:36 +02:00
1aad6805b3
Fix count-in/preroll recording offsets
Notably `Route::process_output_buffers` uses

```
  output_latency = speed * _output_latency;
```

here, speed already needs to be non-zero during count-in
and pre-roll.
2024-09-30 23:36:06 +02:00
dab22a7c70
Explicitly set Windows Process Scheduling Class 2024-09-30 19:57:53 +02:00
ed437afda7
Fix thread priorities for Windows builds 2024-09-30 19:07:53 +02:00
11f71a3297
Fix playback of sessions with low sample-rate
previously, _chunksize =
```
  minimum_disk_read_bytes / sizeof (Sample)
```

can become larger then actual allocated ringbuffer:

```
  audio_playback_buffer_seconds * sample-rate
```

In which case the buffer was never filled.
The disk writer has similar issues
2024-09-29 18:25:33 +02:00
46f61d7662
Fix and simplify Playlist::fade_range for multiple ranges 2024-09-28 21:16:55 +02:00
28605b5351
Fix Audio region fade property mapping
This fixes an issue when undoing region fades.
Particularly but not limited to the following:

1. select a region and split it in the middle
2. switch to range tool. make a range selection across the split
3. Edit > Fade > Fade range seection  (or press `/`)
4. Undo

Previously the fade-out of the earlier region was not undone.
2024-09-28 21:15:57 +02:00
1d921dec0b
Debug thread sched_priority 2024-09-28 14:47:52 +02:00
2014faaeca
Fix BaseUI thread priority 2024-09-28 14:45:05 +02:00
dd4a1a6d73
Set thread priority relative to backend
This also removed direct calls to backend real_time_priority
for good measure.
2024-09-28 04:15:39 +02:00
395833e4f8
Always use PBD API for thread priorities 2024-09-28 03:58:48 +02:00
0b5a197f76
NO-OP: whitespace 2024-09-28 03:16:57 +02:00
d089f38481
Use config variable to set IOTask thread policy 2024-09-28 03:16:54 +02:00
dcd79f3135
Debug Backend thread creation 2024-09-28 03:16:50 +02:00
aeb4f925c6
PBD pthreads: allow unlimited stacksize 2024-09-28 03:16:45 +02:00
e8c67408bb
Impose stack limit on backend threads (freewheeling, MIDI poll) 2024-09-28 03:16:42 +02:00
e8445d13ec
Require thread name to be passed to PBD::Thread and store thread 2024-09-28 03:16:30 +02:00
88a24ae8e5
Let PBD::Thread set thread-name 2024-09-28 03:16:07 +02:00
538a8cbccc
Consolidate calls to `pthread_create' (2/2) 2024-09-28 03:16:02 +02:00
8d3ebde60e
Distinguish Threads and ThreadName debugging
This also allows for -DThread to enable both.

We celebrate the 128th debug bit and look forward to
the next 64!
2024-09-28 03:15:36 +02:00
c4fdd5356c
Enable debugging for stored threads 2024-09-28 03:14:16 +02:00
301777e7fe
Remove cruft 2024-09-27 18:03:11 +02:00
71a3161252
Error handling for 3751d20ce 2024-09-27 17:20:42 +02:00