Commit Graph

18323 Commits

Author SHA1 Message Date
f5fb65a3f8 remove unused local variabl 2021-10-25 13:17:18 -06:00
f9b604b614 triggerbox: start to work on details of MidiTrigger::run() 2021-10-25 12:53:49 -06:00
76d3238fa6 triggerbox: member variable rename to make things slightly clearer 2021-10-25 12:53:27 -06:00
8fd25e15c0 triggerbox: cleanup parts of Trigger API and finish initial pass of MidiTrigger implementation 2021-10-24 09:27:14 -06:00
2b754568a0 changes/extensions to RTMidiBuffer API to make it more suitable for slots/triggers 2021-10-24 09:26:35 -06:00
7339aa7c0d triggerbox: new API to set from region (selection) 2021-10-24 09:25:11 -06:00
600e0b21e8 fix a misleading comment 2021-10-21 11:16:55 -06:00
ef20e8e5df triggerbox: remove unused midi_trigger_map 2021-10-20 16:58:00 -06:00
d252beb807 triggerbox: add MIDI triggers when asked 2021-10-20 16:53:52 -06:00
d4ef49b504 triggerbox: skeleton framework for MIDI triggers (non-functional) 2021-10-20 16:19:09 -06:00
6695423fe7 triggerbox: replace implicit queue with single pointer (up_next) 2021-10-19 19:08:52 -06:00
7215b10007
Remove accidentally commited file 2021-10-20 01:27:04 +02:00
9f55e7f5d3 triggerbox: add scalable MIDI velocity effect for gain control of triggers 2021-10-19 12:52:32 -06:00
2d3371c049 triggerbox: fix ::set_state() to pick Processor state too 2021-10-19 12:07:52 -06:00
211b3ea668 canvas text: generalize ::font_size_for_height() to handle different font families 2021-10-19 10:54:27 -06:00
1d1cc04b32 triggerbox: add Trigger -> TriggerBox accessor 2021-10-17 17:57:43 -06:00
ab22733fe4 canvas: continuously variable Canvas::Text height if packed inside a layout-sensitive container 2021-10-17 17:56:27 -06:00
d6e4e0fb35
Remove false-positive VST log message
Ardour prevents repeat crashes by first marking a plugin
as blacklisted, and after a successful scan the plugin is
whitelisted.

When not scanning for plugins, but reading the cache
and successfully parsing the cashed content, a VST2 plugin
is whitelisted, even though it may not have been blacklisted.

In case the blacklist is empty, this lead to a logging:
"Expected VST Blacklist file does not exist."

PS. This also consolidates VST2 + VST3 code for white/blacklist
2021-10-16 20:33:22 +02:00
bc61ff74ad triggerbox: fix quantization involving bars
The code for this feels potentially expensive. Maybe there's a better way.
2021-10-14 21:08:34 -06:00
7b2559fe07 triggerbox: fix behavior when bang()-ing a trigger while another is playing
This should queue up the bang-ed one and get the currently playing one to stop
2021-10-14 21:08:19 -06:00
480907d613 add sstream header file, since the header file requires the defn 2021-10-14 13:12:31 -06:00
bb87ba49d9 remove unnecessary boost header (we have our own ratio_t) 2021-10-14 13:12:31 -06:00
c831c26c4d triggerbox: make legato mode be off by default 2021-10-14 13:12:31 -06:00
27572a2bce fix problem with SrcFileSource
::length() was non-virtual, and so calling SrcFileSource::length() would access
the base class (AudioFileSource)'s version. Since SrcFileSource is essentially
a pimpl-like pattern, this was incorrect; we need to make sure we call the
pimpl-style method instead.
2021-10-14 13:12:31 -06:00
2066b6b33a
websockets: require Windows7 (with pollfd) 2021-10-13 21:40:39 +02:00
bedf09fbdb triggerbox: add new property called "order" and use it to decide whether to respond to a given MIDI note/pad (Push 2-centric for now) 2021-10-13 09:07:15 -06:00
2e0a069c51
WebSockets: use v7 tempo-map correctly 2021-10-12 15:32:41 +02:00
7b14c5666a triggerbox: handle active processor state correctly 2021-10-11 17:57:10 -06:00
24a09e381a triggerbox: don't fail/crash/assert if set_from_path() is called on an illegal slot 2021-10-11 17:56:56 -06:00
43993da7b4 triggerbox: if bpm detection fails, don't try to stretch 2021-10-11 17:56:31 -06:00
9e763c2672 remove all dangling event-loop-precall code 2021-10-11 17:48:53 -06:00
9adc336d50 control surfaces: fix BasicUI::jump_by_bars() to use tempo map correctly 2021-10-11 17:48:53 -06:00
b97c5f94c6 triggerbox: do nothing if disabled 2021-10-11 17:48:53 -06:00
a2a36de98f
Fix minor memory leak when querying Windows registry 2021-10-11 18:20:07 +02:00
cf392f73fc triggerbox: improve MIDI sidechain port naming 2021-10-10 17:35:15 -06:00
187ef1c214 triggerbox: better implementation of mono/stereo/nchannels mapping fix 2021-10-10 13:53:24 -06:00
c2004772c4 triggerbox: map available channels across all output channels
This means that mono regions get played in stereo (or higher)
2021-10-10 13:10:20 -06:00
55209b5df7 triggerbox: respond to changes in default trigger input port 2021-10-09 16:58:58 -06:00
52decdd1b4 push2: prevent crash caused by missing per-thread tempo map ptr 2021-10-09 11:47:13 -06:00
3475350d7c push2: session button should be lit 2021-10-09 11:46:53 -06:00
4031a03588 triggerbox: start some attempts at complexifying MIDI note -> trigger mapping 2021-10-08 20:35:25 -06:00
9792901376 add new rc config var to identify the default trigger input port 2021-10-08 14:40:44 -06:00
6326222a48 triggerbox: change APIs so that we can add a triggerbox to either type of track 2021-10-08 13:45:27 -06:00
7e35714886 triggerbox: change default MIDI note triggers to match first vertical row of Push 2 2021-10-08 13:45:26 -06:00
13168bb5b2
Disambiguate error message 2021-10-08 04:13:06 +02:00
8e5af55ae5
Prevent identical port-names when renaming tracks
Audio ports are sorted using PBD::naturally_less.
PBD::naturally_less is also used as compare function
for port-lists, port-sets, and port-maps.

So in sets and maps, the function is used to test
for uniqueness. This lead to issues since naturally_less
treats whitespace and underscores as identical.

While it was possible to have routes named "Audio_1",
and "Audio 1", this resulted in missing ports for one
of the routes.

see also 60ff3ef764
2021-10-08 04:12:55 +02:00
ba2a2cb654
Implement natural-sort spaceship operator 2021-10-08 04:12:32 +02:00
97f323137c triggerbox: initial (incorrect) attempt at handling tempo map changes 2021-10-07 08:03:46 -06:00
7e2dd8a718 triggerbox: add follow count support 2021-10-07 07:48:07 -06:00
1c1f48fd98
VST: Remove accidentally added factory reference 2021-10-07 01:46:44 +02:00
789949ed8e
VST3: properly take references, ignore controll == component cases
This is mainly motivated by DPF's new VST3 implementation, but
also takes a leaf out of JUCE's book, unconditionally initializing
the VST::IEditController even if it is-a VST::IComponent.
and likewise calling terminate().
2021-10-07 01:08:27 +02:00
d4d4298320 triggerbox: add Chris Cannam's minibpm and use to determine tempo and thus stretch 2021-10-06 15:21:44 -06:00
1c4e1d01a7 triggerbox: an attempt at parameterizing the expected trigger duration 2021-10-06 15:21:44 -06:00
0199a4e561 triggerbox: basic stretch test using assumption that slot holds s 4 bar region 2021-10-06 15:21:44 -06:00
bbbfadb832
VST3: initialize controller even if it is-a component 2021-10-06 21:35:08 +02:00
cc084ef0a7
Fix setting custom path to the video monitor on macOS 2021-10-06 05:06:39 +02:00
89c17dfe7d remove debug output 2021-10-05 14:00:34 -06:00
dadf530243 temporal: change loading of session format 3x tempo maps
We were attempting to add the initial tempo and meter twice, which was unwise
2021-10-05 13:57:10 -06:00
0acc1a3fec temporal: use correct implementation of timepos_t::operator+ (timecnt_t) (and +=)
If time domains differ, it is necessary to first convert the argument duration into a duration
at the position of "this", in the correct time domain. Then we recursively call the operator
again, but this time we will use the fast path that just adds two timepos_t values.
2021-10-04 17:45:02 -06:00
5925ee0b7c
Prevent processing until buffersize change is complete
This fixes async callback from CoreAudio via
AudioDeviceAddPropertyListener. Apparently in rare cases it can
happen that the property listener calls back concurrently with
processing on M1 machines using Rosetta.

https://pastebin.com/upvc9LTc Thread 44 vs. Thread 32

May also be caused by plugin(s) taking a long time to
change buffersize. Processing continues even though the
buffersize callback has not yet completed.

PS. I have not been able to reproduce this on an Intel
machine, even with excessive buffersize changes. However
since buffersize changes cannot (usually) happen concurrently
with processing, taking the lock is reasonable.
2021-10-04 22:30:08 +02:00
e2efb698e0
VST3: fix discrete parameters
Some plugins have a min/max range of 1, for stepwise enumerated
values of a control. e.g. waves maps note-names this way.
https://discourse.ardour.org/t/106429/
2021-10-04 17:07:53 +02:00
877f56e575
Add Lua binding for ParameterDescriptor::rangesteps 2021-10-04 17:07:53 +02:00
5caed9b0a6 trigger: add method to get position while playing as a fraction 2021-10-03 22:44:03 -06:00
a1699ff612 canvas: size_allocate() from GTK gives origin in parent coordinates.
Convert to canvas-relative origin when passing to root group for allocation
2021-10-03 19:47:18 -06:00
e670acbb0d canvastable: fix logic error in ::compute_bounding_box()
Since the bbox is determined by ::compute(), do not unconditionally clear it here
2021-10-03 16:46:25 -06:00
747a49006c canvastable: finish comment 2021-10-02 17:45:43 -06:00
a8cc0be45c canvastable: change some variable names; don't add per-col/row spacing twice 2021-10-02 17:09:01 -06:00
df5699b03e canvastable: fix comment to reflect split row/col homogeneity 2021-10-02 16:24:04 -06:00
8130d265fd canvas table: separate out row & col homogeneity 2021-10-02 16:19:49 -06:00
590866f8c1 canvas table; move computation of bounding box 2021-10-02 16:19:49 -06:00
88443586ef canvas table: clean up attach API; improve comments; move use of padding.right outside loop 2021-10-02 16:19:49 -06:00
c550a400b1 triggerbox: more properties 2021-10-01 18:39:06 -06:00
cc09576ef5 canvas table: dramatic fixes/extensions of table packing algorithm 2021-10-01 18:38:18 -06:00
e265b27f5d triggerbox: add quantization property and notify on changes 2021-09-29 18:00:55 -06:00
0e779fbec9 canvastable: if a cell is empty, still adjust horiz/vert coordinates so subsequent cells are aligned 2021-09-29 11:20:50 -06:00
378e4e7a03 canvastable: fix typo that led to mis-sized table (row/col mixup) 2021-09-29 11:20:50 -06:00
27ca49efd3 canvas: generic Item::_size_allocate() must adjust allocated space to parent-relative coords 2021-09-29 11:20:50 -06:00
542424e27d triggerbox: minor fixes to get properties working more correctly 2021-09-29 11:20:50 -06:00
ed3d374f47
Fix --no-nls compilation 1/2 -- #8802
pbd/i18n.h MUST NEVER be included from header files and always be
the last include. This is because `_` is declared other headers
notably boost and some apple headers.

leading to issues like
../libs/pbd/gettext.h:58:27: error: expected unqualified-id before ‘const’
   58 | # define gettext(Msgid) ((const char *) (Msgid))
2021-09-27 16:28:44 +02:00
2000bc6ea0 triggerbox: add use_follow and start using actual Properties for trigger properties 2021-09-26 21:59:15 -06:00
cc6c0f1263 there is no Properties::position any more
Position is a part of a length property (a duple specifying
"duration AT position", and there is no distinct property
for just the position itself.
2021-09-25 16:49:51 -06:00
64db1367bb Change name of Stateful::apply_changes (PropertyBase) to the singular form.
Makes it slightly easier to read+parse what is happening. Yes, for a
Sequence property, the call could apply several changes, but overwhelmingly
it is used to apply a single change.
2021-09-25 16:49:51 -06:00
30a00c5e9f Fix implementation of timecnt_t::operator==() to compare both duration and position 2021-09-25 16:49:51 -06:00
43c7a39f18 Additional removal of a PropertyTemplate::call() site 2021-09-25 16:49:51 -06:00
2ed1bdd243 Remove PropertyTemplate::call() and replace with code that uses ::set()
This makes undo/redo work correctly.
2021-09-25 16:49:51 -06:00
5287bbb31e
Fix horiz meter expose 2021-09-25 00:01:23 +02:00
1c34a3dcbb
Add missing includes 2021-09-25 00:01:23 +02:00
e165e92268
Remove annoying debug message 2021-09-25 00:01:23 +02:00
368e98336f gtkmm2ext: if a CairoWidget is used in the canvas, we do not need to realize the Gtk::EventBox
This may be a breaking change, but seems ok from superficial testing.
2021-09-23 11:48:29 -06:00
d07436b15d canvas: much more work on table layout 2021-09-23 11:48:29 -06:00
5a1201f05b
Fix duplicate libs 2021-09-19 23:39:51 +02:00
29f96ad13e
Fix cross-compile (undefined references for canvas-tests) 2021-09-19 23:38:44 +02:00
5fb54c008d
Fix shortcut display in editor tooltips #8798
After the editor is attached as tab to the main window,
looking up keyboard bindings using get_toplevel() no longer
works.

This uses the widget-hierarchy just like ARDOUR_UI does.
2021-09-19 18:46:06 +02:00
John Emmas
666e62076c Part 2: Complete the changes needed to make 'boost::intrusive::list' work with MSVC
It turned out that 'boost::intrusive::list_base_hook<>' won't compile if its parent class is declared using '__declspec(dllexport)' - so rather than exporting each entire class, let's use the alternative approach and export the various class members individually.
2021-09-18 13:40:22 +01:00
47f7958714 canvastable: remove unused vars; rename others 2021-09-17 14:36:09 -06:00
44b1cea54a canvastable: minor optimization 2021-09-17 12:53:16 -06:00
59c8b99fee canvastable: remove rows/cols members, reuse ::compute() for ::size_request() 2021-09-17 12:51:26 -06:00
98e0ad901a canvas: significant design changes and implementation fixes for Table 2021-09-17 12:34:13 -06:00
e5599d1c85
Fix div/zero, allow switching backends
This is another attempt replacing 1288262ca7,
which performs better.
2021-09-15 17:52:59 +02:00
cb81b06a5d
Revert "Fix div/zero, allow switching backends"
This reverts commit 1288262ca7.
2021-09-15 17:52:53 +02:00
John Emmas
840e63e6b2 Prefer tags for 'boost::intrusive::list' rather than list_member_hook<>
list_member_hook<> is very troublesome in MSVC and is known to cause problems in other compilers when used inside a class which has a virtual base class.
2021-09-15 09:28:54 +01:00
999fe54ab8 canvas: a few variable cleanups in Table and more use of for (auto ..) 2021-09-14 22:39:59 -06:00
6aaba192a0 canvas: improve computation of Table bounding box 2021-09-14 21:39:24 -06:00
b3854c2e92 canvas: just use stack and size counter instead of std::vector<> 2021-09-14 21:22:56 -06:00
1c42c733f7 canvas: remove use of Table::Index from API of Table::attach() 2021-09-14 21:18:44 -06:00
c952c57a99 canvas: actually follow CSS conventions for 1/2/3/4 arguments in padding 2021-09-14 21:18:44 -06:00
5eee8bf1a3
Allow to change process graph while auditioning
This fixes an issue with adding/removing tracks while auditioning.

Session::remove_routes() calls Graph::clear_other_chain(),
which will block until the graph chains have been swapped.
2021-09-15 04:03:18 +02:00
473ef54614 canvas: fix initialization of FourDirections object 2021-09-14 18:49:41 -06:00
d6208eabd8 canvas: fix handling of expanding items in table layout 2021-09-14 18:42:59 -06:00
5def36f780 canvas: somewhat functional homogenous table layout 2021-09-14 18:29:39 -06:00
d71fcf1955 canvas: add Table debug bit 2021-09-14 18:29:39 -06:00
f05bb4afab canvas: new type, to centralize CSS-style padding/spacing initialization (but only used by Table so far) 2021-09-14 18:29:39 -06:00
c5fcdc1119 canvas: more work on table layout, still incomplete 2021-09-14 18:29:39 -06:00
3195fb720a
Fix latency signal emission sequence when using JACK
Capture latency needs to be updated before playback latency,
various internal parts depend on this order (which is also
the default for libjack itself).
2021-09-14 22:03:51 +02:00
2c4a2fc6fa
Fix ambiguous latency detection (mostly revert eb0498bb2) 2021-09-14 21:39:53 +02:00
4998b2711b
Amend f301e692a: expose compensated port-latency
Retain min/max when copying inherited latency from
connected ports.

When there is a direct connection port A out -> port B in,
min/max latency range should be retained in direction
of signal flow.

Ardour can only adjust latency in reverse direction of signal flow
to match min = max with an internal delay-line. ie set playback
latency of an input port, or capture latency of an output port.
2021-09-14 21:39:53 +02:00
a84cb976a0
Add API to query I/O latency from port-engine
This allows to get public latency ranges for any port
including Ardour's latency-compensation as well as including
any latency induced by external JACK applications.

It is mainly useful to detect ambiguous latency and to
forward public port latency of connected ports.
2021-09-14 21:39:53 +02:00
f2ea9461f2
Fix API, Route::apply_latency_compensation() is not virtual 2021-09-14 21:39:53 +02:00
44b11802bf canvas: initial (probably incorrect) implementation of Canvas::Table 2021-09-13 22:00:33 -06:00
1288262ca7
Fix div/zero, allow switching backends
When switching backends, the effective sample-rate is zero.
This only affects the butler thread (the only active thread when
stopped). The actual issue here is the butler calling
"non-realtime-stop" without a backend. However fixing 0/0
generally seems appropriate.
```
#0 in int_div_round<long>(long, long) (x=0, y=0) at ../libs/pbd/pbd/integer_division.h:36
#1 in Temporal::samples_to_superclock(int64_t, int) (samples=0, sr=0) at ../libs/temporal/temporal/superclock.h:39
#2 in Temporal::timepos_t::timepos_t(long) (this=0x7f94bc0a5890, s=0) at ../libs/temporal/temporal/timeline.h:55
#3 in ARDOUR::Automatable::non_realtime_locate(long) (this=0x55a12a980cc8, now=0) at ../libs/ardour/automatable.cc:421
#4 in ARDOUR::Route::non_realtime_locate(long) (this=0x55a12a980ae0, pos=0) at ../libs/ardour/route.cc:5462
#5 in ARDOUR::Session::non_realtime_stop(bool, int, bool&) (this=0x55a12e0cd000, abort=false, on_entry=1, finished=@0x7f94bc0a5e0f: true) at ../libs/ardour/session_transport.cc:1487
#6 in ARDOUR::Session::butler_transport_work(bool) (this=0x55a12e0cd000, have_process_lock=false) at ../libs/ardour/session_transport.cc:1153
#7 in ARDOUR::Butler::thread_work() (this=0x55a12f3b7000) at ../libs/ardour/butler.cc:222
#8 in ARDOUR::Butler::_thread_work(void*) (arg=0x55a12f3b7000) at ../libs/ardour/butler.cc:16
```
2021-09-11 04:54:40 +02:00
df1780f09d triggerbox: use uint64_t instead of size_t
Somewhat unbelievably, macOS defines size_t as unsigned long, which the compiler there
believes is distinct from unsigned long long even then they have the same bitwidth
and signedness. We don't have any string converters for unsigned long, only uint64_t
(unsigned long long), so various things break.
2021-09-10 13:12:14 -06:00
e777acb7f9 triggerbox: add void* pointer to hold reference to anonymous UI object 2021-09-10 13:04:49 -06:00
00d4765b57 gtkmm2ext: move initialization of CairoWidget members into initializer context 2021-09-10 13:03:57 -06:00
9f0f1f1772 gtkmm2ext: when calling ::get_width()/get_height() on a cairowidget, if allocation is zero, use widget size 2021-09-10 13:03:32 -06:00
d50693b97d cnavas: add lots more debug traces to box, and an explanatory comment 2021-09-10 13:02:01 -06:00
107ff8466a canvas: box should not try to reposition children for a zero-sized allocation 2021-09-10 13:01:26 -06:00
63a74d0911 Canvas: improve behavior of Widget::compute_bounding_box()
Firstly, ::compute_bounding_box() cannot allocate space, so do not try to do that here.
Secondly, if there is no allocation yet, use the CairoWidget's own size_request()
2021-09-10 12:59:29 -06:00
be461e95e1 canvas: remove debug output 2021-09-10 12:57:43 -06:00
4806e10aa1 session: wrap undo history loading in catch/try to avoid throwing errors to glibmm 2021-09-10 12:15:24 -06:00
1904c4aa29 temporal: fix operator>> for Beats when handling pre-nutempo formats (double) 2021-09-10 12:15:24 -06:00
300ca3124b canvas; temporarily resurrect ConstraintPacker interactive tests 2021-09-10 12:15:24 -06:00
494bc8da14 canvas: add ::set_size_request_to_display_given_text() analogous to Gtkmm2ext utility 2021-09-10 12:15:24 -06:00
90322399fc canvas: use fwd decl instead of header inclusion for CairoWidget 2021-09-10 12:15:24 -06:00
4bbfc60126 add 2 new canvas debug bits 2021-09-10 12:15:24 -06:00
eb0498bb28
Overhaul ambiguous latency detection
Simply comparing connected latency min/max is insufficient
and allows for false positives.

get_connected_latency_range() reports private, uncompensated
latency for internal ports. In this case an additional test
is required to match it against the reported latency of
connected ports.

Since 13b8a9727bb05 remote connected ports now correctly
report latency for both internal as well as external ports.
2021-09-08 22:39:32 +02:00
6199d08f71
Add API to report I/O Latency 2021-09-08 22:39:32 +02:00
f301e692a7
Expose compensated port-latency, fix ambig. latency detection
Previously Ardour only announced processor latency.
Routes that had additional latency to compensate for those
have not published this delay.

This is of no concern with internal backends, however with JACK,
Ardour reported incorrect *individual* port-latencies of
routes that perform PDC.

Since public port latency now includes delay-compensation,
some extra work is required to unset it before recalculating
latency of paths that include external ports.
2021-09-08 22:39:32 +02:00
c342e4bfa9
Add API to announce managed MIDI port latency
Since Ardour implements jack latency callback, Arodur
is responsible to the set latency of those ports.
2021-09-08 22:39:32 +02:00
1978d3723e
Fix latency debug messages 2021-09-08 22:39:31 +02:00
Hector Martin
d4b0090850
Cache the absence of ffmpeg_harvid
Without this, absence of the transcode tool causes it to be searched for
for every entry in the file picker.
2021-09-07 04:33:07 +02:00
50b01732fd midi buffer handling: fix some logic errors in dealing with MidiRingBuffer reads 2021-09-06 13:55:26 -06:00
7932c9bde1 triggerbox: more behavioral improvements 2021-09-05 10:40:58 -06:00
c2abde9199 triggerbox: closing in on a one-at-a-time design 2021-09-04 23:20:08 -06:00
2cd88a67f1 triggerbox: start redesign based on only 1 trigger running at a time 2021-09-04 23:20:08 -06:00
e057088195 remove unused, empty glib event source/callback code (was from an experiment during nutempo2 development) 2021-09-04 07:39:27 -06:00
John Emmas
dda7612479 A few visibility changes needed for linking to libpbd (when building with MSVC) 2021-09-04 12:35:44 +01:00
John Emmas
f6ed73986b A few visibility changes needed for linking to libtemporal (when building with MSVC) 2021-09-04 12:28:15 +01:00
John Emmas
d7d966e02b Adapt 'Temporal::TempoMap::tempo_map_p' to be buildable with MSVC
Whenever a variable gets declared using 'thread_local' MSVC requires that it should not be compiled with DLL linkage (i.e. it mustn't be exportable). So for Temporal::TempoMap we'll need to export the required members individually, rather than exporting the entire class.
2021-09-03 10:02:41 +01:00
c74f80caa4
NO-OP: clean up maths, remove extra brackets
This may also help due to huge xdelta numbers.
2021-09-02 20:45:30 +02:00
8087bad9a0 triggerbox: create regions and sources using factories, and restore region in set_state() 2021-08-31 22:35:14 -06:00