13
0
Commit Graph

15557 Commits

Author SHA1 Message Date
560994c97a repeat baf0cdcbef but for BaseUI, thus covering all control protocols 2020-01-05 11:40:59 -07:00
baf0cdcbef fix handling of flags in the OSC input handler
Some builds of glib on macOS end up delivering IO_PRI when IO_IN is also set. This differs from our own build stack
version, but it isn't really an error, so we should handle it.
2020-01-05 11:25:36 -07:00
John Emmas
45dd6a8ed3 Add a missing semicolon 2020-01-05 10:29:35 +00:00
32d3554761 add extensive comment for posterity 2020-01-03 18:41:47 -07:00
0b266a54f0
Return of image-surface backed canvas (windows graphics performance)
This partially reverts 2edbda2526.

Using cairo-groups increases performance on MacOS, and retains
retina-resolution.
However it adds a performance regression for MS Windows graphics
rendering. cairo-groups use a "similar" surface, not an image surface.
Empirically this adds significant overhead compared to rendering
using the CPU and using bitblt.
2020-01-04 00:30:07 +01:00
f892e5bcfa fix recent bad commit 2020-01-03 16:18:55 -07:00
fd5cd74214 fix DiskReader::overwrite_existing_audio()
Several math/geometry errors here
2020-01-03 16:13:23 -07:00
e7542c0611 NOOP: line refolding 2020-01-03 16:13:23 -07:00
eccbdd10e0
Remove debug output 2020-01-01 20:52:07 +01:00
d100c92731 convert GenericMIDI into a real control protocol module, with its own event loop and ports 2019-12-31 12:06:14 -07:00
1ced4067aa ensure that xmlKeepBlankDefault() is called early in instance-life, from PBD::init()
See comment for details on why
2019-12-31 12:06:14 -07:00
007136cc23 remove MIDI Control input and output ports from session-level objects 2019-12-31 12:06:14 -07:00
John Emmas
75aaae9963 Fix two more cases of of C99 strtoll() 2019-12-31 10:11:18 +00:00
def4be7285
Fix MSVC builds, use C89 strtol() instead of C99 strtoll()
For the case at hand (plugin scale-points) it's highly unlikely to
encounter numbers > INT_MAX.
2019-12-30 19:05:51 +01:00
60ccbcf9cc use a local version (copy) of the G_SOURCE_FUNC macro, since it is not available in the GTK+ version we use for the official build stack 2019-12-30 09:49:23 -07:00
3ee08bbae7
Revert "fix a cast warning (as recommended in GTK+ docs"
This reverts commit af30a6f001

because it breaks OSX/MacOS builds:
libs/surfaces/mackie/mackie_control_protocol.cc:945: error: 'G_SOURCE_FUNC' was not declared in this scope
2019-12-30 16:00:22 +01:00
d79d2807b1 expand use of new BasicUI API for transport button state to all control surfaces 2019-12-29 18:53:22 -07:00
52aa405ce3 use new Session API to deal with transport state
Transition to use BasicUI button state API to come
2019-12-29 18:43:51 -07:00
e46e6f12a3 use new BasicUI and Session API to deal with transport state 2019-12-29 18:43:51 -07:00
a8cc5b1303 provide new methods for BasicUI that wrap the "complexity" of how to show transport state via lit buttons 2019-12-29 18:43:51 -07:00
6383d4f6a6 recomment a DEBUG_TRACE statement that generates too much output with -D transport 2019-12-29 18:43:51 -07:00
30226fdc2a add EMIT_SIGNAL comment 2019-12-29 18:43:51 -07:00
719c3f1457 add Session::transport_stopped_or_stopping()
Session::TransportStateChanged notifies about transport stop before the stop is complete (i.e. at the start of the declick).
Various other objects (notably control surfaces) connect to this signal and use it to modify their displayed state.
We need a method that can tell them we are stopped (or stopping) even though we are not "fully" stopped yet. This is
that method
2019-12-29 18:43:51 -07:00
af30a6f001 fix a cast warning (as recommended in GTK+ docs 2019-12-29 18:43:51 -07:00
bb232b6ec4
Use human-numeric-sort for plugin scale-points 2019-12-29 19:48:45 +01:00
04a409df6f
Add a numerically_less compare operator
This is similar to sort(1) --human-numeric-sort,
as opposed to naturally_less() negative numbers, hex-prefixes
and SI metric prefixes are taken into account.
2019-12-29 19:47:48 +01:00
ed67f465fb fix JACK transport sync
key change: to sync with JACK always locate jack-position PLUS buffer-sized-rounded-worst_latency_preroll() ahead
2019-12-27 21:18:12 -07:00
5cdeb2401f add new Session method to return the worst_latency_preroll() value rounded up to the nearest buffer size 2019-12-27 21:18:12 -07:00
ca36d7cc2f register TransportState enum for use with enumwriter 2019-12-27 21:18:12 -07:00
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
0b52ea7a9c add a bit of debugging to JACK transport code 2019-11-15 16:06:04 -07:00
302fe227b8 fix resampling ratio when stopped (corner case - not typically called) 2019-11-15 16:06:04 -07:00
ec2ba35997 move DiskReader::inc_no_disk_output() into .cc to allow for easier debugging 2019-11-15 16:04:58 -07:00
16c571c9b6 fix crash with -D slave caused by too-early use of a transport master's _port member 2019-11-15 16:04:58 -07:00
8a847dbf34 fix oddly damaged code (vs. 5.x) for EngineSlave core methods (JACK transport) 2019-11-15 16:04:58 -07:00
c69227fd8d eliminate hacky design for being able to deliver the correct time as JACK timebase master 2019-11-15 16:04:58 -07:00
2f87b111e5 fix up the creation & state restore of the TransportMasterManager 2019-11-15 16:04:58 -07:00
3c446a5275
Fix cycle-end position when not rolling
When stopped start_sample == end_sample.
This fixes accidental automation lookup,
as well as plugin time/position information.
2019-11-14 21:50:00 +01:00
32cfed6253
Relax LV2 time-info re-transmission condition
Allow beat (quarter-note count) to drift by 1/100 beat before re-sync.
This prevents excessive re-transmissions
2019-11-14 21:37:14 +01:00
6481437f0a
LV2 extension for host's time-scale vari-speed
Ardour 6 internally always runs at speed 1.0 (or -1.0, or stopped 0.0).
There is no vari-speed that scale "BPM" or "n_sample" time progression
per cycle.

Instead Ardour 6 vari-speed mechanism transparently re-samples I/O.
So process-time is scaled only relative to wall-clock time.

From a plugin's POV this is similar to "freewheeling": The plugin
processes data as if the host plays at speed 1.0. While the host
plays this data at a different rate.

Some plugins may like to be informed about the host's actual
playback rate.

Currently this is mainly for the benefit of github.com/x42/repitch.lv2.git
2019-11-14 21:15:30 +01:00
3e99856f76
Initialize uninitialized variables
This also ensures that musical-time information is initially
transmitted to a plugin.
2019-11-14 20:03:22 +01:00
d171bbf337
Allow vari-speed slowdown down to 2% 2019-11-14 19:39:48 +01:00
4c9da04584
Amend previous commit - latch toggles only while rolling 2019-11-13 22:15:46 +01:00
dbd327e692
Automation watch toggle buttons and enforce latch 2019-11-13 22:02:07 +01:00
74f8db2def
Remove boolean automation special case
Previously setting a boolean-control to "write" and roll did not
create an automation-point.

The state was not correctly captured.
The boolean-control needed to be toggled explicitly to create
an automation point.
2019-11-13 17:21:51 +01:00
ff301419b3
Fix automation-write when locating
When locating while writing automation, begin a new write-pass,
and add a guard point at the locate target position.

NB set_in_write_pass takes 3 arguments: (write_enable, add_point, when)
the last two default to false, 0.
2019-11-13 16:57:28 +01:00
7d90ad4023
Fix bool-automation anchor
Typo sneaked in from ff2f93497...cc7de475f2
2019-11-13 16:53:46 +01:00
de02201056
Add API to query if a given MIDNAM is plugin-provided 2019-11-12 06:28:02 +01:00
4a5c9c759b
Only retain control-port connections
When MIDI input follows selection, ports that provide music-data
should be disconnected, even if they *also* provide control-data
2019-11-11 23:37:11 +01:00
Christopher Arndt
8fe978a8e5 Log warning if host does not support midnam/bankpatch extensions
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
2019-11-10 00:49:18 +01:00
Christopher Arndt
d6ed5c2080 Fix segfault: don't try to use midnam:update extension if host doesn't support it
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
2019-11-10 00:47:57 +01:00
b157e1a09a
Remove invalid error message
This clause is in NO_VFORK, vfork_exec_wrapper is irrelevant there
2019-11-09 06:30:46 +01:00
a8a699133e
Fix child-process communication (video monitor in particular)
103ef2ba08 introduced an API to write raw data (const void*)
to a child process, along with the previous API to
write (std::string const&)

VideoMonitor uses write_to_stdin("fixed text"), and g++
interprets this to use the (const void*) API instead
of the std::string, which breaks communication.
2019-11-09 06:28:55 +01:00
9b0ffbfb94
Fix Metronome: use loop-range only when looping 2019-11-08 22:49:46 +01:00
5daa0fca7c
Fix tempo-grid calculation: prevent duplicate events, enforce range 2019-11-08 22:49:23 +01:00
240e3e8dc0
Fix uninitialized value
ARDOUR::LV2Plugin::init -> lilv_state_restore () -> set_port_value ()
compares new against current value
2019-11-08 21:01:28 +01:00
bd90499532
Ignore latency of inactive routes 2019-11-08 17:50:26 +01:00
41ad43fa5f
Remove unused signal 2019-11-08 17:50:23 +01:00
181bc74ae2
Click: pre-allocate memory for grid-point lookup 2019-11-08 17:50:19 +01:00
804f9c9bde
Fix metronome when looping 2019-11-08 17:50:16 +01:00
08fdb98262
Fix loop/pre-roll
Pre-roll to fill buffers only needs to be done once when starting
to play or when locating.

Seamless looping just continues. Every processor takes the loop
position into account locally.
2019-11-08 17:50:13 +01:00
f37758ffb7 remove stacktrace 2019-11-06 23:55:46 -07:00
dad47e445c remove debug output 2019-11-06 23:54:47 -07:00
f04ee50375 do not transition "back" to Rolling by calling start_transport() if a locate was for loop-end
We never stopped the transport, so there's no reason to start it again. Doing so causes alignment problems
because all tracks have their ::run() ranges reinitialized
2019-11-06 23:54:34 -07:00
625b8297ea fix unconditional note resolution during DiskReader::realtime_locate()
When looping, we do not want to resolve notes at the end of the loop via ::realtime_locate() -
::get_midi_playback() has already taken care of this. But when not looping, we need this. So,
add an argument to tell all interested parties whether the locate is for a loop end or not
2019-11-06 22:12:40 -07:00
6f4e838a58 add a signal to Gtkmm2ext::Keyboard to allow (possible) handling of close-current-dialog 2019-11-06 16:25:30 -07:00
febaa1ff2d fix unconditional note resolution during DiskReader::realtime_locate()
When looping, we do not want to resolve notes at the end of the loop via ::realtime_locate() -
::get_midi_playback() has already taken care of this. But when not looping, we need this. So,
add an argument to tell all interested parties whether the locate is for a loop end or not
2019-11-06 16:00:31 -07:00
9694f89966
Use strict-i/o on master-bus by default
This precludes issues with multi-out-plugins adding an excessive
number of ports and changing master-panning.
2019-11-06 20:05:50 +01:00
f61f938503 remove debug message 2019-11-06 09:28:23 -07:00
24252b92c6 move at-exit messages about pool utilization to DEBUG_TRACE 2019-11-06 09:27:49 -07:00
d5cfc898e4 resolved notes need to use cycle-relative time 2019-11-06 09:07:12 -07:00
cd7fc3711a be sure to move effective_start while loop-reading MIDI 2019-11-06 09:03:55 -07:00
cc741bdea5 fix DiskReader::get_midi_playback() when looping
Although at the Session level we never run "through" the loop end,
latency compensation means that that start/end sample values passed to
Processor::run() may cross the loop end. Fix how we handle this so
that we do not read data from after the end of the loop
2019-11-06 08:58:09 -07:00
0bb34edec0 improve comment about warning message 2019-11-06 08:56:50 -07:00
7d67789a3f fix a bad transition in the transportFSM. 2019-11-04 14:35:18 -07:00
62c4e88a9d avoid use of Port::port_offset() everywhere except Port::flush_buffers() and Port::get_buffer()
Split cycles are run as if they are an entire self-contained cycle, starting at zero and running for "nframes".

We adjust the timing and position of data only when retrieving and writing it to Port buffers.
2019-11-04 12:57:19 -07:00
47672fceec rename method argument to better reflect its intended role 2019-11-04 12:52:34 -07:00
fd198c373c when resolving notes for a locate, use zero as the timestamp, not the current Port::port_offset()
All _immediate_events data gets written to the output buffer at the end of the current (split) cycle anyway, so the
timestamp is irrelevant (as long as it is zero, and will therefore be read by ::snapshot_out_of_band_data()
2019-11-03 11:02:10 -07:00
4a99efe588 another notable cleanup/simplification of DiskReader's MIDI handling
Note that we resolve notes from the tracker directly into the output buffer. This happens
after an edit causes a buffer overwrite
2019-11-03 09:20:50 -07:00
a7487bd040 comment fix 2019-11-03 09:20:00 -07:00
90983d21d3 immediate events time reference for zero is the start of the run() cycle, not absolute sample time 2019-11-03 07:58:35 -07:00
2fde6a5777
Correctly flush MIDI buffers on cycle-split 2019-11-03 15:19:37 +01:00
98224a264e
Clarify MIDI-port event-timestamp debug-message 2019-11-03 15:19:37 +01:00
e371e8a51a
Fix timecode generation after split-cycles 2019-11-03 15:19:37 +01:00
John Emmas
b412ca7215 Add/remove source(s) in our MSVC project (libardour) 2019-11-03 13:46:30 +00:00
John Emmas
c7bdc38c95 Accommodate some recently moved/renamed folders and source files (libevoral) 2019-11-03 13:46:29 +00:00
01f65f557f
Fix build -- 'printf' was not declared in this scope 2019-11-03 14:15:11 +01:00
ba8e5aea56
Fix compiler warning 2019-11-03 04:14:52 +01:00
f9131d24d3 for now, show how long MIDI rendering takes 2019-11-02 19:38:01 -06:00
9a6350b9c9 use playback filter when rendering MIDI; respond to changes in filter by re-rendering 2019-11-02 19:38:01 -06:00
ee67d2d749
Auto-connect input should not disconnect other ports
This fixes an issue with existing MIDI routing between MIDI tracks
and/or busses. Automatic MIDI connections should only dis/re-connect
ports that are explicitly configured in Preferences > MIDI Ports
and leave all other connections alone.
2019-11-03 00:28:53 +01:00
7b25a89944 part 1 of replicating semantics of ARDOUR_UI::toggle_roll() in BasicUI::toggle_roll()
This can be done better, even without sharing code
2019-11-02 16:32:18 -06:00
5025b939c6 comment update 2019-11-02 16:32:18 -06:00
003fed93bf use new API to make locate happen 2019-11-02 16:32:18 -06:00
abf5f2bae0 don't locate when enabling loop if loop-is-mode 2019-11-02 16:32:18 -06:00
eee8eb1005 allow explicit "with-roll" argument to a locate to override Session::should_roll_after_locate() 2019-11-02 16:32:18 -06:00
5241cdcf03 remove unused parameter from Session::set_play_loop() API 2019-11-02 16:32:18 -06:00
31fea25005 lovely simplification of DiskReader::get_midi_playback()
This is made possible by knowing that it is never called upon to read across
loop boundaries. The session splits the process cycle for the end of the loop
2019-11-02 16:32:18 -06:00
cd2618246a make it more likely that debug messages are printed without x-thread interruption 2019-11-02 16:32:18 -06:00
5e13770e1f NOOP: newline removed 2019-11-02 16:32:18 -06:00
81b38c110a remove unused (empty) API 2019-11-02 16:32:18 -06:00