Commit graph

19608 commits

Author SHA1 Message Date
Paul Davis
7a0da94ba3 fix RangeTest to account for Range now using exclusive ends, not inclusive 2022-10-05 17:30:45 -06:00
Paul Davis
3c0820e36e move default_triggers_per_box into a namespace ; change value for Ardour to 16 2022-10-04 19:55:05 -06:00
Paul Davis
34d339ab5d MIDI copies are now unlinked by default 2022-10-04 18:32:02 -06:00
Paul Davis
d7a88eecb1 libraryfetch: add description count 2022-10-04 11:18:40 -06:00
Mads Kiilerich
a23e137723 When exporting with .cue file, use latin1 for filename as well
Before, the .cue file could end up with a mix of latin1 and utf-8
encodings. Utf-8 works better for many things, but that doesn't matter
when the .cue file has to be in latin-1.
2022-10-04 16:52:04 +02:00
Robin Gareus
b269a1298c
Fix memory leak for invalid SMF event 2022-10-04 03:29:52 +02:00
Robin Gareus
88bd2115a0
Consolidate signal emission, fix RWLock deadlock
Play loop, change loop-location, undo.

Undo calls Locations::set_state, takes a writer-lock,
and calls Location::set_state which emits a Changed signal.
This triggers Editor::location_changed, and if loop-location
changed while looping, update_loop_range_view() queries the
loop location, taking a reader-lock.

This leads to a recursive lock, RWLock::ReaderLock after
a RWLock::WriterLock does not cause a deadlock, however
releasing the ReaderLock effectively also unlocks the WriterLock.
This leads to a deadlock next time a writer-lock is acquired.
2022-10-04 01:12:50 +02:00
Paul Davis
a0c93328ea push2: fix intended behavior of push2 "lower buttons" 2022-10-03 15:41:50 -06:00
Ben Loftis
374ff2b12d fix thinko in unbang behavior 2022-10-03 13:47:55 -05:00
Robin Gareus
aedf697646
Fix crashes due to missing return value
due to -fomit-frame-pointer a missing return value leads
to stack corruption. This also fixes the return type.
2022-10-03 19:38:30 +02:00
Robin Gareus
61fc46ff79
Fix missing Lua bindings
* RecordMode is required for Session Config set/get_record_mode.
* TempoMap::dump requires C++ std::ostream&
2022-10-02 14:33:06 +02:00
Robin Gareus
04647d5ae5 More unit-tests updates
* move RangeTest to libtemporal tests
* remove BeatsTest,  already converted from
  Evoral to temporal/BeatTest.cc
2022-10-01 16:57:12 +02:00
Ben Loftis
42a4216f22 osc: publish session-provided trigger functions: bang/unbang 2022-10-01 09:13:14 -05:00
Ben Loftis
7fe7adb83c push2: adapt to new unbang and 'stop' semantics (needs testing) 2022-10-01 09:13:14 -05:00
Ben Loftis
6c292a83da basic_ui: use session-provided bang/unbang functions 2022-10-01 09:13:14 -05:00
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
Ben Loftis
be28c9ff88 osc: add functions to trigger cue rows, and stop all triggers 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
a520adff62 Better version for d70ebde (compare timepos_t directly) 2022-09-30 04:57:09 +02:00
Robin Gareus
d70ebde1dc
Fix compilation of evoral unit-test
Some of these tests should be moved to libtemoral.
On 64bit Linux the tests pass, except various RangeTests.
2022-09-30 04:04:48 +02:00
Robin Gareus
9a34d15b3c
Fix crash when disabling generic MIDI surface
The event-loop has to be stopped before unregistering ports
and deleting the instance.
2022-09-30 01:58:24 +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
2d6e5d4638 Fix building unit-tests on macOS 2022-09-28 23:05:56 +02:00
Robin Gareus
dc90ec4e33
Add additional Lua TempoMap bindings 2022-09-28 18:47:55 +02:00
Robin Gareus
8b84a0c36f
Add explicit BBT_Offset print function (like timeline.h has) 2022-09-28 18:46:58 +02:00
Robin Gareus
c8ddfd5637 Fix C++ memory layout for the TempoMap
Usually C++ class instance has the same mem address as its first parent.
LuaBridge uses this to for derived classes. A TemopPoint instance has
the same address as its parent Tempo. However due to virtual inheritance
this was not the case due to a lack of virtual d'tor.

Now the following Lua code works correctly
```
tm = Temporal.TempoMap.read()
tp = Temporal.timepos_t (0)
print (tm:tempo_at(tp):note_type())
```

Previously the last line failed calling Tempo::note_type()
on a TempoPoint instance, due to memory offset e.g.
TempoPoint: 0x600000ff90e0 Tempo: 0x600000ff90e8
2022-09-28 04:12:11 +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
28d11df6f6
operator% is a const operation 2022-09-27 13:04:49 +02:00
Robin Gareus
36aa661a1d
Add explicit BBT/Beat print functions (like timeline.h has)
This is in preparation for Lua bindings to allow print()ing
the value. We cannot use PBD::to_string() here.
2022-09-27 02:23:11 +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
e98fe4729e
LuaBridge - add API to try convert a value
This in in preparation to overload operators
2022-09-26 21:39:21 +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