Commit Graph

11554 Commits

Author SHA1 Message Date
Robin Gareus
ce15b6ed66 Cont'd work on TempoMap Lua bindings 2021-12-11 17:43:12 +01:00
Robin Gareus
3b18b025e3 Fix Lua TempoMap bindings
* Resolve ambiguity between typef'ed ARDOUR::timepos_t and
  Temporal::timepos_t (and timecnt_t, superclock_t)
* Add missing classes TempoPoint, MeterPoint, which are
  return value for various TempoMap methods.
* Change TempoMap into a shared_ptr<> class.
* Move Tempo and Meter out of ARDOUR into Temporal namespace.
* add various bindings to access the TempoMap
* move Temporal enums out of ARDOUR::Temporal namespace
2021-12-11 16:49:28 +01:00
Robin Gareus
60be0c27a1 Use updated temporal API 1/2 2021-12-11 14:42:36 +01:00
Ben Loftis
3918ee2ed6 Add New Region variables for Clips
Properties are created for announcing changes, but values are not actually stored as undo-able properties.
2021-12-08 12:57:48 -06:00
Robin Gareus
0ee628d170 Add preference to show fader on meter-bridge 2021-12-07 17:56:35 +01:00
Paul Davis
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
Paul Davis
bc7e14c8ac remove misleading content from a comment 2021-12-06 14:05:59 -07:00
Paul Davis
0a0ca81e11 triggerbox: add missing property defn 2021-12-06 10:36:57 -07:00
Paul Davis
ef9cca2c07 triggerbox: add missing property defn 2021-12-06 10:27:59 -07:00
Paul Davis
a14bcc455b triggerbox: more properties for Triggers 2021-12-06 09:26:18 -07:00
Paul Davis
4918e4bcb9 triggerbox: change return type for Triggerbox::currently_playing(); add position-as-fraction to Triggerbox 2021-12-06 09:06:46 -07:00
Paul Davis
9a89dd8981 triggerbox: add TriggerBox currently_playing property, and rename ::currently_running() to ::currently_playing 2021-12-06 08:57:06 -07:00
Paul Davis
86f239f185 triggerbox: add 3 additional property descriptors for Triggers 2021-12-06 08:47:29 -07:00
Paul Davis
96b21c4824 fix crash in Playlist::relayer() when there are no regions 2021-12-05 10:36:26 -07:00
Paul Davis
17832e9f86 remove another instance of std::numeric_limits<timecnt_t>::max() 2021-12-05 09:24:13 -07:00
Paul Davis
887cd070b0 remove another instance of std::numeric_limits<timepos_t>::max() 2021-12-05 09:23:33 -07:00
Paul Davis
a72108636b remove another instance of std::numeric_limits<timecnt_t>::max() 2021-12-05 09:23:05 -07:00
Paul Davis
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
Robin Gareus
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
Paul Davis
af0e6872b4 triggerbox: handle None trigger follow action 2021-12-04 13:33:32 -07:00
Paul Davis
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
Paul Davis
65c69b6818 triggerbox: resolve MIDI notes at end of buffer, not one beyond the end 2021-12-04 11:50:31 -07:00
Paul Davis
b3f866b86e triggerbox: more debug trace statements 2021-12-04 11:50:31 -07:00
Paul Davis
4a13a1fa62 triggerbox: fix up what happens at the end of a MIDI trigger 2021-12-04 11:50:31 -07:00
Paul Davis
050b046e4d triggerbox: stop immediately when stop_all() is used 2021-12-04 11:50:31 -07:00
Paul Davis
0c7d578199 NOOP: comments to document Trigger state enum and some methods 2021-12-04 11:50:31 -07: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
Robin Gareus
948fc37b47 Remove '\0' from source file 2021-12-03 13:53:08 +01:00
Robin Gareus
cc34eac4a5 Fix new_midi_track Lua binding
see also e9401a945f
and 1c0593201c
2021-12-03 13:34:42 +01:00
Paul Davis
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
Robin Gareus
3b5dbf2252 Mark new Tracks with TB to present them 2021-12-01 23:10:07 +01:00
Robin Gareus
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
Paul Davis
7edbf06420 PluginInsert::silence() should never change the status of _active 2021-12-01 13:26:27 -07:00
Paul Davis
ebc5195490 switch to a more efficient implementation of Processor::check_active() 2021-12-01 13:26:27 -07:00
Robin Gareus
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
Robin Gareus
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
Paul Davis
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
Paul Davis
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
Paul Davis
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
Paul Davis
59ac52f113 libardour: provide Processor::check_active() as a standard way to handle Processor::_{pending_,}active 2021-11-29 21:50:29 -07:00
Robin Gareus
d3fe3ab866 Fix Lua namespace -- correctly close Tempo.Type 2021-11-28 21:10:29 +01:00
Robin Gareus
031b858f47 LV2: check parent class/category -- not child categories 2021-11-21 03:27:43 +01:00
Robin Gareus
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
Paul Davis
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
Ben Loftis
11543b1c9b Deinterlace MIDI: split a midi region into per-channel regions (libardour part)
code is similar-but-different-from Importing with split-midi-channels enabled
2021-11-19 10:28:37 -06:00
Paul Davis
5ba6e14310 triggerbox: catch a very strange condition via abort(), to help with debugging.
Not easily reproducable, but definitely a bug somewhere.
2021-11-17 21:16:38 -07:00
Paul Davis
ddf93aca19 triggerbox: make a somewhat half-baked attempt to resync a trigger that ended too early.
Instead of just restarting it inside the same ::run() call, mark it as waiting,
so that it will restart at the next quantization point.

This isn't a final or even fully correct solution, but it's a useful test of
the idea.
2021-11-17 21:14:56 -07:00
Paul Davis
c24cabead0 GUI changes to follow TempoMap::sample_at() API changes 2021-11-17 15:57:30 -07:00
Paul Davis
d61fc1e871 triggerbox: add passthru property to control input passthrough (monitoring) 2021-11-17 12:16:39 -07:00
Paul Davis
1fb8779361 delete/cancel triggerbox worker thread at exit 2021-11-17 12:16:39 -07:00