Commit Graph

33777 Commits

Author SHA1 Message Date
Ben Loftis 50430f134d New region-property placeholders should not be Properties (mostly reverts 045cf7)
Properties are created for announcing changes, but values are not actually stored as undo-able properties.
2021-12-06 18:13:17 -06:00
Ben Loftis 3186a85b0c PropertyBoxen: add some proposed audio-region property controls. (can be squashed) 2021-12-02 11:26:17 -06:00
Ben Loftis 7635e5e6a2 Property Boxen: handle more {audio|midi} cases; move code around. (can be squashed) 2021-12-02 10:50:19 -06:00
Ben Loftis ab44ede65d Property Boxen: populate the Trigger page with property-editor placeholders 2021-12-01 23:52:03 -06:00
Ben Loftis 99ce14558b PropertyBoxen: provide all slot property editors in a popup dialog (?) 2021-12-01 23:51:18 -06:00
Ben Loftis 2b0eb2ac5d squash to de-canvas 2021-12-01 23:50:16 -06:00
Ben Loftis 045cf7709f Add New Region Properties for Clips 2021-12-01 23:08:51 -06:00
Ben Loftis c07a7736b7 PropertyBoxen: move selection-properties into the sidebar 2021-12-01 23:08:51 -06:00
Ben Loftis aff4715eb2 PropertyBoxen: initial draft of property-editing widgets that follow the Selection 2021-12-01 23:08:51 -06:00
Ben Loftis f315778d10 PropertyBoxen: Publish some region operations to PublicEditor so we can access them more easily 2021-12-01 23:08:51 -06:00
Ben Loftis f5a9c7118c Trigger_UI: De-Canvas the trigger_ui widget so it can be reused in other places 2021-12-01 22:35:25 -06:00
Ben Loftis 87b052085e Trigger_UI: change API to use set_trigger() instead of constructor arg 2021-12-01 22:35:25 -06:00
Ben Loftis 0e60872950 Selection: Region Operations in a Slot need a RegionView proxy (ToDo) 2021-12-01 22:35:25 -06:00
Ben Loftis 210fa7a97a Selection: make trigger slots more exclusive wrt some other selectables 2021-12-01 22:35:25 -06:00
Robin Gareus 59b012ddb0
Implement TriggerStrip and TriggerPage (WIP) 2021-12-01 23:10:08 +01:00
Robin Gareus 9ce604bc03
New Tabbable: Trigger-Page skeleton 2021-12-01 23:10:08 +01:00
Robin Gareus 229a8aea13
Add option to toggle TriggerBox PI
This does not show/hide the Triggerbox in the Mixer itself,
it only sets the presentation-info flag (to be used on the Trigger Page).
2021-12-01 23:10:07 +01: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 a393f75694
Use shared port engine MIDI event compare operator 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 f584335f28 follow Beats API change in MidiRegionView::paste_internal() 2021-11-29 21:50:29 -07:00
Paul Davis 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
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 797bc1a162
Correct namespace of constants in some Lua scripts 2021-11-28 21:10:32 +01:00
Robin Gareus d3fe3ab866
Fix Lua namespace -- correctly close Tempo.Type 2021-11-28 21:10:29 +01:00
Ben Loftis 60e522f4ee MIDI Program Changes: Fix some thinkos in patch-change flag locations
Program Changes are stored as an offset from the 'source' start, and must be translated to/from region time.

Better locating of patches wrt the grid:
You can't assume time_to_pixel is steady across the timeline
* calculate position of the patch-change flag
* calculate region start position, and set flag's x offset from there

also: consolidate patch-location code into display_patch_changes()
2021-11-23 14:14:35 -06:00
Ben Loftis c27bfde045 MIDI Program Changes: prevent patch-changes from moving after every edit by the dialog.
The clock widget shows absolute time but must be converted to+from source time
2021-11-23 14:14:35 -06:00
Ben Loftis 5212fc9677 MIDI Program Changes: dragging patches was resulting in the wrong location or disappearing altogether
a Program Change's position is referenced from the midi Source which might not be the same as the region start
2021-11-23 14:14:35 -06:00
Paul Davis 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
Paul Davis d71b3100d8 temporal: handle negative positional values that somehow appear in older sessions 2021-11-22 10:28:13 -07:00
Robin Gareus f112697be8
Spice up signal-test tool 2021-11-21 18:29:38 +01:00
Robin Gareus beddcf1a01
Test cross thread invalidation-record
This also tests 2 receivers connected to the same signal
2021-11-21 04:12:27 +01:00
Robin Gareus 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
Robin Gareus 992c727959
Cont'd work on concurrent Signal, Connection destruction
See also 7580d6aba7
2021-11-21 03:27:50 +01:00
Robin Gareus 031b858f47
LV2: check parent class/category -- not child categories 2021-11-21 03:27:43 +01:00
Robin Gareus ba1e2d13c5
Add tool to test PBD::signal d'tor race-condition 2021-11-20 23:15:02 +01:00
Robin Gareus 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
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 ec88635555 MIDI Draw: potential workaround for sticky menu items at startup 2021-11-19 13:01:54 -06:00
Ben Loftis 84111a343e Deinterlace MIDI: gui part 2021-11-19 10:28:37 -06: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
Ben Loftis ca7e133e3d MIDI Draw: fix thinko in length=Auto 2021-11-19 10:28:37 -06:00