Commit Graph

18360 Commits

Author SHA1 Message Date
dc826c6521 ArdourCanvas Rectangle: allow subclasses access to _rect 2021-12-07 16:32:49 -06:00
0ee628d170
Add preference to show fader on meter-bridge 2021-12-07 17:56:35 +01:00
7b8be04623 triggerbox: fix mis-designed handling of dest_offset when a trigger starts within the same run() call as another 2021-12-06 14:06:48 -07:00
bc7e14c8ac remove misleading content from a comment 2021-12-06 14:05:59 -07:00
0a0ca81e11 triggerbox: add missing property defn 2021-12-06 10:36:57 -07:00
ef9cca2c07 triggerbox: add missing property defn 2021-12-06 10:27:59 -07:00
a14bcc455b triggerbox: more properties for Triggers 2021-12-06 09:26:18 -07:00
4918e4bcb9 triggerbox: change return type for Triggerbox::currently_playing(); add position-as-fraction to Triggerbox 2021-12-06 09:06:46 -07:00
9a89dd8981 triggerbox: add TriggerBox currently_playing property, and rename ::currently_running() to ::currently_playing 2021-12-06 08:57:06 -07:00
86f239f185 triggerbox: add 3 additional property descriptors for Triggers 2021-12-06 08:47:29 -07:00
96b21c4824 fix crash in Playlist::relayer() when there are no regions 2021-12-05 10:36:26 -07:00
17832e9f86 remove another instance of std::numeric_limits<timecnt_t>::max() 2021-12-05 09:24:13 -07:00
887cd070b0 remove another instance of std::numeric_limits<timepos_t>::max() 2021-12-05 09:23:33 -07:00
a72108636b remove another instance of std::numeric_limits<timecnt_t>::max() 2021-12-05 09:23:05 -07:00
646d1e9a22 remove use of std::numeric_limits<time{pos,cnt}_t> from Playlist
::max() is time-domain dependent, and cannot be encapsulated via a single value.
2021-12-05 09:01:49 -07:00
d29d40c1ec
Fix stacked region view
Previously this looped endlessly in RegionView::update_coverage_frame()
if the return value was undefined (or wrong time-domain) and smaller
than pos.
2021-12-05 15:05:12 +01:00
af0e6872b4 triggerbox: handle None trigger follow action 2021-12-04 13:33:32 -07:00
c1de82f833 triggerbox: fix return value from MidiTrigger::run() when there was an event
last_event_samples was being set to buffer/process()-relative samples, but
needed to be timeline-relative samples.
2021-12-04 13:25:33 -07:00
65c69b6818 triggerbox: resolve MIDI notes at end of buffer, not one beyond the end 2021-12-04 11:50:31 -07:00
b3f866b86e triggerbox: more debug trace statements 2021-12-04 11:50:31 -07:00
4a13a1fa62 triggerbox: fix up what happens at the end of a MIDI trigger 2021-12-04 11:50:31 -07:00
050b046e4d triggerbox: stop immediately when stop_all() is used 2021-12-04 11:50:31 -07:00
0c7d578199 NOOP: comments to document Trigger state enum and some methods 2021-12-04 11:50:31 -07:00
Houston4444
36a2fb1ba8
JACK: re-create backend when re-connecting to the server
This updates the client-name when re-connecting to the
server, which is apparently useful with NSM.
2021-12-04 14:39:22 +01:00
John Emmas
6eb1559f79 Use std::vector<Sample*> rather than a simple array
(for a simple stack-based array, MSVC requires that the size should be known at compile time)
2021-12-03 14:31:45 +00:00
948fc37b47
Remove '\0' from source file 2021-12-03 13:53:08 +01:00
cc34eac4a5
Fix new_midi_track Lua binding
see also e9401a945f
and 1c0593201c
2021-12-03 13:34:42 +01:00
1c0593201c
Allow Lua bindings up to 12 method arguments 2021-12-03 13:32:49 +01:00
2b6b7226b0 triggerbox: more substantial changes to the new (justifiable) design; audio triggers seem ok, MIDI triggers untested 2021-12-02 11:27:35 -07:00
3b5dbf2252
Mark new Tracks with TB to present them 2021-12-01 23:10:07 +01:00
3a2566b4af
Add API to set TriggerTrack flag
This is intended to decide if a track will be visible on the
Trigger-Tab/Page. It should be kept in sync with trigger-processor
enable.
2021-12-01 23:10:04 +01:00
7edbf06420 PluginInsert::silence() should never change the status of _active 2021-12-01 13:26:27 -07:00
ebc5195490 switch to a more efficient implementation of Processor::check_active() 2021-12-01 13:26:27 -07:00
786388b5b6
Fix connections when re-starting engine
The connection was stored by the Port where it was initiated from:

1. Connect A to B
2. Disconnect B from A

(1) Port A remembers the connection to B
(2) Port B does not know about the connection from A

Since disconnect is initiated on port B, port A still retained
the connection information.

When restarting the engine, Port::reconnect() reestablished the
connection.

This is only relevant when libardour's own connection information is
used. e.g. the session is closed without engine, or when re-starting
the engine while the session is open.
2021-11-30 19:41:39 +01:00
a393f75694
Use shared port engine MIDI event compare operator 2021-11-30 19:41:39 +01:00
dbd8089fb8
Sort concurrent MIDI events on port-level #8828
See also 8dbbc19567 as well as
Evoral::Sequence<Time>::const_iterator::choose_next
ARDOUR::MidiBuffer::second_simultaneous_midi_byte_is_first
2021-11-30 19:41:39 +01:00
e56085b581 triggerbox; quick pass at fixing up MIDI triggers to work with the new scheme (untested)
This also removes the call to the now-removed ::peek_next_trigger()
2021-11-30 07:57:34 -07:00
8fa62eac7a triggerbox: significant redesign of trigger mechanisms
Changes include workarounds for weird Rubberband API (pad, drop, truncate requirements),
and a shift to push logic after a slot is finished back up into the TriggerBox.

Not finished yet, some easily encountered bugs remain
2021-11-29 21:50:29 -07:00
940d8844e3 temporal: fix implementation of Beats::snap_to(), and add variants
::snap_to() was intended to round a Beats value to the nearest multiple
of another Beats value. It did not do that, but instead rounded down.
Worse, it used Beats::operator/ which in turn uses int_div_round(),
which is incorrect for a situation where we need integer truncation.

The changes fix the actual arithmetic and add 2 variant functions so that the
API includes round down, round up and round to nearest.
2021-11-29 21:50:29 -07:00
83c7ac4f38 libardour: use Processor::check_active() in all Processors instead of per-processor code
There are a few exceptions where the semantics make this too complex to be worth forcing check_active()
2021-11-29 21:50:29 -07:00
59ac52f113 libardour: provide Processor::check_active() as a standard way to handle Processor::_{pending_,}active 2021-11-29 21:50:29 -07:00
d3fe3ab866
Fix Lua namespace -- correctly close Tempo.Type 2021-11-28 21:10:29 +01:00
878393e68b temporal: fix construction of timepos_t and timecnt_t with max_sample{pos,cnt}
max_samplepos and max_samplecnt and both INT64_MAX which is (a) too large to fit into a signed 62 bit
integer and (b) definitely too large to be represented in a signed 62 bit superclock value.

Move the constructors that use samplepos_t into the .cc file, and treat these two values as special
cases that mean "as large/late/huge/long as possible".
2021-11-22 10:35:52 -07:00
d71b3100d8 temporal: handle negative positional values that somehow appear in older sessions 2021-11-22 10:28:13 -07:00
b2f0d31630
Cont'd work on concurrent Signal, Connection destruction
see also 992c727959
and 7580d6aba7

Spin to prevent race between d'tor setting `in_dtor`
and acquiring Signal::_mutex.
2021-11-21 04:12:24 +01:00
992c727959
Cont'd work on concurrent Signal, Connection destruction
See also 7580d6aba7
2021-11-21 03:27:50 +01:00
031b858f47
LV2: check parent class/category -- not child categories 2021-11-21 03:27:43 +01:00
7580d6aba7
Fix race condition when ~Signal and ~ScopedConnection run concurrently
Previously a deadlock was possible:

Thread 1:
  ~ScopedConnection ()
  -> Connection::disconnect ()
     takes Connection::_mutex             <<<< 1
  -> _signal->disconnect (shared_from_this ())
  -> Signal::disconnect ()
     takes Signal::_mutex                 <<<< 2

Thread 2:
 ~Signal ()
     takes Signal::_mutex                 <<<< 2
  -> Connection::signal_going_away ()
     takes Connection::_mutex             <<<< 1
2021-11-20 23:14:59 +01:00
ee8e8da614
Stop auto-connect thread before terminating ctrl surfaces
This works around a race-condition, calling d'tors from
two threads concurrently.

The GUI thread destroys ctrl surfaces. ~~MIDIControllable()
calls ::drop_external_control() -> ::midi_forget()
This unsubscribes from signals (notably MIDI::Parser events)
by calling ScopedConnection::disconnect(), Connection::disconnect().

At the same time auto_connect_thread can call
PortManager::clear_pending_port_deletions() which removes
the MIDI port and destorys the MIDI::Parser.

~Parser() calls Connection::signal_going_away() to invalidate
connected signals.

This can deadlock if it is called concurrently with
Connection::disconnect() on the same signal.

see also
https://discourse.ardour.org/t/ardour-session-close-hangs/106523/10
2021-11-20 23:14:42 +01:00
0837449749 triggerbox: handle MIDI trigger timing in realtime, not pre-rendered
This allows MIDI to follow the tempo map
2021-11-19 14:50:55 -07:00