Commit Graph

12353 Commits

Author SHA1 Message Date
Ben Loftis
29dc388bbc triggerbox: change bang/unbang semantics. UnBang != Stop
'unbang' is better described as a mouse-up or button-release event

* if launch-style is Gate or Repeat, then UnBang will stop the playing clip
* in other launch-styles, UnBang is ignored

some prior code using UnBang will change to
  stop_quantized()  or  request_stop()
2022-10-01 09:13:14 -05:00
Ben Loftis
2829f4385f triggerbox: publish some trigger functions to ::session (for the convenience of control surfaces)
Grid controllers will largely want to access clips in the order they appear on the Cue page

It is up to the device (and/or its ControlProtocol) to handle banking
2022-10-01 09:13:14 -05:00
Ben Loftis
07f47ff6a5 remove unimplemented bang_trigger() and replace with bang_trigger_at(n)
normally we operate on TriggerPtr's which are a safe way to track
 trigger lifetime, safely modify their properties, and launch them.

bang_trigger_at() is a convenience function to look up a trigger by index,
 and launch it, in one step.  Potentially useful for control surfaces.
2022-10-01 09:13:14 -05:00
Ben Loftis
1e283adb22 disambiguate trigger functions: stop_all_triggers -> trigger_stop_all 2022-10-01 09:13:14 -05:00
Ben Loftis
75ae0fd4b1 disambiguate trigger functions: cue_bang -> trigger_cue_row 2022-10-01 09:13:14 -05:00
Ben Loftis
ddfefa2583 remove some debug printfs 2022-10-01 09:13:14 -05:00
Robin Gareus
c09e66bb25 Fix apple/ARM FPU test, allow for FLT_EPSILON for unaligned math 2022-10-01 06:28:07 +02:00
Robin Gareus
61d192723a More windows build fixes (see prev. commit) 2022-10-01 03:01:03 +02:00
Robin Gareus
1684b1b99a Fix Windows build
Add cross DLL/exe reference
undefined reference to `luabridge::ClassInfo<boost::shared_ptr<ARDOUR::Track> >::getClassKey()
2022-10-01 02:49:25 +02:00
Paul Davis
b2145521d9 triggerbox: handle tempo map changes better inside and around MIDI triggers
We now try to get to the right location within the MIDI data and continue
playing, rather than pretending that we reached the end.

This also fixes a thinko that caused only the first few notes of a
MIDI trigger to play.

This may also solve cases where due to length, sample rate and tempo
settings, a trigger finished precisely on a ::run() call boundary.
2022-09-30 17:23:41 -06:00
Paul Davis
4f7c1aba24 libardour: infrastructure for notifying routes of tempo map change
The call to the Session is made before we call ::process(), from the
AudioEngine. Currently, only MIDI triggers care about this.
2022-09-30 17:21:43 -06:00
Robin Gareus
20088062bb Allow to create a shared_ptr<Track>() from Lua
This is relevant for an upcoming API chnage where `do_import`
requires a boost::shared_ptr<ARDOUR:Track>.
2022-09-30 21:30:48 +02:00
Robin Gareus
d0b490d1b7 Update Lua Convolver API
* allow to update IR data
* allow to use mono processing in base-class
  This is handy for FIR (Readable/ROM), and operating directly
  on local data (ratherer than mapped buffers)
2022-09-29 23:44:42 +02:00
Robin Gareus
dc90ec4e33 Add additional Lua TempoMap bindings 2022-09-28 18:47:55 +02:00
Robin Gareus
1abf6a77d6 Even more Lua bindings 2022-09-27 20:00:50 +02:00
Paul Davis
bf0a525647 remove unused variable 2022-09-27 09:32:19 -06:00
Robin Gareus
395bf4a650 Cont'd work on nutempo Lua bindings 2022-09-27 13:06:16 +02:00
Robin Gareus
8c83149c4c Fix time stretch if region-start > 0
For some reason applying the property change
  plist.add (Properties::start, std::numeric_limits<timepos_t>::min());
does not correctly reset the offset of the newly created region.
2022-09-27 13:06:13 +02:00
Robin Gareus
f79f3ee301 Remove unused API 2022-09-27 00:40:35 +02:00
Paul Davis
3f812ca1a3 fix behavior of region gain envelope when performing a separate action (2-point split)
This was a simple typo, using pos1 rather than pos2. Also removed now-irrelevant comment line
2022-09-26 16:40:08 -06:00
Paul Davis
6ff57ca37b improve accuracy of DEBUG_TRACE output 2022-09-26 16:40:08 -06:00
Paul Davis
60aaccb2f9 a likely better fix than 8ba21e7fff for the same problem 2022-09-26 16:40:08 -06:00
Robin Gareus
831fd9c4b2 Amend eb85b336c, remove Lua binding of declared but not implemented method 2022-09-26 23:33:38 +02:00
Robin Gareus
eb85b336c8 Add additional nutempo Lua bindings
Particularly it is now possible to sum timepos + timecnt
and subtract, calling distance() as appropriate.
2022-09-26 22:18:35 +02:00
Robin Gareus
8ba21e7fff Fix region-gain when trimming, cutting or partitioning regions
The during trim-front, the call order is
 1. Region::set_position_internal
 2. Region::set_length_internal

::set_position_internal sets `_last_length.set_position (position());`
but the later call ::set_length_internal does `_last_length = _length;`
This sets last_position() == position(), and later Region::mid_thaw()
does not call Region::recompute_at_start().

Region gain envelope was not updated.

see also 00a1b7cb24 and 13d10582f0
2022-09-26 14:57:25 +02:00
Robin Gareus
e09913ced7 Set SMF::open option, do not scan when loading the model 2022-09-25 02:46:59 +02:00
Paul Davis
7428f13e15 MIDI: unlinked region copies get sources that are copies of the original
Previously, the copied source file only contained data within the initial region bounds. This
meant that you could not trim the (unlinked) copy to beyond its initial bounds. Seems wrong.
2022-09-24 15:38:45 -06:00
Robin Gareus
7d75ac0f14 Add Lua binding to remove plugin-preset 2022-09-21 18:21:27 +02:00
Paul Davis
2316df357b remove some debug output 2022-09-21 09:13:17 -06:00
Robin Gareus
86f0f0ca11 Fix VST2 state restore for plugins without custom UI
VST preset restore has to happen in the GUI thread, specifically
the plugin's own UI event-loop (which on Linux and Windows is
not usually Ardour's Thread 1). However if there is no plugin
GUI, it should be safe to use Ardour's UI thread.
2022-09-21 16:13:18 +02:00
Robin Gareus
3ad819da4c Add Lua binding to create/save plugin presets 2022-09-21 14:48:04 +02:00
Robin Gareus
3ca0f4e43d Prepare API to resample session to engine when SR mismatches 2022-09-21 00:34:03 +02:00
Robin Gareus
45cd07aa5a Remove old layered-record-mode config 2022-09-19 22:50:47 +02:00
Robin Gareus
e38cb08901 Use new record-mode pref (1/2) 2022-09-19 22:50:06 +02:00
Robin Gareus
cade07472f Add RecordMode enum to replace layered_record_mode 2022-09-19 22:49:47 +02:00
Robin Gareus
8b0ab38675 Copy region properties (1/2)
RegionFactory::create(Region&,..) copies all region properties.

There are however various operations that use a new Source
as intermediate to create a new Region from another Region.
Those operations should also inherit various region properties
(such as mute, opaque, locked, ..)
2022-09-19 22:49:39 +02:00
Robin Gareus
e42de1e229 Bump session format version for MIDI region transparency 2022-09-14 02:44:52 +02:00
Robin Gareus
b277244b12 Convert MIDI region transparency when loading old sessions 2022-09-14 02:44:49 +02:00
Robin Gareus
44bacae43d Allow for silent session format updates 2022-09-14 02:44:44 +02:00
Paul Davis
4b25264db1 remove inflater and downloader from libardour 2022-09-13 13:53:45 -06:00
Robin Gareus
be096edd8c Use rubberband 3.0 API if available 2022-09-13 06:44:41 +02:00
Robin Gareus
ea335eedeb Clarify library URL pref name (amend d4532973) 2022-09-12 01:31:49 +02:00
Robin Gareus
d453297381 Parameterize clip library URL
Also prefer http since our distributed builds may or may not
be able to find SSL certificates on a given target system.
2022-09-11 20:14:35 +02:00
Robin Gareus
38c5ae4237 Reread MIDI region when time-domain changes
This effectively triggers a Session::request_overwrite_buffer
via Playlist::notify_contents_changed when the time-domain of a
Region changes.

When the time domain of a MIDI region changes, Region boundaries
and events positions change ever so slightly. The playlist has
to be rendered again to take this into account.

When MIDI regions with different time-domains are layered, notes
may not be resolved in correct order. Previously changing time-domains
to address this did not result in the playlist being reread.
2022-09-11 00:57:12 +02:00
Paul Davis
9cfcca8ba4 library downloading: various fixes to download process 2022-09-10 15:19:02 -06:00
Robin Gareus
16ef3dd6b1 Fix MR:render_range debug output (nutempo) 2022-09-10 18:19:58 +02:00
Robin Gareus
644136bca0 NO-OP: re-indent EventsSortByTimeAndType 2022-09-10 18:19:58 +02:00
Robin Gareus
c457dd2eac Fix EventsSortByTimeAndType (type/event-type API mismatch)
Correct use would be
`parameter_is_midi (midi_parameter_type (ev->type()))`
However that only checks for control params. Note events
are excluded.
2022-09-10 18:19:58 +02:00
Robin Gareus
b67b18483c Implement MIDI region automation (CC, PGM, PB) opaqueness
This adds a special case of "flush/resolve" to restore the
state of an upper layer opaque MIDI region while at the same time
resolving notes of a lower layer region.
2022-09-10 18:19:58 +02:00
Robin Gareus
5ad7361b28 MidiStateTracker::flush restore CC (bank) before PGM 2022-09-10 18:19:57 +02:00