Commit Graph

15428 Commits

Author SHA1 Message Date
2edbda2526
Replace explicit image-surface with cairo pattern/group
For MacOS/X this is equivalent, rendering happens using a
CGBitmapContext + image-surface. Windows and Linux needs profiling
for respective equivalent surfaces.
2019-12-27 19:35:02 +01:00
c3ab63a2ea
Allow for per-widget image-surface backing
This is an intermediate commit, before replacing image surfaces with
cairo pattern groups.

The eventual goal is to reduce flickering and/or use
CPU + bitblt for specific widgets instead of cairo
graphics-cards accel.

This also removes excessive calls to getenv() for every rendering
operation.
2019-12-27 19:34:56 +01:00
7b1a875f9c remove unused member
Note: there is no global state for "the" transport master, since we have several at all times now
2019-12-27 10:53:02 -07:00
c35a28acfe variable rename 2019-12-27 10:53:02 -07:00
0d3a91b381 improve parseability of a comment 2019-12-27 10:53:02 -07:00
ab58c894d3
Use weak-ptr for source added/removed signals (1/2)
This might fix a "SessionHandleRef exists across session deletion",
when the shared_ptr was be pushed onto a x-thread pool, and not
invalidated in time before the session was closed.
2019-12-25 17:59:38 +01:00
df17e3f041
Prevent copy-construction of sources to be destroyed list
destroy_sources () is only called from Session::remove_last_capture ().
The list of sources to be destroyed is the local scope of that method
and will hold a reference to the object.
copy-construct the list and removing elements one by one from the
copy is only unnecessary overhead.
2019-12-25 17:57:10 +01:00
c9c8cd2777
NO-OP: comment signal emission 2019-12-25 17:52:02 +01:00
61aeb05f2e add a mechanism to use existing MIDNAM info and connect to PatchesChanged in future, atomically
The atomically is with respect to the initial thread-based MIDNAM loading
2019-12-23 10:27:00 -07:00
63ba8da3e1 basics of threaded MIDNAM loading 2019-12-23 10:27:00 -07:00
4874ff8843 slightly enhanced error handling when loading MIDNAM data 2019-12-19 13:14:45 -07:00
bfa5eb982d handle MIDI rendering correctly when there are no regions 2019-12-19 13:14:45 -07:00
8deed500a4 fix thinko ... we're checking if a DiskReader handles audio 2019-12-19 09:09:42 -07:00
3c83979a50 further improve debug message 2019-12-18 19:56:38 -07:00
c8b9184956 fix thinko in MidiRegion::render()
MidiSource::read() wants a length, not an end-sample.

This should fix (at least) some cases where notes past the region end
get included/played
2019-12-18 19:50:32 -07:00
9bd8e67f39 remove debug message 2019-12-18 19:49:34 -07:00
ebe1aeb146 fix debug message 2019-12-18 19:49:09 -07:00
8b3e7fea37 fix Temporal::Beats::operator* 2019-12-18 18:00:53 -07:00
aa856b509c tweak debug output 2019-12-18 18:00:33 -07:00
a73577a45a do not try to process audio in a diskreader with no audio playlist 2019-12-18 17:34:39 -07:00
aeefd7e50a fix crash when looping with a MIDI track 2019-12-18 15:05:49 -07:00
c49c17ffff
Cont'd work on Playlists import from old 2.x sessions
v2.0.0 sessions don't save empty playlists. So missing playlists
for a give diskstream are fine. Just use a default empty one.
2019-12-17 22:56:12 +01:00
53f72dd402 a new stop command while in the middle of declick-to-stop is not a bad transition 2019-12-17 13:21:38 -07:00
f76c897f04
Directly apply MIDI automation state changes
Previously "play/off" and "discrete/linear" changes had no effect
until the MIDI playlist was edited and MIDI re-read into RAM.
2019-12-17 17:17:27 +01:00
37c9a7beb1
Fix MIDI port i/o when vari-speeding 2019-12-17 05:56:49 +01:00
848831d844
Convert Disksteam & Playlists from old 2.x sessions 2019-12-17 00:42:28 +01:00
c144e807ef remove mistakenly left-in debug stacktrace 2019-12-16 16:18:30 -07:00
cd78a168b2 reinstate missing latency initialization code
Removed (mistakenly) during work on transportFSM
2019-12-16 16:13:39 -07:00
cafd1b792c expand DEBUG_TRACE output 2019-12-16 16:13:39 -07:00
2c24e6af36
Remove cruft, unused API 2019-12-16 23:37:57 +01:00
415d3191de
Parse v2 session-information 2019-12-16 23:37:57 +01:00
eff5462009
Lua bindings for well-known send controls 2019-12-16 23:37:53 +01:00
0b4b53b821 fix logic error that prevented MIDI playlists from being rendered at load time
An edit was required to force the render
2019-12-16 10:24:57 -07:00
3cdde4ffc1
LV2: add state:mapPath as supported feature and sort URIs 2019-12-15 14:06:00 +01:00
b2bc934e21 fix behavior of DiskReader when moved after an instrument 2019-12-14 19:34:24 -07:00
514c05a44e truncate unnecessarily verbose debug set/bits output 2019-12-14 10:40:07 -07:00
93180ceea9
Add Inline Control Port Property
This allows to indicate that a control should by default be displayed
inline in the mixer-strip.

Previously that was hard-coded for and enabled for send-level
controls only.
2019-12-14 15:50:56 +01:00
d4e023e1cb
Make BusSendLevel 1st class citizen (1/2)
Equivalent to Gain and Trim (gain-coefficient, not dB) and use
it for Sends.
2019-12-14 15:06:23 +01:00
2efc96a9b8
Add Lua bindings to query AutomationControl paramater ranges 2019-12-13 23:05:15 +01:00
3ddfb4ffe3
Fix mismatched delete 2019-12-13 15:42:09 +01:00
3208535c20
Add method to look up Lua script by name 2019-12-12 20:53:17 +01:00
bf8c256771 reduce another race condition risk
overwrite_queued == true is equivalent to _pending_overwrite != 0
2019-12-12 12:09:15 -07:00
0b0c415b40 remove debug output 2019-12-12 12:08:48 -07:00
3c8b506ace remove useless lock
rbuf allocation/use is protected by process_lock
2019-12-12 11:31:43 -07:00
35bea337d2 fix playback of newly added/modified MIDI data 2019-12-12 11:25:14 -07:00
de8983ca72 expand DEBUG_TRACE() statement 2019-12-12 11:25:14 -07:00
f171e88775
BOOST_SP_NOEXCEPT is n/a in boost 1.62
Even though the method that is overridden (shared_ptr<t>::operator=),
has that signature in modern boost, it's of no real significance
for the case at hand (ExportChannel, ExportTimespan)
2019-12-12 16:06:46 +01:00
87f4a4afff use process lock to lock out process() during playback buffer resizing 2019-12-11 20:36:10 -07:00
f78c659840 remove MIDI readahead parameter
We just don't do this anymore
2019-12-11 20:36:10 -07:00
e8b3d38112 variable renaming in Butler for various buffer sizes 2019-12-11 20:36:10 -07:00
dc0037230e
Fix stackoverflow, endless recursion on ComparableSharedPtr assignment
boost::shared_ptr & operator=(shared_ptr const & r);
is not declared virtual and cannot safely be overloaded.
2019-12-12 03:57:58 +01:00
0a5837ec71
Fix loading plugin state from sessions
While loading a session XML state, set_state must use
`Stateful::loading_state_version`.

When later copying processor state,
`Stateful::current_state_version` is correct.
2019-12-11 16:25:08 +01:00
dd18be15fb
Remove hardcoded session-state versions 2019-12-11 13:56:44 +01:00
3dafaaf2df should probably resolve MIDI notes when loop bounds change
We don't really need to do this if the bounds have moved "outwards", but
at present we don't know if that is the case, so be safe and resolve in
case the loop bounds moved "inwards" and we would otherwise get stuck notes
caused by the now-missing noteOffs
2019-12-10 21:27:10 -07:00
e46c45f6f0 fix unnecssary disruption of MIDI stream when disabling loop 2019-12-10 19:30:37 -07:00
963f2a470a use PlayistChanged appropriately to fix MIDI output
We didn't render the MIDI data when a playlist was set, only when modified.
2019-12-10 12:22:05 -07:00
af2d0dfb15 use bitmask values for OverwriteReason, as was intended 2019-12-10 12:21:28 -07:00
c3e3930f14 revert to single buffer for disk playback, and 5.x-style overwrite
Also address issues with MIDI and also atomicity of _pending_overwrite
2019-12-10 09:29:22 -07:00
941aa20148 Fix font size on Push2
At least on my machine, the fonts on the Push display were ridiculously large,
making everything overlapping and unusable.  I suspect this is because
pango_cairo_font_map_get_default() inherits DPI from the system, so the
monitor scaling factor got applied to the Push display as well.

This commit instead creates a new plain font map, and sets the resolution to
96, which looks like what the UI was designed for.  Some more tweaking of the
Pango context might make things more optimal on the Push, but just setting the
resolution makes things look reasonable to me anyway.
2019-12-09 23:38:10 +01:00
8ec3e5fb54 Fix deprecated-copy warnings
It's long been a guideline (and IIRC a Weff-c++ warning) that either all, or
none, of the copy methods should be defined, but this became a standard warning
in GCC9.  Presumably to account for a later language change though I'm not sure
which.

I don't remember why the ChanMapping copy constructor can't just be a simple
copy (it's just a map of POD), but figure it's safer to just copy what that
does.
2019-12-09 23:25:59 +01:00
39bdde4250 Use labs() for long instead of abs() 2019-12-09 23:25:51 +01:00
21e9c41d96 Fix catch of polymorphic type by value 2019-12-09 22:58:08 +01:00
184bf7fd25 Remove unused variable 2019-12-09 22:56:14 +01:00
21f682164e
Fix automation alignment for latent plugins
This also solves bi-stable automation for plugins where latency
can change due to automation. e.g.

cycle 1: run (t): automation (t) = on: -> increase latency
cycle 2: run (t-latency): automation (t-latency) = off -> decrease latency
repeat.
2019-12-09 18:54:44 +01:00
cf7bfae926 fix error when continuing to refill audio playback buffers after a buffer switch
The file_sample[AUDIO] member was not updated to reflect the last-read sample in the
switched-to buffer.

Also move several methods and members from DiskIO to DiskReader where they belong.
2019-12-08 22:39:31 -07:00
b1b29a6317
Fix two compiler warnings 2019-12-09 01:10:50 +01:00
e291948dcb more debug output 2019-12-08 17:01:17 -07:00
109486419e avoid a locate-to-loop-start from cancelling looping 2019-12-08 17:01:17 -07:00
2543a60f88 correct logic errors related to roll-after-locate in TransportFSM
This might have broken some other subtle behavior, but testing hasn't shown it thus far
2019-12-08 17:01:17 -07:00
cc8c139a57 fix missing SessionEvent when **all** tracks need a buffer overwrite 2019-12-08 17:01:17 -07:00
581dd40db0
Better, more consistent fix for d0dcca109 2019-12-09 00:07:33 +01:00
d0dcca1093
Fix Pan automation when using "Touch"
Pan->touching was left uninitialized, and usually non-zero.
So pan automation was assumed to be currently touched,
and hence never interpolated.
2019-12-08 23:52:48 +01:00
John Emmas
09d34abaa9 MSVC project changes needed to support the new 'mp3 import' stuff 2019-12-08 15:04:02 +00:00
John Emmas
e510a8555d Minor changes needed to make the 'mp3 import' sources build with MSVC
(MSVC project changes to follow...)
2019-12-08 15:01:59 +00:00
7253f304e2
Add support for LV2 state:freePath feature
This fixes a memory-leak issue for Windows builds.
see also https://github.com/drobilla/lilv/issues/14
2019-12-08 15:22:00 +01:00
dca3f7dd97
NO-OP: whitespace 2019-12-08 15:20:53 +01:00
dec355e83d fix behavior when pressing l to loop (not in loop-is-mode) and the required stop-during locate cancels looping 2019-12-07 10:30:38 -07:00
238cc8ed5f functional double buffering when using DiskReader::overwrite_existing_buffers 2019-12-07 10:30:38 -07:00
1008ac20ff a few parameter changes, and flesh out code to switch rbufs in DiskReader 2019-12-07 10:30:38 -07:00
8d05f6d4b7 initial conversion to double buffering inside DiskReader
Second buffer is not used (or allocated) yet.
2019-12-07 10:30:38 -07:00
386f69ae32
Fix 64bit OSX/MacOS builds 2019-12-07 15:46:20 +01:00
642bfc4c9a
Do not allow to embed ogg/vorbis files, require import 2019-12-07 15:38:55 +01:00
c7c40f6f3d
Remove #ifdef'ed format-specific error-log messages
With inclusion of Mp3FileSource, this would get tricky.
On MacOS, the SndFileSource's sf_error_str message is never displayed,
anyway, also calling methods all handle failed-constructor.
So error-log is less important.
2019-12-07 15:38:53 +01:00
9040fd4670
Flatten nested try/catch clauses
This also consistently throws a failed_constructor() when instantiating
a CoreAudioSource fails, regardless of the actual exception
2019-12-07 15:38:48 +01:00
78337c9a7e
Remove unused API, reduce sndfile/coreaudio specialization 2019-12-07 11:32:07 +01:00
052f3a6836
Speed up seeking in mp3s 2019-12-06 23:13:20 +01:00
9aa887fa65
Fix issues with VBR mp3s, detect duration by decoding 2019-12-06 21:53:03 +01:00
0700cb8165
Clear TransportAbort flag after stop
This fixes an issue with unresponsive transport controls after
an abort (e.g. post-export).
2019-12-06 21:28:48 +01:00
a664a50ab7
Fix Windows build 2019-12-06 20:22:00 +01:00
d73734af78
Mark .mp2 and .mp3 as valid file-extensions 2019-12-06 18:30:53 +01:00
d0b6c437ce
Implement mp3 import, using minimp3 2019-12-06 18:18:54 +01:00
bef74c267e
Add "seekable" SoundFile info (in prep for mp3 import) 2019-12-06 18:18:18 +01:00
227de8c1b0
Flatten nested try/catch clauses
This also consistently throws a failed_constructor() when instantiating
SoundFile fails, regardless of the actual exception
2019-12-06 18:16:10 +01:00
6d99e1b162
VKeybd: Set default MIDI port flags 2019-12-05 23:40:29 +01:00
9eac4936dc remove mistakenly left in session event enum 2019-12-05 13:13:16 -07:00
8b4e714006 changes to use overwrite-buffers when loop is disabled or loop range changed 2019-12-05 13:13:16 -07:00
551702b9e9
Fix for-loop condition (comma has no effect) 2019-12-05 18:23:49 +01:00
7d94e1e1f9
Fix well-known control LPF/HPF order. 2019-12-05 16:43:20 +01:00
fa6a21f94e
Ardour 6.0 Alpha - Enterprise Edition
Its 5 year mission
To explore strange new sounds
To seek out new bugs and new users
To boldly go where no Ardour session has gone before
2019-12-04 23:07:42 +01:00
d8c63568a5
Clear AudioEngine Error at app start 2019-12-04 19:02:16 +01:00
1f73668756
New approach for Lua bindings to avoid LuaBridge_API in GUI code
Declare DoubleArray in GUI context so that runtime uses the symbol
from the .exe (not the .dll).

This is mainly for the benefit of MSVC, that does not allow to use
LuaBridge_API in .exe
2019-12-03 17:55:37 +01:00
d3ca91a0b4
Libardour part of 1caef18 (Windows Lua bindings) 2019-12-03 02:29:37 +01:00
e3544db3aa
Amend previous commit, fluidsynth tables 2019-12-03 00:23:54 +01:00
d425f6dcb5
Update to fluidsynth-2.1
see https://github.com/FluidSynth/fluidsynth/releases/tag/v2.1.0

- new, less "ringing" reverb engine
- new, stereophonic chorus engine
- improved integrity checking of SoundFont modulators
...
2019-12-03 00:01:10 +01:00
5e1a73a28c
Add Lua typecast from C++ vector to C-Array
This is useful for MIDI bytes amongst other things
2019-12-01 21:32:10 +01:00
Stefan Westerfeld
be1012d64e
Fix thread-safety issue in a-fluidsynth.
This fix ensures that the a-fluidsynth "synth" object is not used in two
threads at the same time during midi event handling (run() in RT thread vs.
load_sf2() in worker thread), which could result in crashes.
2019-11-26 17:09:11 +01:00
c10df23a0f fix crash when using Region > Loop 2019-11-24 11:33:25 -07:00
9a8ca01cb0 remove debug output 2019-11-23 15:54:34 -07:00
f561cc6dc2 remove debug output 2019-11-23 15:54:21 -07:00
e75182b418 tweak comment text 2019-11-23 15:54:09 -07:00
205bfb9416 2nd part of fix for autoloop event removal when loop bounds are changed while looping 2019-11-23 15:53:54 -07:00
bcd47ebffb remove debug message about LOCATE WITHOUT DECLICK. This behavior is normal and legal when looping 2019-11-23 15:52:49 -07:00
d39f19f559 fix incorrect removal of autoloop event when loop bounds are changed while looping 2019-11-23 15:52:05 -07:00
dbf06eb2cf fix locate-while-rolling 2019-11-23 15:51:30 -07:00
8972f69e68 fix startup crash if no loop range is defined 2019-11-23 13:37:00 -07:00
d04c9b3244 more tweaks to correctly (or more correctly) reload disk reader buffers when loop fade choice changes 2019-11-23 00:09:46 -07:00
1a2665e25f redesign of declicking and fades around loop boundaries 2019-11-22 23:41:56 -07:00
98bcfb1485
Save VST paths after successful scan
Ardour only saves Config when the session is saved.
When changing the VST Path and starting a plugin-scan the newly
discovered plugins would otherwise not be avalable unless
the session is explicitly saved after a scan.
2019-11-22 20:06:43 +01:00
c2d44c0f05
Add support for LV2/KX transient-ID option 2019-11-22 20:01:32 +01:00
512c27d277
Fix buffer-overflow when vari-speeding
Session::process() can call split-cycle which offset the
buffer pointers. When vari-speeding at speed > 1.0, the
engine also splits the cycle every n_samples, to not exceed
the configured buffersize. This needs to take prior buffer
offsets into account.
2019-11-21 23:37:31 +01:00
d4ecfc7d85
Use new boost::optional API
get_value_or() has been deprecated since boost 1.56
2019-11-21 17:48:56 +01:00
53b1d17c60
Fix multi-channel de-click
_declick_amp gain needs to be reset for each channel before
the test (_declick_amp.gain() != target_gain) if de-clicking
is needed.
2019-11-21 02:54:19 +01:00
7fec401b8d
Fix declick offset position for multi-channel tracks 2019-11-19 16:20:28 +01:00
4534af0a4c DiskReader::_declick_offs should only advance once per ::run() call 2019-11-18 21:45:39 -07:00
9b92084ed6 DiskReader::_declick_amp needs to repeat the same work for each audio channel handled 2019-11-18 21:45:39 -07:00
530a4393dc fix transport FSM to stop first and declick later 2019-11-18 21:45:39 -07:00
5048b86d5d small changes to make declick out triggered by just stopping 2019-11-18 21:45:39 -07:00
c07db6d655 unset _reversed whenever RTMidiBuffer gets ::clear()'ed 2019-11-18 15:38:18 -07:00
75cb57194e add missing NULL check 2019-11-18 13:07:40 -07:00
e52fd47049
Latency compensation is independent of transport-logic
This also fixes a concurrency issue when when non-realtime-stop
and graph-reorder or other rt-latency changes coincide.
2019-11-18 20:22:08 +01:00
a8d62ce056 use reverse-reading of MIDI data in DiskReader 2019-11-18 12:01:43 -07:00
725a6fc67f support backwards reading of MIDI from RTMidiBuffer 2019-11-18 12:01:43 -07:00
80cab52a06 fix typo/thinko in logic to decide if MIDI buffers in DiskWriter require the butler (to write to disk) 2019-11-18 12:01:43 -07:00
3cf888498a
Fix automation lookup when rolling backwards 2019-11-18 15:55:32 +01:00
3b2b946d4e
NO-OP: simplify code
find_next_ac_event, needs to find the next event *after* (but not
at) start.

std::upper_bound returns an iterator pointing to the first element
in the range [first, last) that is greater than value.
This is equivalent to using std::lower_bound an iterating until
finding the first element greater than.
2019-11-18 15:55:17 +01:00
f49d11d5e3
Automation event lookup when rolling backwards
When rolling backwards we need to be able to find
the *next* event before "start".
2019-11-18 15:55:13 +01:00
8e8249b595 remove debug output 2019-11-15 20:42:15 -07:00
bd509bba49 fix questionable and not entirely intended change that was a part of dad47e445c 2019-11-15 20:40:23 -07:00
1c7e446cb4 better transport master behavior when working with sample-clock-synced transport masters 2019-11-15 16:06:04 -07:00
d64cf7a762 improve behavior when synced to JACK transport
Heuristic and actions when a locate is needed are different for
JACK transport than TC
2019-11-15 16:06:04 -07:00
098bce1ece improve initial coordinate with JACK transport state 2019-11-15 16:06:04 -07:00
3d74af6c1f better debugging message 2019-11-15 16:06:04 -07:00
a7613eb191 consolidate setting of "get roll after locate" in TFSM 2019-11-15 16:06:04 -07:00
4c688fe7f9 NO-OP: move brace 2019-11-15 16:06:04 -07:00
8f71b6430b when synced to JACK transport, transport requests go there first. 2019-11-15 16:06:04 -07:00
df4a30b1a0 fix behavior of Session::maybe_stop() when synced to JACK Transport 2019-11-15 16:06:04 -07:00
ba4e7015de make comment more accurate 2019-11-15 16:06:04 -07:00
5c9e7b8234 consolidate Session::locate() and Session::do_locate()
The first no longer needs to handle requests by passing them to
JACK transport
2019-11-15 16:06:04 -07:00
7199b657ba no need for MidiClockTransportMaster::starting() method 2019-11-15 16:06:04 -07:00
4637c49838 improve behavior of JACK transport sync callback.
Do not call transport actions directly, just report back to JACK
on transport status.
2019-11-15 16:06:04 -07:00