13
0
Commit Graph

15256 Commits

Author SHA1 Message Date
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
3ec845b1ef remove unused API 2019-11-02 16:32:18 -06:00