13
0
Commit Graph

19407 Commits

Author SHA1 Message Date
dc5737a3bf replace INT32_MAX with CueRecord::stop_all (libs) 2022-08-03 11:42:51 -06:00
c25e96b545 triggerbox: rework fast_fwd code into a simpler design
Rather than start at zero, we now search backwards for the first relevant cue
before the locate position, making our task in ffwd'ing from there much simpler
since there are no other cues to consider
2022-08-03 11:00:37 -06:00
cc6a437faf temporal: fix a bug in BBT_Time::round_up_to_bar()
Also remove Meter:: versions of related methods, because they are not necessary. We
only need metrical information for operations like ::round_to_bar()
2022-08-03 10:59:29 -06:00
22faf6f426 fix transport-freeze in some cases of MIDI cue ffwding
* there are rare cases where a midi clip would not advance the ffwd position, looping endlessly
* this problem did not occur when the user chose an explicit Follow Length (different code path)
2022-08-01 14:52:16 -05:00
e04311b647
Work around cleanup unused regions removing trigger-regions
This workaround bypasses RegionMap and SessionPlaylist APIs
(region_use_count, destroy_region) which are not directly
applicable to Triggerboxes. There are likely various edge
cases until TriggerBoxes integrate with Session Playlist.

e.g. whole file regions generated for regions/source used by
triggerboxes are cleaned up.
2022-08-01 20:48:02 +02:00
bd6df4a40d
Fix session-archive of nested sources in unused regions
A compound region itself may be unused, but the nested source
it provides can be used in another region compound.

In this case the first, unused, region needs to be saved
to save the nested source.
2022-08-01 00:59:01 +02:00
371f386b8b improve comment accuracy 2022-07-29 14:04:28 -06:00
81f22662c0 some more logic changes to triggerbox fast forward to try to make it reliable 2022-07-29 14:04:28 -06:00
2471e90fae LV2 0.18.6 no longer provides a top-level lv2.h
Until it does, standardize on a single include path for lv2.h, even if this
path is the sort of thing that leads to CLAP
2022-07-29 08:51:49 -06:00
9d197c0702 fix copy-n-paste of audio region envelopes and other automation data
Constructing a playlist from another playlist plus an offset used the wrong
RegionFactory::create method. By failing to pass in the offset to the region
constructor, the newly created region gets its envelope (and possibly other
automation data) from the start of the existing region, not its own start.
2022-07-28 18:01:14 -06:00
96dc3cce88 use C++11 auto iterator syntax 2022-07-28 18:01:14 -06:00
48dbd5801a
Coreaudio: enable MIDI by default 2022-07-27 15:31:20 +02:00
8cf3ff37ed
Do not save EngineHints with session-archives
This will prevent a "Engine I/O device has changed" warning dialog
when the archive is opened later.
2022-07-27 01:08:01 +02:00
ae7b39022e triggerbox: improve fast forward behavior
There was a logic error previously which failed to consider follow actions (and follow count).
Now we find a relevant cue, and use follow actions and follow counts as we move forward
in time
2022-07-25 22:02:12 -06:00
b0b5ec1c89 non-compilable, non-functioning branch to make work on the road possible.
Laptop is already packed
2022-07-25 22:02:12 -06:00
191dbf7c34
Connect LV2 Atom ports for latency compute run
This fixes an issue with LV2 plugin that unconditionally
initialize LV2 Atom ports even if they are not connected.
eg. JUCE7 produces LV2s at the time of writing.
2022-07-24 17:38:53 +02:00
5f5f4599f2
Fix MIDISource event-interpolation state save
The actual goal here is to use direct InterpolationStyle serialization
in MidiSource (identical to AutomationList). enum_2_string()
does not work for Evoral types.

As side-effect virtual base-classes have been changed to pass
Parameters as const references
2022-07-22 03:38:41 +02:00
1b6e9fdaf8
Correctly save MidiSource Automation state 2022-07-22 03:38:37 +02:00
62aae6cffb
Consistently replace colons in IO/Port names
This fixes an issue when creating tracks or busses with a colon
in the name. Renaming those tracks later IO::set_name()
crashed in current_name.replace(std::string::npos,..).

`IO::build_legal_port_name` uses ";" instead of ":" while
`IO::set_name` replaced it with a "-".

Initially the IO name included the colon, so ports created
use a semicolon. But after renaming the IO, ::set_name() applies
the replacement and the IO's name is changed to include the "-".

This leads to a conflict with ports that already have the semicolon
in the port-name.
2022-07-20 18:50:29 +02:00
79f8606b2d
LV2: announce bufz:boundedBlockLength feature (#8942) 2022-07-18 15:42:44 +02:00
ef08c819da
Fix crash on port unregistration
pr->erase (*i); deletes the iterator, it cannot be safely
dereferenced again later.
2022-07-16 20:26:56 +02:00
b9419aa405 another attempt to catch details of a rare region-gain undo crash 2022-07-16 10:01:33 -05:00
1f65c66727
MCU: fix mixer-strip buttons (see also 0d9656ef82) 2022-07-15 23:46:28 +02:00
2de84c97d0
Fix Temporal::Range::squish reduced to samples
Loop Location start="a1665678660" end="b145920"
Loop-end (at 122BPM) is a2109859636
at 48kHz this is sample 1794098.32

Now play the loop and play sample 1794098 = a2109859248
Range::squish start: a1665678660 end: a2109859636 squish: a2109859248

squish() does nothing, since there are still 388 superclock-ticks
until the end of the loop.

However, DiskReader::get_midi_playback convertes the value back
to samples(), this leads to effective_start == loop_end;
resulting in an endless loop.

Thanks to MikeLupe to provide a session to reproduce this issue.
2022-07-15 19:54:21 +02:00
e1c6a19d06
Add a preference to set group-override behavior
So far group-override "inverts" group behavior. Disabled groups
(or group settings) are enabled and vice-versa.

When the setting is disabled, groups can only ever be disabled
(Controllable::NoGroup) and group-override will not enable them
(Controllable::InverseGroup).
2022-07-14 16:23:31 +02:00
e6570b2247
No longer save deprecated property
Now that the session-state version has changed, it is no longer
required.
2022-07-12 21:08:41 +02:00
b77eedf53e
Suggest WinMME as default (enable MIDI by default) 2022-07-11 21:45:55 +02:00
fe6aa0610c
ALSA: suggest ALSA Sequencer by default 2022-07-11 21:45:54 +02:00
82bdddb829 fix Follow-Count widget in clip properties GUI
* add follow_count to all_trigger_props so widget gets updated on selection
2022-07-08 11:10:46 -05:00
97317f3f86 triggerbox: correct an error in the computation of "frames covered" for audio triggers 2022-07-07 16:45:01 -06:00
4a30d8cebb NO-OP: add copyright notice 2022-07-07 16:45:01 -06:00
25d1209bb4
Only dump SessionEvent pool in debug builds
This ensures that the user will see a "POOL OUT OF MEMORY" message.
In rare case dumping the pool can segfault when printing the Event,
The pool is zero initialized and only ever contains events, so
in theory it is safe to print them..
2022-07-07 22:34:11 +02:00
ef2c1d990b
Prevent accumulating events during freewheel export
When exporting many ranges, locate and restarting transport for
every ranged a SessionEvent::TransportStateChange event is queued.
Since freewheel export does not process events. Those events
can accumulate:
https://discourse.ardour.org/t/pipewire-jack-export-freeze/107383/18?u=x42

During export those requests can be safely ignored because the only
purpose is to emit a TransportStateChange() signal when the playhead
passes a given location and notify the UI.
2022-07-07 18:28:27 +02:00
9e11ef4f39
MixerScene: handle edge-case with midi-cc/bender controllables 2022-07-07 16:06:08 +02:00
effc209070
Place Pool in PBD namespace
A public class named "Pool" in the global namespace just
calls for symbol name conflicts.
2022-07-07 05:21:54 +02:00
8418e7c954
NO-OP: clang-format 2022-07-07 05:21:49 +02:00
a8a4695466
Dump SessionEvent cross-thread pool when it overflows 2022-07-07 05:21:44 +02:00
1694c71cd5
Implement memory-pool debug-dump
This will allow to trace "POOL OUT OF MEMORY" and see
which events fill up the event/memory pool.
2022-07-07 05:21:31 +02:00
87d17f6624
Prevent rendering outside of canvas scroll groups
This fixes automation lanes bleeding into the ruler area.

The bounding box of all items in the main canvas group starts
at -0.5, and the cursor-scroll-group at -1.5. This is calculated
to include line-width, and outlines outside the item(s).

A scroll-group however must not extend its render area to
render those.
2022-07-06 20:50:03 +02:00
0d70be3a05 miscellaneous fixes for warnings from -Wconversion 2022-07-04 22:01:48 -06:00
b5947dd0a8
Use AudioTime for region-fade envelopes (see also 86e6df15cc) 2022-07-04 18:05:46 +02:00
cc07cde142
Simplify 86e6df15cc using a dedicated method 2022-07-04 18:05:43 +02:00
86e6df15cc
Fix region-gain when region is glued to bar/beats
The region-gain envelop is an Automation list that uses AudioTime
regardless of the regions own position.

Since the actual audio data is using always using samples this
results in reliable envelopes without the reduced granularity of
BeatTime.

All points the list have to be in the AudioTime domain.

Previously it was possible to have a mixed-domain list e.g.

- add 2h:30min long source
- lock it to music-time
- set grid and snap to 1/8 note
- range select some range shortly after 2:25
- draw region-gain for range

<events>
a0 1
a492113664000 1.0000001192092896
a492113737500 0
a494032822500 0
a494032896000 1.0000003048365
b34560000 1.0000003048365
</events>
2022-07-04 00:58:07 +02:00
d932d9365f fix crash in a debug build caused by trying to print debug info about a negative time value that will never be used 2022-07-03 16:53:30 -06:00
0295e05d04
Force latency update callback after measuring port-insert latency 2022-07-03 02:16:11 +02:00
c6566f3933 mackie protocol: add more null checks; remove some debug msgs 2022-06-30 16:47:17 -05:00
198df78cfe mackie debugging: ugly printouts 2022-06-30 14:04:51 -05:00
66bd195030 mackie protocol: potential crash-fix 2022-06-30 11:30:07 -05:00
13de664ae6
Provide jack2 compatible implementation for jack1
jack1 (which is Linux only) does not have a jack_client_stop_thread
API, and expects the application to call pthread_join().

This fixes an issue when the application is compiled using jack2 headers
but the application later runs using jack1's library.
2022-06-30 17:19:57 +02:00
1f6abbb756
Comment-out unused timepos_t modulo operator which is not implemented 2022-06-30 01:47:42 +02:00
f67e731a7f
Prevent session-range changes to create invalid loop ranges
When a session-range coincides with a loop-range location, moving
the session-range also updates the loop-range.

Keeping session and loop-range in sync can be useful if the whole
session is looped. However markers are treated individually, so
we need prevent invalid ranges.

If session-start and loop-start coincide, but loop-end is before the
end-marker, it is possible to move session-start beyond the loop-end.
2022-06-30 01:07:32 +02:00
3bcf75a35a
Remove Range::squish debug information, used fixed modulo operation 2022-06-30 01:07:32 +02:00
2c1f36201c
Fix timecnt_t modulo operation when mixing time-domains 2022-06-30 01:07:32 +02:00
ca49bc00f0
Remove old "user" API, use consistent get/set_double() 2022-06-29 01:39:02 +02:00
3623b39168
Replace ::user_double() with ::get_double() 1/2 2022-06-29 01:39:02 +02:00
a4a241c738
Prepare replacing ::user_double() with ::get_double()
Automation Controls (and controls in general) are now
only updated in realtime context. Either via automation-playback,
or via SessioEvent. This directly sets the Control:_user_value
(before emitting the Changed signal).

The GUI does not need to evaluate the control at a given point
in time, so the API call can be removed and unified.

This commit first removes all calls to "get_double" to ensure
that no special cases exist.
2022-06-29 01:39:02 +02:00
5cb6e1046b
Fix automated controllable display value
::automation_run() evaluates the value, possibly ahead of time
depending on latency-compensation. The actual value is set in
realtime-context via set_value_unchecked() -> actually_set_value()
which emits the Changed signal.

At this point in time Control::user_value is already set correctly.
There is no need to evaluate and interpolate again, at a potentially
incorrect (uncompensated) time: `_session.transport_sample()`.

This fixes an issue with the GUI Automation control showing an
outdated value when there is an "immediate jump" in the signal:
eg. add a latent plugin post-fader, then automate the Fader to jump
from 0dB to -inf dB (snap to grid) and play though that transition.

(Plugin controls were not affected by this bug, the process
cycle is split for those, but Mixbus internal AC were affected).
2022-06-29 01:39:02 +02:00
7a01f3cbcd
Fix automated fader display value (use cycle-end value) 2022-06-29 01:39:01 +02:00
b0b7750bc7
NO-OP, use default argument 2022-06-29 01:38:55 +02:00
ee350362d3
Debug loop range squishing
When the loop-range is defined in BeatTime, the disk-reader encounters
rounding issues due to time-domain mismatches.

With a simple session fixed BPM at 120,  48kHz.
looping 1 bar exactly 2 sec at the start of the session:
```
 Range::squish start: b0 end: b7680 squish: a113554560
 Range::squish using modulo:       b45 = a661500
 Range::squish using modulo in TD: a5760
 Range::squish using earlier():    a658560
```
The correct answer is a113554560 - 2 * 56448000 [SC/sec] = a658560

Calculating the modulo iteratively is not great, however usually
only one iteration is required.
2022-06-28 03:01:41 +02:00
873f78de78 NOOP: rearrange code DiskReader::get_midi_playback() to follow the "early exit for conditional" style guide 2022-06-25 13:36:55 -06:00
64f9829b56
AudioBackends: ignore setting latency of invalid port(s) 2022-06-24 19:55:17 +02:00
fe0e997335
Backend: prefer debug_msg over PBD::Transmitter in threads
PBD::Transmitter is neither thread-safe nor rt-safe. This likely
fixes a crash on macOS when process-threads are started.
Many threads simultaneously enter coreaudio_process_thread() and
log a message calling `PBD::info << .. << endmsg` simultaneously.
2022-06-24 19:27:57 +02:00
9ab32d7cb4
Fix builds on platforms without execinfo (amend cd4549aff7) 2022-06-23 01:59:58 +02:00
5831ddd40b amend b30ac5e221 to actually replace the assert with a return 2022-06-22 16:09:38 -06:00
0d9656ef82 use new macros to cleanup #ifndef NDEBUG as much as possible (libs edition) 2022-06-22 13:31:08 -06:00
0004ca2c41 add useful DEBUG_RESULT and DEBUG_RESULT_CAST to pbd/debug.h 2022-06-22 13:31:08 -06:00
d917d7b351 fix actual x_assert macro definition 2022-06-22 13:31:08 -06:00
df641765ec add new header for x_assert() macro 2022-06-22 13:31:08 -06:00
4599b07217 fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
046cdf1295 fix unused variable warning by removing it. 2022-06-22 13:31:08 -06:00
41948821e2 fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
ebb9d3d4dc fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
26d2c8a7fa handle compiler stupidity with early return 2022-06-22 13:31:08 -06:00
bb5798ee66 fix may-be-used-unset warning and bizarre brace/indent style 2022-06-22 13:31:08 -06:00
6fd4c01fc9 fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
4878c48386 fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
7a32ff33d4 handle compiler stupidity with early return 2022-06-22 13:31:08 -06:00
f7b91d577b handle compiler stupidity with early return 2022-06-22 13:31:08 -06:00
9922daf284 handle compiler stupidity with early return 2022-06-22 13:31:08 -06:00
24f1a65d5f use C style cast in C code, rather than C++ constructor 2022-06-22 13:31:08 -06:00
48a109e8c8 fix snprintf buffer size warning 2022-06-22 13:31:08 -06:00
660d2fc8ab fix strncpy() size argument error (Windows only, needs review) 2022-06-22 13:31:08 -06:00
9b80d6558a fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
ad8e1c1cfd fix optimized unused variable warnings 2022-06-22 13:31:08 -06:00
45403dd2f1 fix may-be-used-unset warning 2022-06-22 13:31:08 -06:00
b30ac5e221 replace unnecessary assert(0) with return; 2022-06-22 13:31:08 -06:00
4ee854e7df fix optimized unused variable warnings 2022-06-22 13:31:08 -06:00
123cc92fff fix may-be-used-unset warning 2022-06-22 13:31:08 -06:00
7436a110dc fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
ecefe29d5e fix optimized unused variable warnings 2022-06-22 13:31:08 -06:00
6fdd745dc5 fix may-be-used-unset warning 2022-06-22 13:31:08 -06:00
311e36b28f fix optimized unused variable warnings 2022-06-22 13:31:08 -06:00
168b540959 fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
0e1f62e605 fix optimized build unused variable warnings and abort not assert 2022-06-22 13:31:08 -06:00
f1a24fac98 fix optimized unused variable warning 2022-06-22 13:31:08 -06:00
f78d384281 fix may-be-used-unset warning 2022-06-22 13:31:07 -06:00
1e09e0f6fa fix may-be-used-unset warnin 2022-06-22 13:31:07 -06:00
ed645761d0 fix optimized unused variable warning 2022-06-22 13:31:07 -06:00
ae9c11fb01 fix redefined CANVAS_DEBUG warning 2022-06-21 17:35:01 -06:00