13
0
Commit Graph

20362 Commits

Author SHA1 Message Date
df3b8efbb9 triggerbox: fix stop-all-cue marker under very specific conditions
If the stop takes effect on a process cycle boundary, do not just blindly pick
the next trigger; instead using the same logic as if the stop was not on the
boundary.
2023-01-31 18:39:57 -07:00
e76b26acf0 triggerbox: disambiguate otherwise identical DEBUG_TRACE messages 2023-01-31 18:39:57 -07:00
902b98588e canvas: profile render time / area 2023-02-01 01:25:27 +01:00
24d8e5de2c NSGLView: implement partial exposure 2023-02-01 01:23:24 +01:00
72995741bb
Adjust resampler quality when sample-rate mismatches
This also ensures that engine/session resampling is possible
when the config `port-resampler-quality` is 0.
2023-01-31 01:07:04 +01:00
d89162745f
Consolidate base and nominal SR
Now that mismatched sample-rates are resampled, there is
no distinction between base and nominal sample-rate.
2023-01-31 00:54:28 +01:00
53cfbe9c7f
Add API to update port resampler
Previously resampler ratio could only set when creating
an audio port. This is in preparation for setting resampler
quality when the session rate mismatches.

The session's rate is only known after basic session-setup
is performed. At this time Click-IO already exists.
2023-01-30 23:17:29 +01:00
John Emmas
2ff05d9e9d class 'PBD::Configuration' now needs to be exportable 2023-01-28 17:44:11 +00:00
349d25a2d2 Update latency compensation when sends are added or removed
Previously only adding an aux-send triggered a graph-reorder but copying
or deleting sends did nothing.

Adding/removing an aux-send may not even change the graph, but
both upstream/downstream latency can change and delaylines need to be
configured (which is done by calling update_latency_compensation with
force_whole_graph = true).

This fixes an issue with incorrect initial latency compensation after
copying a send (any later change to connections will correctly
recalculate it).
2023-01-27 23:13:52 +01:00
a4fc52ab55 fixup preferences metadata handling (libs edition) 2023-01-27 15:13:27 -07:00
68f4c7ce8e add upcase() method; remove upcase version of internationalize() 2023-01-27 15:13:27 -07:00
7a3b42948d change base class for UIConfigurationBase, because it IS-A Configuration 2023-01-27 15:13:27 -07:00
3c1c6e7b68 continued work on use of Metadata in various Configuration objects (libs edition) 2023-01-27 15:13:27 -07:00
f7387a5d77 infrastructure for PBD::Configuration to deliver metadata 2023-01-27 15:13:27 -07:00
8071a085c4 add concept of a map-of-own-config-variables to RCConfiguration 2023-01-27 15:13:27 -07:00
f377822891 (temporarily) add nodraw bitflag to avoid gradient fills 2023-01-24 10:01:04 -07:00
38c613cd9a Towards arranging sections
This allows to move or copy whole sections of the timline (everything
you hear) to a differnt position on the timeline.

NB. Markers and tempo-map are not yet moved, and interpolated MIDI
events are lost.
2023-01-23 04:07:46 +01:00
c24c210cce Use Controllist's time-domain for guard-point delta
This fixes copy/paste of pan automation (amongst other things).
2023-01-23 04:02:08 +01:00
efe943c98e Reimplement Route::shift, move all automation 2023-01-23 04:02:08 +01:00
46a8073ff2 extend ArdourWidgets::Frame to allow no-draw of frame
Associated: disambiguate Frame use where necessary.
2023-01-22 17:41:43 -07:00
d982507085 move match_search_strings() function from plugin utils to PBD 2023-01-22 17:41:43 -07:00
79033d8ee5 Resample when engine and session sample-rates mismatch 2023-01-22 20:51:44 +01:00
5130a43d87 Remove direct use of audio-engine rate (1/2)
This is in preparation for sample-rate independence.
2023-01-22 20:06:14 +01:00
859d6ebe4a debug: log canvas exposure area 2023-01-21 17:36:22 +01:00
4cd7de7a6f debugging: allow selection no-draw for canvas fill, outline, text, lineset and waveview 2023-01-20 18:13:12 -07:00
a1dee6cba2 Fix printing from Lua DSP context (#9202) 2023-01-21 01:42:33 +01:00
a3095162de Prevent auditioner from writing files to disk 2023-01-21 00:37:41 +01:00
e6230bfd98 Add enum to configure Apple NSGLView mode 2023-01-20 21:46:11 +01:00
2226da1385
VST3: retain I/O from older versions (bump session format)
A VST3 plugin can have additional busses which were not
available in older versions of Ardour. For compatibility
reasons those should remain unconnected. This is achieved
by using a custom I/O config  (same way a user would configure
this).
2023-01-17 22:02:10 +01:00
e5e9b477d0
Force rescan of VST3 plugins 2023-01-17 22:02:10 +01:00
f221a5e47f
VST3: offer output bus configurations 2023-01-17 22:02:10 +01:00
1cbd2d3468
VST3: support VST I/O busses
This unconditionally enable all busses with connected pins.
It does not provide re/configurable I/O (like Audio Unit), nor
implement dynamic Vst::kIoChanged callbacks. But regardless
this allows for plugins with multiple I/O busses (e.g. drum synths).
2023-01-17 22:02:10 +01:00
617ec6f54f
Include bus number in IOPortDescription 2023-01-17 22:02:10 +01:00
e87b989501
Inform plugins about connected input pins
When not using inplace processing (because I/O pins connections
are not an identity matrix), dedicated inplace-buffers are used.
Those buffers contain silence on unused ports, and hence always
valid to use. However it is still useful for plugins to know
if a plugin-port is actually used. VST3 can disable busses
for unconnected pins.
2023-01-17 22:02:10 +01:00
f6eac0f03a
Clarify that plugin replication is exclusive to re-configurable I/O 2023-01-17 22:02:07 +01:00
John Emmas
7433ca7e8b Correct a couple of typos when calling 'g_fopen()' 2023-01-17 10:32:36 +00:00
e66a757154
Fix simple export when there is no session range 2023-01-17 00:23:08 +01:00
58594e2554
Fix SMF read/write when compiled on Windows 2023-01-16 22:57:03 +01:00
2c7f8eeb97
Indicate UTF8 literals - fixes glyph rendering with MSVC (1/2) 2023-01-16 21:41:09 +01:00
c635d15cf0
Use pipe with CmdPipeWriter (see b8d07b8) 2023-01-16 16:41:28 +01:00
2522deabda
SystemExec: tweak writing to stdin of child process 2023-01-16 16:39:37 +01:00
b8d07b8be2
Export CmdPipeWriter: add option to use tmpfile
Investigate issues with mp3 export (#9193)
2023-01-16 05:10:32 +01:00
Marijn Kruisselbrink
b0f5fea53a
Fix minor errors in temporal/wscript 2023-01-12 20:58:24 +01:00
0083c8fb9f Remove "using namespace" from header (part 2) 2023-01-12 19:19:41 +01:00
3a6f822381
Remove "using namespace" from header 2023-01-12 19:01:48 +01:00
6407ca51cd
Fix region-fade, time-stretch and other scaling operations (#9057)
This resolves an ambiguity between abs(int) and std::abs(T) which
depends on context and compiler version and optimization.

In context of #9057, (gcc-6.3 -O3) math.h `abs(int)` was used. This
truncated the superclock value to 31 bit in ControlList::extend_to.
2023-01-12 16:17:39 +01:00
117cfc844b
Fix 128 bit integer math rounding (#9057)
The previous code only used the 1st multiplicand was use to
determine the direction of rounding, breaking commutative property

`muldiv_round (1, 3, 4) != muldiv_round (3, 1, 4)`
2023-01-12 16:08:53 +01:00
34e12a5d78
Fix grid when tempo marker is not on a mod_bar/beat_div
Previously the current iterator bbt was moved to p->bbt().

From then on, no grid line is reached if the point p is not on
a bar and mod_bar != 0 or the point is not on an expected beat_div.

e.g. when using bbt += mod_bar, and a tempo-change is at 5|2|0.
iterations continues 6|2|0 7|2|0  is_bar() is always false
and no more grid-lines were added.

Rather than trying
   bbt = round-up-to-next-grid-mod-div
and then finding the metric for that position, this
approach only does the latter using the already incremented
BBT position.
2023-01-11 00:25:23 +01:00
b0a679a1af
Fix grid after last tempo-marker when showing bars
This is a copy/paste bug, compare to d77db816de
2023-01-11 00:06:43 +01:00
f658a4c0b2
Fix Region lock style property (#9191)
This allows to properly toggle "Glue to Bars/Beats".

Editor::toggle_region_lock_style uses Region::position_time_domain(),
However Region::set_position_time_domain() checked the duration's
time-domain.

Furthermore timecnt_t::set_time_domain() changes both the
position and the duration's time domain. This can lead to
various issues. We only need to change the time-domain of
the timepos_t _position.
2023-01-10 20:07:05 +01:00
88a2c1123d
Fix windows builds, export pipe (amend 7ffd7a8c) 2023-01-08 17:09:55 +01:00
7ffd7a8c62
Convert filename for Windows commandline 2023-01-07 22:36:17 +01:00
ebf7afc482
Fix reporting tempo and time-signature to VST plugins #9188 2023-01-07 05:16:14 +01:00
3ae7295142
Allow to disable cairo render groups (performance test) 2023-01-06 21:15:43 +01:00
b27467157b
VST3: synchronize parameter-changes
IParameterChanges (_input_param_changes) queue should not be
modified while the plugin processes. Doing so can lead to invalid
iterators.

Also activate/deactivate and state restore must not happen
concurrently with processing.
2023-01-06 03:31:07 +01:00
a0452eeb57
VST3: dynamically grow ParameterChanges
Some plugins (e.g. Roland JD-800) have zero controls, but
MIDI control with are not directly accounted for. This
results in a zero-size ParameterChanges queue, which later produced
a segfault when trying to enqueue a MIDI change:

```
input_param_changes.addParameterData (id, index)->addPoint (sample_off, value, index);
```
2023-01-06 03:29:55 +01:00
a6107fc1af
Fix preference name/variable mismatch #9192 2023-01-05 19:00:56 +01:00
09b0734028
Increase system-exec stdout bufsiz (from 512 to 8k) 2023-01-05 04:54:07 +01:00
27e136dcfc
Cont'd tweaks of ffmpeg export pipe 2023-01-05 03:32:40 +01:00
3da7f71fb6
Windows process: allow for binary data output
Do not rely on null termination.
2023-01-04 20:28:22 +01:00
bb4394b8a5
Use pipe through ffmpeg, use glib to write output
This is intended to fix an issue with odd filenames on Windows,
particularly forward and backwards single quotes as part of a filename.

Previously the filename was passed as parameter to ffmpeg as
UTF-8 string to SystemExec::make_wargs, which is fragile on Windows
in absence of a execve() call.
2023-01-04 17:26:43 +01:00
41325a75fe
Add a debug message to track down crash scanning LV1 plugins 2023-01-03 02:26:50 +01:00
0f22f5e319
Identify surfaces by ID (not name) 2023-01-02 21:15:19 +01:00
Marijn Kruisselbrink
bf7f6386d5
Re-enable lib/ardour/test/session_test.
This test seems to be compiling and passing just fine (when run in
isolation), so turning it back on seems like a good idea. To make it
pass when run as part of the full ardour test suite, this does remove
the WebSockets control surface from the control surfaces test though, as
that control surface messes up the event loop of the main thread, which
would otherwise cause use-after-free crashes in the session test.
2023-01-02 20:31:12 +01:00
208aedaeaa
Fix "Invalid Source port" error with default config 2023-01-02 04:27:20 +01:00
d0b95b7685
Do not truncate pretty bundle names
This also fixes a potential buffer overlow on Windows.
Window _snprintf does not null terminate the string in case
the formatted length is longer than the given buffer size.
http://msdn.microsoft.com/en-us/library/2ts7cx93%28v=vs.110%29.aspx
(mingw's uses _vsnprintf under the hood which is also affected).

Alternatively we could rely in g_snprintf() to truncate the
string.
2023-01-01 17:44:43 +01:00
Marijn Kruisselbrink
ef253d3fc9
Use pretty names of ports not just for mono bundles, but also stereo.
Session::setup_bundles() creates mono and stereo bundles from hardware
inputs and outputs. For mono bundles the name of the bundle was based on
the pretty name of the port (if the port has a pretty name), however
stereo bundles always used the indices of ports to make the name.
When using pipewire (or otherwise having multiple jack clients exposing
physical ports) the indices are even less meaningful than otherwise (as
different devices could appear in arbitrary order), so also using pretty
names for stereo bundles makes the UI less confusing in places where
these bundle names are used (for example the menu when clicking on an
IOButton).
2023-01-01 17:26:14 +01:00
24597de7a2
Make RDF info/warning messages translatable 2022-12-30 19:10:07 +01:00
a4036b9590
Set non_rt_pending no-roll parameter (previously uninitialized) 2022-12-30 19:09:16 +01:00
36d640c8bc
Yet another attempt to fix Windows/LADSPA presets 2022-12-29 19:02:15 +01:00
55ac803701
Fix Windows builds (user_cache_directory) 2022-12-29 18:29:51 +01:00
4bb7e43008
x-platform LADSPA user preset files
This fixes saving/loading custom user presests on Windows
2022-12-29 18:22:48 +01:00
3ba999b9d7
Also use LDRF (and aubio4) on Windows 2022-12-29 01:58:11 +01:00
58ade46de3
Fix loading LADSPA RDF files x-platform
Searchpath on Windows uses backslash as folder separator,
however file URLs use forward-slash file://C:/foo/bar/
2022-12-28 20:06:00 +01:00
478338854d
Improve peak-file debug output, print affected source-name 2022-12-27 13:35:53 +01:00
475063c24d
ALSA: update endianess conversion functions
This follows upstream zita-alsa-pcmi-0.6.1
2022-12-27 13:32:31 +01:00
ac30964d67 remove debug output 2022-12-26 14:03:32 -06:00
140b373cac
Clean up ExportAnalysis code
* only zero limiter_pk array on initialization
  (other data is explicitly initialized)
* resize peak-data vector to at least 800 bins
2022-12-26 14:34:25 +01:00
7b3cbaf68f
Inform User when audio-read failed (debug builds)
Previously AudioPlaylist::read always returned the timecnt that
it was supposed to read into the buffer, regardless if the given
number of samples was read. The check in DiskReader::refill_audio
`if (nread != to_read)` never triggered.

This can happen when changing an audio-region's time-domain to
music-time (glue to bars/beats). Region-length (beats converted
to samples) can exceed the actual audio-source length (in samples).
2022-12-26 13:40:05 +01:00
7e9f29e888
FP8: directly cancel solo (do not rely on GUI) 2022-12-26 13:33:19 +01:00
b2a6fb70b4 remove debug output 2022-12-20 22:01:41 -07:00
818c30a98d temporal: add optional with_reset arg to all map ::remove_*() methods 2022-12-20 21:54:05 -07:00
0ee0226776 temporal: no stretching a tempo that is the last one or precedes a BBT marker 2022-12-20 21:33:13 -07:00
d3dd865093 temporal: NOOP - add helpful comment 2022-12-20 21:31:31 -07:00
ae36f8e445 temporal: provide TempoMap::replace_tempo() 2022-12-20 21:31:02 -07:00
033b4c5152 temporal: fix implementation of TempoMap::copy_points()
This could re-order the map in the presence of BBT markers
2022-12-20 21:29:44 -07:00
3e19363c4c fix typo in prior 10d125: sort presets 2022-12-19 10:04:29 -06:00
f058f910f4
Actually use overloaded get_presets() implementations 2022-12-19 16:43:42 +01:00
10d12599dd
Sort plugin presets by default 2022-12-19 16:41:41 +01:00
ae321721cf
Also thin automation after touch/latch
AutomationList::start_touch must not start a write-pass.
That function is also called when the transport is no rolling.
A write-pass is started via AutomationWatch::add_automation_watch.
2022-12-18 01:45:04 +01:00
028c19cd10
Remove hardcoded thinning factor 2022-12-18 00:55:28 +01:00
a5f36bbbbf
Fix thinning (normalize parameter value)
This fixes thinning of MIDI data (range 0..127) and
other parameters with range other than 0..1.
2022-12-18 00:55:12 +01:00
5b52aa956f
Prepare for region polarity inversion (using negative gain) 2022-12-17 13:14:54 +01:00
37d6f1026a
a-eq: ifdef methods only used for inline display 2022-12-16 23:05:36 +01:00
3b9a253a84 Bind weak pointers to rt_slot events
This fixes a crash when deleting routes, while there are still
automation events queued for the route.

Specifically, SoloControl has a reference Soloable& _soloable; which
points to the parent route. A rt-event can still hold a valid shared
pointer to the SoloControl, even if the route is destroyed.
Calling SoloControl::actually_set_value is fine (the control still
exists due to the shared ptr), but then checking the parent route:
```
if (_soloable.is_safe() || !can_solo())
```
accesses the already deleted route, which causes a crash.

The solution implemented here is to not bind a shared_ptr to the
realtime event. However, since deletion of the route happens in the main
UI thread, there may or may not still be a race.
2022-12-16 00:12:48 +01:00
c64869596e
Fix auto audio monitoring when using hw monitoring 2022-12-15 17:24:17 +01:00
edd68d8682
Automatically align metronome when recording it to a track 2022-12-15 00:55:32 +01:00
95544a86a0
Convert SMF track names to UTF-8 2022-12-15 00:30:18 +01:00
eec36feb11
Fix importing MIDI files with duplicate track names 2022-12-15 00:29:50 +01:00
75c9927d75
Tweak MIDI file import parameters
* Create opaque regions
* Set interpolation of parameters to be discrete
  (just like at rec-stop).
2022-12-14 16:14:47 +01:00
27dfd8a7e3 Fix loading LV2 presets with non-float port values
In practice, this mostly means integers when presets leave off the ".0", but we
implement all the numeric types here for good measure.

Also while we're at it, warn about unknown types now so it doesn't take three
people a half an hour to figure out what's going on the next time something
like this happens.
2022-12-13 22:03:48 -05:00
bd8c3af2a2 fix crash on MIDI unlearn for cue slot (bad iterator 2022-12-13 17:43:16 -07:00
eb1373404a
FP8: do not reset fader to unity on re-selecting
This disables the feature added in 057fd9259e.
The idea was to use double-click to reset the fader (like
Harrison consoles). Simply re-select can lead to accidents.
2022-12-13 18:01:27 +01:00
bd091906ac
Fix OSC/liblo zeroconf, properly query server URL 2022-12-13 17:15:54 +01:00
d704572ed5
FP8: fix monitor control
monitor_active() is the wrong API (it checks if any
monitor-bus settings are enabled or used).
2022-12-13 17:14:52 +01:00
Edgar Aichinger
d92342fc90
update german translation 2022-12-12 11:42:39 +01:00
d1ef9947a2
Add Lua bindings to change mute-points 2022-12-12 10:43:59 +01:00
d568bb5a06 Fix unused computed values
For example:

../libs/pbd/reallocpool.cc:138:38: warning: value computed is not used
[-Wunused-value]
  138 |                 ASSERT (_asize (ptr) <= newsize);
2022-12-11 11:54:03 -05:00
39c324b620 temporal: fix ::get_grid() crash condition
We cannot call TempoMetric::superclock_at (BBT_Time) if the BBT time is beyond
the range of the current TempoMetric. We must discover that *before* we make
that call, not as part of the test to see if we've exceeded the range.
2022-12-10 22:59:58 -07:00
db3e87a7e4 do nothing gracefully if asked to remove only tempo 2022-12-10 14:14:12 -07:00
ab34861388 canvas: provide a means of blocking change notifications from Item propagating up the object tree 2022-12-10 13:37:16 -07:00
c2c23172bd ctrl surfaces: add method to BasicUI to stop slots in a given trigger box 2022-12-10 10:33:24 -07:00
9403b116ad Mackie: make AudioInstruments button work correctly
Also toggle Global View LED appropriately
2022-12-10 10:32:47 -07:00
70b00f5201
Canvas: allow to group rendering of child items
> This group functionality can be convenient for performing
> intermediate compositing. One common use of a group is to
> render objects as opaque within the group, (so that they
> occlude each other), and then blend the result with
> translucence onto the destination.
https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-push-group

The main use case where will be to render opaque layered
[MIDI] regions transparently onto a grid.
2022-12-10 02:37:04 +01:00
cd7c981e6e Use macOS API to open finder at given path 2022-12-08 02:15:29 +01:00
201617f03b Fix macOS URI open
curl_easy_escape() escapes slashes, which fails with openURL on modern macOS.
Also add missing call to curl_easy_cleanup().
2022-12-08 02:12:15 +01:00
d3e736f7d3
Consistent audio/MIDI monitor modes
Now that both Audio And MIDI tracks support all three record
modes. Monitoring should be consistent. When recording
"Sound on Sound" does cue monitoring, while "layered" (opaque).
and "non-layered" monitors only the input.

Two differences remain: (1) when not recording MIDI tracks still
monitor both Input and Disk (unless Non-layered is set), and
a final special case is that MIDI tracks always monitor input
as fallback. the latter ties in with (2) audio tracks can
use hardware monitoring.
2022-12-07 22:49:08 +01:00
4beca98e28 temporal: fix various incorrect uses of ::samples() in audio time arithmetic
It is a wonder that this has not caused more visible issues since 7.0
2022-12-07 11:13:49 -07:00
e28e079c9f
Consolidate Export Format/Spec comparision 2022-12-07 17:56:07 +01:00
1005fc5716
Allow to import opus files 2022-12-07 13:36:57 +01:00
85a1c463e5
Add Lua method to show system env
`for v in ARDOUR.LuaAPI.env():iter() do print(v) end`
2022-12-07 00:28:21 +01:00
716501defa potential fix for "/bus/... master ..." target in MIDI binding maps failing 2022-12-06 11:11:08 -07:00
89d8dc26dd
Resolve export format ambiguities
This fixes an issue when switching formats.
ExportFormatDialog::update_selection iterates e.g. WAV BWV.
If BWV was selected and a user selects WAV the following happpens

1. WAV is selected
2. BWV is deselected
3. Since BWF and WAV are the same format, ExportFormatManager
   deselects WAV
2022-12-06 17:30:43 +01:00
d2212cbfb9
Add 24kHz as export rate, and limit opus to 8,24,48 per spec 2022-12-06 06:35:44 +01:00
c8b39094ca
Opus has no sample-formats 2022-12-06 06:35:40 +01:00
4d05c7add9
Map sndfile/opus quality to bitrate 2022-12-06 06:35:15 +01:00
211ff64e7d
Prepare for ogg/opus encoding 2022-12-05 23:43:34 +01:00
c505024a4b temporal: when resetting the map, position BBT markers in beat time (and stop reset there) 2022-12-05 10:01:49 -07:00
12b672492e tempomap: fix and improve efficiency and readability in ::get_grid() 2022-12-05 10:01:49 -07:00
8f257e1b2e
Thin MIDI automation when combining regions #9117 2022-12-04 12:12:12 +01:00
ddf894a1dd
Attempted fix for idle_drop_window random crashes (2/2) 2022-12-03 19:27:53 +01:00
1736b1d424
Avoid .sh file extension 2022-12-03 15:03:44 +01:00
30efb2f178
NO-OP: clang-format 2022-12-03 14:46:45 +01:00
2338e25d31
Fix automation thinning
For consistency, samples need to be used a unit.
Currently the calculated area is orders of magnitude larger
than the default thinning_factor (20).
2022-12-03 14:46:45 +01:00
John Emmas
1592b95031 Minor change - incorrect return type (in Windows build) 2022-12-03 12:21:12 +00:00
a3fdb544ee
Fix copying MIDI regions w/automation
This fixes a bug introduced in d06a0d9c9d. The MIDI data
has to be written first, otherwise the CC-event do not exit
and MidiModel::source_interpolation_changed() crashes.
2022-12-02 21:44:22 +01:00
753d395bb3
NO-OP: add comment for mdns 2022-12-02 18:01:21 +01:00
7d928bf265
Announce OSC via mDNS 2022-12-02 17:34:10 +01:00
c53b19c039
Add zeroconf/mdns support 2022-12-02 17:32:11 +01:00
aae15e3c90
Fix Wreorder, initialize variables 2022-12-02 13:13:13 +01:00
23a0efc286
Indicate error when parsing session fails 2022-11-29 20:00:15 +01:00
e3dc0a24f2 canvas ruler: use second font description appropriately 2022-11-29 10:09:39 -07:00
d77db816de temporal: reimplement and tweak API of TempoMap::get_grid()
There were many logical errors in the previous implementation. This one is
simpler to read, and appears to work much better.

It also allows the caller to specify the quarter-note subdivision to use when
generating the grid, rather than choosing only between some bar modulo or
quarter notes.
2022-11-29 10:09:39 -07:00
a124062fa2 temporal: move_tempo() must use beats (timesig dependent) not quarters 2022-11-29 10:09:39 -07:00
1f4717d93b temporal: reset map requires a BBT-sorted map, not audio time 2022-11-29 10:09:39 -07:00
a817142676 NO-OP: extend debug trace output in superclock_at (BBT_Time) 2022-11-29 10:09:39 -07:00
8299778d26 temporal: slightly change internal API for omega (ramp) computation 2022-11-29 10:09:39 -07:00
d9ed0f0d2e temporal: use muldiv_round to avoid overflow in TempoMetric::superclocks_per_grid() 2022-11-29 10:09:39 -07:00
883527ba3e temporal: add Meter::round_to_beat() 2022-11-29 10:09:39 -07:00
a7d2718aa4
ALSA: use dedicated device reservation for probing
It can happen that the main AlsaAudioBackend::_device_reservation
is still busy while I/O devices are set. In this case a
dedicated AlsaDeviceReservation needs to be used which can fail
silently.

A common example is disconnecting a USB device while it is in
use. The Halted signal can show the session dialog, which calls
set_input_device_name before the device reservation of the
unplugged device terminated.
2022-11-29 17:34:45 +01:00
3f4feb6cc8
ALSA: fix autostart when using different I/O devices
ALSA backend modified the internal state when different devices
were used, re-assigning one (usually input-device) to "None"
when it's resampled. This lead to EngineHints not matching the
EngineState, and autostart was disabled, and a dialog
"Engine I/O device has changed since you last opened this session."
2022-11-29 06:39:50 +01:00
842f4517de
Fix session-archive of stereo files #9122
Archiving creates a dedicated mono file for each Source.
When the original session has (embedded) stereo files, the
channel needs to be temporarily set to 0.
2022-11-28 00:40:17 +01:00
03575011b5
Retain ctime/mtime when encoding file for archiving 2022-11-27 14:11:05 +01:00
580179272d
NO-OP: cleanup duplicate X_ escape 2022-11-27 01:59:01 +01:00
d06a0d9c9d
Copy MIDI Source properties when cloning MIDI Regions 2022-11-27 01:58:58 +01:00
bc6a9609ff
Address some Wmissing-prototypes in qm-dsp 2022-11-26 16:23:52 +01:00
a63e1add6d Remove unused config variables 2022-11-25 20:10:33 +01:00
d0fb7ae18a avoid duplicate BBT points in grid 2022-11-22 18:09:46 -07:00
Gon Solo
1cf6886775
std::iterator is deprecated in C++17, use bidirectional_iterator_tag 2022-11-22 19:49:41 +01:00
4cd01a5f6e
Fix soundcloud curl callback
This also addresses C++17 compatibility.
2022-11-22 17:52:40 +01:00
fe386e51b1 incomplete comments - just say no 2022-11-21 18:34:13 -07:00
c7cf4d96e0 confusing comments - just say no 2022-11-21 18:33:17 -07:00
a84d3e04c4 tests: add new test to check that tempo map reset changes beat time correctly 2022-11-21 18:18:21 -07:00
f5887b978d tempo map: when resetting, set beat/quarter positions as well as audio positions
introducing a new time signature that uses non-quarter notes as the denominator
will move the beat position a given BBT time (since the middle "B" of BBT
refers to "beats" given by the denominator, not quarters).
2022-11-21 18:18:21 -07:00
c8711aacc6
Import MIDI markers direct to the source (3/4) 2022-11-22 01:46:00 +01:00
4f4b931ccc
Add import_markers option (1/4) 2022-11-22 01:44:53 +01:00
3567a7f610
Parse MIDI Lyrics meta-events (import w/markers) 2022-11-21 21:53:15 +01:00
82512422a7
Deliveries support mismatched chan-counts
This issue was introduced in f3423b8a77, which assumed that
number of input channels matches the number of outputs.
With flexible I/O this is not necessarily the case.

This fixes #9106, along with the previous commit.
2022-11-20 15:07:07 +01:00
4448b3a2a9
Prevent crash when running unconfigured meter processor
If Route::configure_processors fails at session start,
meters are not configured (#9106), leading to a crash when
::run() is called (insufficient peak/max/midi buffers).
2022-11-20 15:07:07 +01:00
d903bcff17
Disambiguate "types.h" (see also 705386842b) 2022-11-20 00:32:55 +01:00
16e0de95fc
Handle NoPeakFile flag
Previously the flag was not honored. AudioSource::write() calls
-> SndFileSource::write_unlocked()
-> SndFileSource::nondestructive_write_unlocked() which calls
-> AudioSource::compute_and_write_peaks

This produced "cannot open _peakpath" messages during
session-archive FLAC encoding. Likewise closing an audio file
calls touch_peakfile(). Although this simply failed silently.
2022-11-20 00:00:32 +01:00
d44b4b4674
Remove cruft (unused CANVAS_COMPATIBILITY - 2/3) 2022-11-19 21:49:15 +01:00
34e7c2ffc5
Remove cruft (unused CANVAS_COMPATIBILITY - 1/3) 2022-11-19 21:49:01 +01:00
c69cfaa124
Fix Ardour's rm -r implementation, delete symlinks 2022-11-19 20:20:58 +01:00
d7895ab1d2 triggers: remove sidechain and use global port for trigger control 2022-11-19 10:22:16 -07:00
c8e3d95109 add new Session global MIDI input port for trigger control 2022-11-19 10:22:16 -07:00
705386842b
Require prefix for libardour library header location 2022-11-19 01:12:51 +01:00
3f3d0c7e49
Surfaces and panners should not export headers
Those are not shared libraries but only dynamically loaded
plugin objects. Their headers are their own.
2022-11-19 01:11:53 +01:00
37251faaf1
Add missing wscript file 2022-11-19 00:59:38 +01:00
a6f8f2dd9e
Consolidate search/file-system paths (fixes vst builds)
Keep file-system paths and PBD::Searchpath mostly separate.
This amends 58c2b0a848 libs/fst directly includes relevant
ardour C++ code, so lib/fst must not link against libardour.

The problem was that 58c2b0a848 introduced additional
dependencies on other libardour functions.
2022-11-19 00:48:11 +01:00
d521c2ede6
src-tree cleanup: separate surfaces from libraries
libardourcp and now libardour_midisurface are not control
surfaces, but helper libraries for those.
They need to be deployed to the library folder (shared between
ctrl surfaces) and not scanned as ctrl surfaces at runtime.
2022-11-19 00:09:17 +01:00
22007bf882
Only use playlist-name when bounced region-name is unset 2022-11-18 22:49:15 +01:00
fc611232d2 redesign and reimplement save/restore of MIDI learn for triggers 2022-11-18 14:04:59 -07:00
58c2b0a848 move midi maps folders and file extension out of control surfaces library 2022-11-18 14:04:59 -07:00
Gon Solo
c3d4453bdf
Remove superfluous wscript lines. 2022-11-17 03:21:29 +01:00
Gon Solo
85a45b2645
Fix missing glib include path 2022-11-17 03:21:25 +01:00
10e004f0ec tweaks to TriggerBox::dump_custom_midi_bindings 2022-11-16 18:15:39 -07:00
5a07da9255 triggers: code to dump MIDI learn-ed bindings as a binding map 2022-11-16 16:25:09 -07:00
730064277d a start at custom MIDI learn for trigger slots 2022-11-16 08:37:57 -07:00
a130041547 use MIDISurface in original Faderport support, plus required changes in MIDISurface & Push 2 2022-11-16 08:37:57 -07:00
e5bbccef28 various changes to get Push 2 surface support functional after inheriting from MIDISurface 2022-11-16 08:37:57 -07:00
99712e7585 surfaces; convert push2 to inherit from MIDISurface 2022-11-16 08:37:57 -07:00
4fbf3028aa basic skeleton for new MIDISurface base class 2022-11-16 08:37:57 -07:00
6c3a1d98fe
Towards distinguishing user/factory LV2 presets
See also https://github.com/lv2/lilv/issues/55
2022-11-15 20:08:24 +01:00
82d43fa1ee Allow empty text in prompter 2022-11-15 03:24:19 +01:00
f107c063e7 Add conveniece API to set trasient-parent for Proxy Windows
On macOS, a transient parant should only be set for a single child
window. sibling windows to a single parent cannot be re-stacked.
2022-11-15 03:03:49 +01:00
4f3b8a9776
Allow to override default stack limit for background processes 2022-11-13 03:01:57 +01:00
2ae670055d
Explicitly initialize futex word
This is mainly to silence valgrind warnings, the actual value
is irrelevant here.
2022-11-13 03:01:50 +01:00
949f9e6051
Fix LV2 Atom ringbuffer overflow/corruption
Writing partial messages will lead to undefined behavior.
This does not generally happen (LV2 forge prevents overflow
of the Atom buffer itself), however if the GUI is frozen messages
may accumulate in Ardour's Ringbuffer.
2022-11-13 00:24:05 +01:00
376b50a6ae
Fix concurrency issue when deactivating plugins
Processor::deactivate must not be called concurrently with
processing. e.g. Threading rules https://lv2plug.in/ns/lv2core

This fixes a potential crash when freezing tracks
2022-11-13 00:24:02 +01:00
33eceadf3a Fix the latest French translation update 2022-11-11 14:45:09 +03:00
Julien Taverna
81df244ac1 Update fr.po 2022-11-11 14:23:10 +03:00
Julien Taverna
abd4d90637 Update fr.po
Add missing translations
2022-11-11 14:22:56 +03:00
Julien Taverna
737f6d8121 Update fr.po
Adding not translated strings in french.
2022-11-11 14:22:43 +03:00
Julien Taverna
8cac5bdef0 Update fr.po -> typo
typo
2022-11-11 14:22:31 +03:00
Julien Taverna
7a0ae90b17 Update fr.po
Add missing translations in french.
2022-11-11 14:22:11 +03:00
235d51a723
Revert "MixerScenes: implement 'undo' function for mixer scene recalls (libardour)"
This reverts commit a40c8d8e9a.
This reverts commit 01c7e14c6e.
This reverts commit 162a8c00b3.
2022-11-10 20:54:12 +01:00
162a8c00b3 fix merge error 2022-11-10 11:06:33 -06:00
a40c8d8e9a MixerScenes: implement 'undo' function for mixer scene recalls (libardour)
* this allows the session to better report which scene was last recalled
* this potentially allows controllers (like OSC) to momentarily recall
2022-11-10 09:13:50 -06:00
Edgar Aichinger
7ab5190680 remove obsolete entries 2022-11-09 17:18:16 +03:00
Edgar Aichinger
645a476c9f update german translation 2022-11-09 17:17:55 +03:00
f047182e8b
Mixer scenes are a sparse array, do not use arbitrary id 2022-11-09 09:52:37 +01:00
3d6ecaad79
Allow to override Ardour button text padding 2022-11-09 09:42:50 +01:00
88ff1fa192
LV2: only load default state if plugin requires it 2022-11-09 09:42:49 +01:00
3b49422277 Policy change: hiding a group should not affect its enablement
* in the past, the default behavior was: hiding a group would disable it,
    and then showing the group would re-enable it

* problem occurs when user has disabled a group; hiding and showing it
    unexpectedly re-enable the group

* there was a config variable to disable this behavior, but it was never
    shown on the GUI and therefore not discoverable

Despite the longstanding policy, there's really no reason for
  group visibility and enablement to be intertwined.

If this chnage causes a big problem for someone, they can revert to
  the prior behavior by setting the new config variable in the text file
2022-11-08 18:17:44 -06:00
44ff0e46ba MixerScenes: show last-selected scene (libardour part) 2022-11-08 17:29:40 -06:00
f55f0409f8 MixerScenes : scenes should report a Change when applied
* this is a convenience so the GUI can show last-selected scene
2022-11-08 17:29:13 -06:00
7038e586d0 OSC: add support for Mixer Scenes: save, recall, and state feedback 2022-11-07 10:28:30 -06:00
0bda71b40b BasicUI: Add simple functions to store and recall Mixer Scenes 2022-11-07 10:28:30 -06:00
68dc07ecee Mixer Scenes: initialize with a datestamp, rather than no name at all 2022-11-07 10:28:30 -06:00
John Emmas
9a678b71d6 'strings.h' isn't available in MSVC 2022-11-05 13:30:56 +00:00
a0a49b9769
Prevent crash if export format is N/A
This can happen when trying to use the mp3 preset
while there is no mp3 encoder available.
2022-11-04 22:10:19 +01:00
Mads Kiilerich
5ff1f28af8
Introduce internal MP3 support using libsndfile 1.1.0+ 2022-11-04 21:22:02 +01:00
Mads Kiilerich
886fe364b3
Add enums for handling libsndfile mp3 encoding
MP3 support was introduced in libsndfile 1.1.0 . It will be a simple
alternative to using external ffmpeg.

To avoid dependency on the new libsndfile or config-time checking,
hardcode the constants from sndfile.h . The actual availability will
have to be checked at runtime.
2022-11-04 19:51:26 +01:00
Mads Kiilerich
847f4fc93f
Fix bad escaped trailing newline in #define 2022-11-04 19:18:37 +01:00
d23c506088
Add missing bracket to tag MIDI channel splitted files 2022-11-04 18:54:10 +01:00
bed2e23ff6
Fix memory leak when replicating plugins 2022-11-04 17:57:50 +01:00
619d523bbe
Fix state version for copy-construction (1/2)
In some cases copying an instance requires an explicit
set_state() call (e.g. copy internal plugin state). This is
done by calling `set_state(other->get_state())`.

::get_state() produces XML as matching current_state_version.
(not loading_state_version).
2022-11-04 17:51:09 +01:00
0aad0ae464
Copy state when replicating VST3 plugins (#9006) 2022-11-04 17:40:37 +01:00
fe8d2e7695
third time lucky 2022-11-04 16:03:43 +01:00
03d2c8aa95
Fix previous commit strncasecmp() needs strings.h 2022-11-04 16:01:57 +01:00
0b8adbb1cb
Fix compilation on older systems (amend 3fb90523cc)
libs/ardour/sndfile_helpers.cc:67:68: error: 'strncasecmp' was not declared in this scope
2022-11-04 15:52:25 +01:00
Mads Kiilerich
4958c0d666
PulseAudio: fix error message 2022-11-04 13:44:55 +01:00
Mads Kiilerich
c2db9b4606
PulseAudio: just start stream uncorked
There was no reason to cork it when it was uncorked right after.

Playback will start when the buffer is full anyway.
2022-11-04 13:44:55 +01:00
Mads Kiilerich
00d3ce6b62
PulseAudio: remove commented out code 2022-11-04 13:44:55 +01:00
Mads Kiilerich
40f9e0c6a6
PulseAudio: use explicit defaults for tlength and prebuf
These might be the values that PA would have chosen anyway, but make it
clear that Ardour is in control ... and will let the user control
"everything" with the buffer size.
2022-11-04 13:44:55 +01:00
Mads Kiilerich
584ee51ca8
PulseAudio: set buffer attributes where they are used
Just moving code.
2022-11-04 13:44:55 +01:00
Mads Kiilerich
8e7ef0d42c
PulseAudio: use correct casing
This will also change the internal backend name, so it will miss the
previous 'config' setting '<State backend="Pulseaudio" ...'` and the
session file's '<EngineHints backend="Pulseaudio" ...'. But that is no
big deal after upgrading. Especially after the backend has been broken
for some users for a while.
2022-11-04 13:44:55 +01:00
Mads Kiilerich
3fb90523cc Remove unused code in sndfile_helpers
No need to worry about maintaining this code with missing formats like
mp3.
2022-11-04 03:52:45 +01:00
Mads Kiilerich
d2fa78ba95 Fix "Could create output file" error message
In the log output, the error would look like:
  [ERROR]: Export initialization failed: Exception thrown by AudioGrapher::SndfileWriter<short>: Could create output file (.../export/something.wav)

Add the missing negation.

But it would perhaps be better phrase the message differently so it not
just hints so strongly towards a file system error preventing file
creation.

Perhaps something like "Failed to initialize sound export to %s"?
2022-11-04 03:52:45 +01:00
Mads Kiilerich
6fba7f6308 Handle SF_FORMAT_DOUBLE in sndfile_data_width
Many formats use ExportFormatBase::SF_Double which incorrectly would end
up in the default "we don't handle anything else within ardour" branch.

(It happened to work correctly anyway, since ExportGraphBuilder::SFC
handled the "magic" value 1 the same was as the "error" value 0.)

For correctness, use the "magic" value 1 for double.
2022-11-04 03:52:45 +01:00
Mads Kiilerich
652a2aa3ac Fix sndfile_data_width use of low bits of subtype of libsndfile format
The libsndfile format was masked with 0xf instead of the usual
SF_FORMAT_SUBMASK. It seems like the end result generally was correct
anyway, since no supported format used subtypes that used the low bits
for anything else. Most formats use SF_FORMAT_PCM subtypes. (Only Ogg
Vorbis uses a subtype, but that happens to have 0 in the low bits and
ended up in the "this will never happen branch" ... which happened to
work too.)

This could however be a real problem when SF_FORMAT_MPEG_LAYER_III with
value 0x82 is supported ... unless worked around in some way.

I don't see anything anywhere that could stuff anything in the high bits
of the subtype, so this trivially fixed by using SF_FORMAT_SUBMASK
correctly.
2022-11-04 03:52:45 +01:00
Mads Kiilerich
6531b24e9a ExportGraphBuilder: fix invalid use of SF_FORMAT as a bitfield
Apply SF_FORMAT_SUBMASK before comparing with the expected value.

It seems like it accidentally used to work correctly for all supported
libsndfile formats anyway.

But: It seems unfortunate to hardcode Vorbis in this place. Other
formats with quality control would have to be added to the list too. It
would be nice to do use something like has_codec_quality ...
2022-11-04 03:52:45 +01:00
Mads Kiilerich
07c370bdc9 Handle exception from export formats with unknown enum values
Before, an export format with an invalid enum value (for example in the
Encoding id) would crash Ardour with:

	unhandled exception (type std::exception) in signal handler:
	what: unknown enumerator FOO in PBD::EnumWriter

That kind of error can happen if a new type is introduced and users
switch back to versions without it.

Instead, catch such exceptions while loading a format, log an error, and
skip the format - similar to how other format loading errors are
handled.
2022-11-04 03:52:45 +01:00
7b86ef8eff
Fix region gain for various edit operations
When deriving regions (split, cut), the Region Gain curve
must not be inherited as-is.

See also 8b0ab38675 and e40f58c106
2022-11-03 21:22:32 +01:00
2b0e6ec476
NO-OP: clang format 2022-11-03 00:28:24 +01:00
de4840fb9b Register Region::time_domain property
This fixes PropertyChanged signal emissions, previously a property_id of
zero was used instead.
2022-11-02 21:39:37 +01:00
6813884857
Restore custom generic midi settings #9062
DeviceInfo (bindings file) can include explicit motorized
and threshold settings. These values, when specified, are
used during load_bindings() during set_state and overwrote
any user customization.

Furthermore showing the GUI invalidated any prior setting
by explicitly calling binding_changed, which re-applies.
2022-11-02 17:44:00 +01:00
Mads Kiilerich
ef5b29c6dd
PulseAudio: group operations and their verification together
Improves readability a bit. IMO.
2022-11-02 02:24:35 +01:00
Mads Kiilerich
b046ffe395
PulseAudio: drop idempotent dynamic cast 2022-11-02 02:24:35 +01:00
Mads Kiilerich
5bb7336c79
PulseAudio: consistent use of _buffer
For consistency and readability, avoid using high level getter in low
level code.
2022-11-02 02:24:35 +01:00
Mads Kiilerich
51501e5532
PulseAudio: don't set _run = false when stop() already did it 2022-11-02 02:24:35 +01:00
Mads Kiilerich
ba5ca2de05
PulseAudio: always log error reason in error handling
It adds some new strings to translate. These strings might be so rare
and technical that it is a bit pointless to translate them. But let's
stay consistent...
2022-11-02 02:24:35 +01:00
Mads Kiilerich
3fbbef3038
PulseAudio: fix "already active" message emitted when not active
Apparently just a missing fixup after copy-paste.
2022-11-02 02:24:34 +01:00
Mads Kiilerich
2666dfe900
PulseAudio: add missing return in error handling
Don't try to continue if the initial uncorking fails.
2022-11-02 02:24:34 +01:00
Mads Kiilerich
06b3d5ba33
PulseAudio: spin waiting for enough capacity to write
pa_threaded_mainloop_wait might wake up for several reasons. And there
is no point (but possibly harm) in moving on before we have verified
that PA actually is ready to receive our write without overflow.
2022-11-02 02:24:34 +01:00
Mads Kiilerich
27a2bf1f59
PulseAudio: clean up freewheeling transitions
ae3c8b19c6 and 03a17df68c reworked the transitions to and from
freewheeling. Some of it seems to have been experiments that tried
several things out, and generally it seems to have worked. It left some
commented out code. Clean that up.
2022-11-02 02:24:34 +01:00
Mads Kiilerich
04c24be2db
PulseAudio: don't drain the stream right after initial uncorking
The draining was introduced in ae3c8b19c6, apparently as an experiment
doing several changes. But the drain is outside the loop where
freewheeling changes, so the fix must have worked for other reasons.

There doesn't seem to be any benefit from draining at that point. The
stream is already empty. If not, we could have flushed it.

Draining right after uncorking will conceptualy create an intentional
underflow, even though it isn't reported as such. PipeWire seems to
(something like 6-12 months ago) have regressed in handling of that grey
area, causing that *underflow* to cause a request for too much data, and
thus causing constant *overflows* and unusable playback.

This change makes PulseAudio playback work for me again.
2022-11-02 02:24:34 +01:00
c84073e5cf
Print reversible command debug output
Debug builds will assert, the PBD::warning will not
be readable anywhere after that, so long it to stderr.
2022-11-02 00:47:09 +01:00
292cff7cfc
Prevent undo transaction crashes in optimized builds
Worst case this will lead to undo operations not being
saved rather than segfault (debug builds will still assert).
2022-11-02 00:45:06 +01:00
c6dade9484 OSC: implement controls and feedback for a banked trigger grid controller
(first iteration ... API may change)
2022-11-01 13:52:54 -05:00
bdf9cedb0e triggers: implement grid banking in BasicUI so it can be shared (?) 2022-11-01 13:52:54 -05:00
0851d230cd basic_ui: add convenience functions to access an NxM bank of triggers 2022-11-01 13:52:54 -05:00
4f5106ae82 triggers: add convenience function to report # of trigger channels 2022-11-01 13:52:54 -05:00
756e0beb1b triggers: more session:: functions to access Triggers by index 2022-11-01 13:52:54 -05:00
c23210aae8 various fixes to prevent BasicUI diverging from GUI behaviors 2022-11-01 13:52:54 -05:00
Gon Solo
bb27b24596
Fix warning about integer division.
bugprone-integer-division: Result of integer division used in a floating
point context; possible loss of precision.
2022-11-01 15:56:55 +01:00
c9a9f40987
Add API for Lua DSP to directly set Biquad coefficients 2022-11-01 14:51:07 +01:00
62540fb5af tempo map: grid generation, fix use of barmod to insert bar points into return 2022-10-31 17:05:55 -06:00
0ef10e4f5f canvas: ruler never shows marks/text for points too close to display the label 2022-10-31 17:05:55 -06:00
5599e136c0
Implement "vicanek" matched biquad filters 2022-10-31 22:47:30 +01:00
d93c8d64bc MIDI region combine: fix conceptual errors 2022-10-31 14:22:17 -06:00
f4a57f83e6 evoral: Sequence::clear() needs to remove patch changes and sysexes too 2022-10-31 14:22:17 -06:00
fded5063d9
Yet another automation time-domain fix
This issue was fixed in 6a55146fd but resurfaced in 489c9ace9.
2022-10-31 16:23:20 +01:00
9c2c08973d tempo map: fix incorrect computation of ::bbt_at() (#9049)
This caused problems with TempoMap::get_grid() ("gone backwards").
2022-10-30 19:35:58 -06:00
bdacfb8724 Fix invalid use of Doxygen "@param" command
This is never for inline references to parameters, only for starting parameter
documentation blocks.  The "@p" command is for this, although unfortunately
Doxygen doesn't actually do anything with it and it's just an alias for code
text.
2022-10-30 20:44:28 -04:00
96bab3ce46
NO-OP: doxygenize timepos_t::distance 2022-10-31 00:22:21 +01:00
1eaaf4303b jack backend: catch some possible errors in ::get_port_name() 2022-10-29 09:37:17 -06:00
6449bf5464 source: provide a little syntactic sugar via ::time_since_capture_start() 2022-10-28 16:38:46 -06:00
1139b38db5
Update comment (amend bd339713) 2022-10-28 13:20:04 +02:00
0fe297374d
Remove superfluous call (amend bd339713)
Graph::prep is a private function called initially from the main
process-callback before doing any work, and later at the end of
each process cycle. This sets up the process graph-chain and
process trigger queue.

Tempo information is irrelevant here.
2022-10-28 13:14:13 +02:00
efdc47bc74 fix MidiRegion::merge() to allow final events of a region to be part of the newly merged result 2022-10-27 17:35:56 -06:00
bd33971346 triggers/graph: fix location of calls to TempoMap::fetch()
This ensures that RT graph threads have the correct tempo map,
and thus run triggers correctly when timestretch is required.
2022-10-27 16:33:46 -06:00
b195a04281 fix loading 6.x sessions with initial meter not at sample zero 2022-10-27 15:02:12 -06:00
33770d0777 remove stacktrace() from TempoMap::dump() 2022-10-27 11:58:39 -06:00
2cf59a988c Handle tempo-map changes in sync from the calling thread
This is required to collect relevent undo/redo information, notably
automation-data changes from Playlist::update_after_tempo_map_change and
DiskReader::playlist_ranges_moved.

The realtime thread should not move regions to begin with, and debug
builds woudl also assert since no undo operation was started.
2022-10-27 08:40:09 -06:00
fa858a0386
Fix pan automation
The time-domains need to match in order to use the
raw underlying .val() as double for interpolation.
2022-10-27 04:28:07 +02:00
489c9ace9f
Fix looping automation - see also 6a55146f 2022-10-26 21:03:08 +02:00
0ff2c746f7 prevent crash if tempo or meter are dragged back to zero 2022-10-25 12:52:30 -06:00
b0c162879d fix error with saving MIDI after forking MIDI region
when we save a MidiModel to a new MIDI source, that does not
change the edited status of the Model.
2022-10-25 12:51:08 -06:00
3efb488629 when moving tempo markers, do nothing unless the marker is moved at least 1 beat
Since tempo markers are always on-beat, this enforces a minumum distance of 1 beat while remaining on-beat.
2022-10-25 11:10:36 -06:00
72846814ba
Inherit Region Properties when splitting MIDI regions
see also e40f58c106
2022-10-24 07:13:44 +02:00
b5d7754a26
Fix MIDI Clock generator
MIDI clock start at the next beat (round_up_to_beat), so
here we have to round the current tick, rather than fall
back to a tick that is not yet complete, as 14da117bc8 does.

Reproduced with the Session from #9027
Start loop at bar 40 with MClk generator enabled.

```
#3  in __GI___assert_fail (assertion=0x7fedd86c4fd5 "clk_pos >= pos", file=0x7fedd86c38b7 "../libs/temporal/tempo.cc", line=3336, function=0x7fedd86c4f60 "void Temporal::TempoMap::midi_clock_beat_at_or_after(Temporal::samplepos_t, Temporal::samplepos_t&, uint32_t&) const") at assert.c:101
#4  in Temporal::TempoMap::midi_clock_beat_at_or_after(long, long&, unsigned int&) const (this= 0x560187e92c00, pos=20691033, clk_pos=@0x7fedc02178b8: 20691032, clk_beat=@0x7fedc02178c4: 11472) at ../libs/temporal/tempo.cc:3336
#5  in ARDOUR::MidiClockTicker::tick(long, long, unsigned int, long) (this=0x56018eed6db0, start_sample=20691033, end_sample=20692057, n_samples=1024, pre_roll=0) at ../libs/ardour/ticker.cc:170
#6  in ARDOUR::Session::send_mclk_for_cycle(long, long, unsigned int, long) (this=0x56018a216340, start_sample=20691033, end_sample=20692057, n_samples=1024, pre_roll=0) at ../libs/ardour/session.cc:7495
#7  in ARDOUR::AudioEngine::process_callback(unsigned int) (this=0x5601881a4f20, nframes=1024) at ../libs/ardour/audioengine.cc:563
```
2022-10-24 06:18:30 +02:00
Mads Kiilerich
004b32b91e
Update tracker/reference URLs to prefer HTTPs 2022-10-24 04:59:20 +02:00
Mads Kiilerich
b3743227be
Change tools --help URLs to use https 2022-10-24 04:57:30 +02:00
+merlan #flirora
79f55742d6
JACKAudioBackend::join_process_threads: Don’t pass NULL for jack_client_stop_thread
This is needed for PipeWire’s JACK frontend, which implements this
function and expects the first argument to be non-null.
2022-10-24 04:45:08 +02:00
0504db2a67 Update region delta-time API
This is the first step to fix various MIDI edit issues for sessions with
tempo-changes.

The old code, using .earlier returned an absolute position when
calculating a relative distance. This is only valid if the session has a
fixed tempo, and the origin is irrelevant when converting the timepos.

This resulted in follow up issues since there is a difference when
summing two positions (each with an origin) vs adding an offset to a
position.

Note: this API changes breaks compilation until the GUI is updated.
2022-10-23 19:05:48 +02:00
33348f6332
Fix Windows builds 2022-10-23 06:17:29 +02:00
cc30495ba0
Properly convert v6 MusicTime locked MIDI regions 2022-10-22 05:36:23 +02:00
30ec62a953 This is clearly broken
Partially revert previous commit. Otherwise snap to bar/beat
clocks-displays display rounded down X|Y|1919 instead of X|Y+1|0
2022-10-22 03:09:32 +02:00
14da117bc8 Add explicit round/floor integer multiply/divide
This fixes various rounding issues. Notably superclock to sample
conversion must always round down when playing forward.

`::process (start, end, speed = 1)` uses exclusive end.
Processing begins at `start` and end ends just before `end`.
Next cycle will begin with the current end.

One example where this failed:
 - New session at 48kHz
 - Change tempo to 130 BPM
 - Enable snap to 1/8 note
 - Snap playhead to 1|3|0
 - Enable Metronome
 - Play

`assert (superclock_to_samples ((*i).sclock(), sample_rate()) < end);`

end = 177231 samples == superclock 1042118280
A grid point is found at superclock 1042116920 (that is < 1042118280).
However converting it back to samples rounded it to sample 177231 == end,
while actual location is 1360 super-clock ticks before end.

The metronome click has to be started this cycle, since the same
position will not be found at the beginning of the next cycle, with
start = 177232.

Similarly a samplecnt_t t, converted to music-time and back must not be
later than the given sample.

```
timepos_t tsc (t);
assert (timepos_t::from_ticks (tsc.ticks ()).samples () <= t);
```

IOW. When playing forward, all super-clock time between 1|1|0 and 1|1|1
should round down to 1|1|0. "We have not yet reached the first tick".
2022-10-22 02:10:05 +02:00
e9bafde628
Catch manual removal of subgroup bus (#9022) 2022-10-21 20:40:27 +02:00
2e860cd10d
Move SimpleExport to libardour, add Lua bindings
This allows to export a session from the commandline tool

```Lua
AudioEngine:set_backend("None (Dummy)", "", "")
s = load_session ("/path/to/session", "snapshot")
assert (s);
e = s:simple_export()
assert (e:check_outputs ())
e:run_export ()
e = nil
```
2022-10-21 19:50:26 +02:00
03642d3707
Mark window invisible after deleting it
This fixes an issue when destroying VST plugin UIs
rather than hiding them. Even though is hidden before destroying it,
the vistracker is also destroyed in the same function call, before
the event can be processed. The window state remains visible="1"
2022-10-21 18:11:19 +02:00
d69a2c3c13 small change to Locations::clear_cue_markers() API to bring it into line with other clear_* methods 2022-10-21 07:51:53 -06:00
a327e01ff3
Fix copy/paste (is_cue_marker Lua binding) 2022-10-21 13:06:22 +02:00
6a55146fdc
Fix music-time parameter automation #9019
Music-time has a significantly reduced resolution.
When evaluating parameter automation using sample-time, different
samples can be mapped back to the same beat-tick. This can result in
endless loops.

The same automation event is found again:

```
start: 112640 next_event.when: b13334 -> dist a5892029@a662323200 in dist.samples: 1002
start: 113642 next_event.when: b13334 -> dist a269@a668214960 dist.samples: 0
```

Note this fix may not be correct, since time-domains are mixed.
"end" is using sample-time. Furthermore The loop is only entered
if there is an event found using  timepos_t(start).

Further work will be required (ideally use the same resolution for
all time-domains, or force everything that is evaluated in RT-context
to a single time-domain)
2022-10-21 12:40:30 +02:00
506528a70c
Add API to query current export preset 2022-10-20 21:38:40 +02:00
63677347c9 change pingback URL and no longer send OS release or machine info 2022-10-19 20:26:39 -06:00
9914732004
Potential fix for C++20 std::set::* ambiguity
(until C++20) bool empty() const noexcept;
(since C++20) [[nodiscard]] bool empty() const noexcept;
2022-10-19 16:06:47 +02:00
22829e96b1
Fix MIDI Clock sync
This fixes a deadlock, because tempo-map write copy
was not released. A later call to TempoMap::write_copy
will deadlock and in this case also hold the process lock.

This can happen if there is more than one tempo on the
timeline or if the tempo-difference is too large.
2022-10-18 20:44:16 +02:00
b52ef52ddf
Allow to filter MixerScene restore by AutomationType 2022-10-18 00:08:35 +02:00
5352f5516e
Remove AutomationControlSet 2022-10-18 00:08:35 +02:00
08a10b7e84
Replace AutomationControlSet with ControllableSet (1/2) 2022-10-18 00:08:27 +02:00
5016c950d0
Move ControllableSet up in PBD's namespace
This is in preparation to supersede AutomationControlSet
with a lower level generic std::set usable in any relevant
context.
2022-10-18 00:08:21 +02:00
46b14498f8
Prepare Lua bindings for std::set::insert 2022-10-17 23:09:04 +02:00
f6cc01d4f5
Implement cycle profiling for ppc64
Thanks to Frédéric Bonnard <frediz@debian.org>
2022-10-17 16:02:12 +02:00
aaddf5f385 Add API to restore mixer scenes for given set or Routes only 2022-10-17 06:44:29 +02:00
800d07a633 Add API to query all AutomationControls from an Automtable
This is in preparation for selective MixerScene restore.
2022-10-17 06:42:49 +02:00
Mads Kiilerich
0b27d6e652
Fix proximity threshold for polyline
I'm not good with a mouse, so I found it hard to edit animation lines.
The mouse position has to be quite precise, with only a small threshold.

Looking at the code, AutomationLine sets the threshold for the PolyLine
to 4.0 . That seems to be a distance, and better for me than what I
experience.

The actual code in PolyLine is however comparing it directly to the
squared distance, making it more sensitive than expected.

Fixed by computing the squared threshold - also including the line
width.
2022-10-17 00:09:25 +02:00
Mads Kiilerich
d1265b5a02
Fix mouse events on clamped automation lines
This fixes the following problem:
When automation lines with significant change are zoomed in time, the
slope gets smaller (towards horizontal) as the control points moves
further away from the visible area. That was rendered correctly, but the
corresponding mouse events happened as if the line had a steeper slope.

The problem was caused by the X value being clamped to the visible area,
without scaling the Y value correspondingly. It has apparently been like
that for a decode, since introduced in c4f0063a68.

The problem is fixed by introducing a clamp2 function that scales the Y
value if clamping the X value.

Note: An old comment says that math goes wrong unless clamping below
COORD_MAX. It is not clear to me what math it refers to, and especially
why we don't need similar clamping on the lower bounds.

And while rarely a real problem, I guess it would be more correct and a
slight optimization to skip all lines where both ends are outside the
same bound. In theory, as it is now, the mouse could catch an invisible
line close to the border.
2022-10-17 00:09:25 +02:00
23010a910d
Be liberal about what to accept
This addressee a bug where ardour 6 was able to write negative
duration `length="-1"` `length-beats="-3.3650500597559585e-05"`

Ideally timecnt_t::string_to should check for invalid,
negative, duration. But this also catches a more generic case.

```
exception at str.substr (1)
#3 Temporal::timepos_t::string_to (this=0x7fffffff7bb0, str="") at libs/temporal/timeline.cc:904
#4 Temporal::timecnt_t::string_to (this=0x7fffffff7ba0, str="-2") at libs/temporal/timeline.cc:294
#5 PBD::string_to<Temporal::timecnt_t> (str="-2") at libs/ardour/ardour/types_convert.h:131
```
2022-10-16 22:30:35 +02:00
31cf2dfa1b
Do not constrain bundle names to 32 chars 2022-10-16 21:45:09 +02:00
8240875379
Prevent overflow for huge time values (fix 99h clock limit @96kHz)
The default clock-limit is 99:59:59:00, just under 360000 seconds
(see ARDOUR_UI::parameter_changed, clock-display-limit).

AudioClock calculates this limit pos as
`timepos_t (limit_sec * _session->sample_rate())`

This caused an overflow leading to a negative value:
```
   timepos_t (359999 * 96000)
   samples_to_superclock (359999 * 96000, 96000)
   int_div_round (359999 * 96000 * 282240000, 96000)
```

Ideally this will be optimized, here the sample-rate cancels out,
so we could use a c'tor usin seconds.
In other cases we could cache the pre-calculated sc_per_sample:
`superclock_ticks_per_second() / superclock_t (sr)` which is an
integer for all commonly used sample-rates.
2022-10-16 18:46:36 +02:00
061d44feff
PortInsert: remove old API to query latency 2022-10-14 02:21:50 +02:00
40ea071873
PortInsert: emit signal when latency changes, cache I/O latency 2022-10-14 02:21:50 +02:00
0213fa6cc7
Implement PortInsert send/return gain contols 2022-10-14 02:21:50 +02:00
2939ed3164
Add dedicated InsertReturnLevel type
This is preparation for PortInsert Send and Return
level control.
2022-10-14 02:21:49 +02:00
f3423b8a77
Consolidate send/delivery gain control
This moves the _amp from send to delivery (which already
applies gain for the master-bus normalization). This generalizes
the use of a gain stage for use in port-inserts.
2022-10-14 02:21:49 +02:00
e665d456c3
Optimize RB stretch/pitch, set max-process size hint 2022-10-14 02:21:49 +02:00
a7a8783bb4 increase superclock_ticks_per_second to provide integer handling for NTSC (following Facebook "flicks") 2022-10-13 18:05:49 -06:00
38a40d7c06
Session drop graph-nodes before ~Session
Previously active Routes were retained until the end of
Session d'tor and not dropped during Session::destroy.

While most resources were explicitly cleaned up via DropReferences,
Processor UIs are kept around until the actual destructor runs.
Likewise some controllable are kept around while the GraphNode (Route)
owning it is not released.
2022-10-13 17:49:34 +02:00
8d866f58a2 fix mis-use of locally-scopped variable name in auto for loop 2022-10-12 16:51:04 -06:00
392210270c
Fix pitch-shift producing partially silent regions
It can happen that with a scaling factor of 1.0, rubberband
produces slightly fewer samples than the original.

Region::set_length (region->length * 1.0) is idempotent and
does not shorten it as appropriate to the longest source
via Region::verify_length(), which leads to various issues.
2022-10-12 22:25:10 +02:00
396013bf5a
Set and create clip-library folder if needed
Direct calls to `Config->get_clip_library_dir` may return
"@default@". The path is OS specific and may also not
yet exist, so indirection is required.
2022-10-12 16:11:50 +02:00
d69dfc26a6 no whole file regions in triggerbox slots 2022-10-11 12:56:41 -06:00
5324c9092e
Clean up LADSPA preset path
* Allow to bundle presets
* Do not use /usr/[local] on Windows
(This may need further work, for Windows, since default user
presets are in `file://$HOME/.ladspa/rdf/`)
2022-10-11 16:39:17 +02:00
340a260b30
Remove old LRDF VST presets
Ardour has not been using RDF for VST2 presets since at least
10 years.
2022-10-11 16:23:20 +02:00
0aa5a8674c
Remove accidentally commited file 2022-10-11 03:28:18 +02:00
0bf8e7d8cf
Make clock mode settings session independent
Much like the edit-tool and grid-types, clock-modes are UI state.

Saving the UI state separately allows them to be used
consistently for new sessions. Previously clock-modes were set
initially (at application start) and when loading sessions.

The clock modes of newly created sessions was different
depending on loading another session prior to creating the
session. This is now no longer the case.
2022-10-10 21:03:45 +02:00
c04b05f497
Remove misleading export quality comments 2022-10-10 02:23:55 +02:00
830fe4da2f
Add preference enum for plugin GUI unmap behavior 2022-10-08 18:44:16 +02:00
f89845e64a
Prevent duplicate signal emission
Re-assigning a sigc::connection does not disconnect
any previously connected signals.

WindowProxy::setup may be called multiple times. Notably plugin
windows can change the managed _window (generic/custom), which
requires a call to setup.
2022-10-08 17:12:10 +02:00
88396347e6 increment/decrement name changes ... out with old in with the new (libs 2022-10-07 17:30:35 -06:00
be9fdd9873 libs: use {de,in}crement_by_domain() instead of {de,in} (libs) 2022-10-07 16:24:46 -06:00
27d5843f7a temporal: replace Range::extent() with Range::length()
We want to encourage/enforce the use of exclusive-end conventions
everywhere in the libraries that make up ardour
2022-10-07 16:16:14 -06:00
c4d737dd87 temporal: provide ::decrement_by_domain() methods for time{pos,cnt}_t
audio time nominally uses superclocks as its canonical unit. However
many things at a higher level only understand samples. If we
increment or decrement a superclock value by 1, the vast majority of
the time we will still get the same sample value after
conversion. Thus to correctly alter an audio time by an amount
that will manifest as 1 sample's difference, we have to use
samples_to_superclock(1)
2022-10-07 16:16:14 -06:00
617a517a60 temporal: add timecnt_t::increment() and Range::extent() (length+1) 2022-10-07 16:16:14 -06:00
b4d7ca06b8
Add Luabindings for MPControl (required for VBM) 2022-10-07 18:52:00 +02:00
8d045e15dc Do not add whole-file regions to playlists
Various operations, notably time-stretch and other filters, directly
added the generated whole-file region to the playlist.
The editor has not listed the generated Region in the RegionList.
2022-10-07 00:36:57 +02:00
f6e471f48d Remove explicit overrides
see 27dcb7560c1cab and 8c83149c4c
2022-10-07 00:36:43 +02:00
e40f58c106 Inherit Region Properties
This also adds special cases when splitting or splicing locked regions.
2022-10-07 00:36:10 +02:00
2f810ad34e Allow to override region lock, and derive properties
This is required when adding locked regions to a playlist.
e.g. after a split or partition operation. It is only supposed
to be used from Playlist::add_region_internal() and
Playlist::partition_internal().
2022-10-07 00:35:51 +02:00
ebf59d4426 Insert_or_assign properties, allow to override properties
This allows to copy a property list and then selectively
replace various properties. e.g.

```
PropertyList plist (region->properties ());
plist.add (Properties::length, len);
plist.remove (Properties::start);
```

See also 8b0ab38675
and 97f0fac7d5
This also fixes the issue referenced in
8c83149c4c
2022-10-07 00:32:14 +02:00
7a0da94ba3 fix RangeTest to account for Range now using exclusive ends, not inclusive 2022-10-05 17:30:45 -06:00
3c0820e36e move default_triggers_per_box into a namespace ; change value for Ardour to 16 2022-10-04 19:55:05 -06:00
34d339ab5d MIDI copies are now unlinked by default 2022-10-04 18:32:02 -06:00
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
b269a1298c
Fix memory leak for invalid SMF event 2022-10-04 03:29:52 +02:00
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
a0c93328ea push2: fix intended behavior of push2 "lower buttons" 2022-10-03 15:41:50 -06:00
374ff2b12d fix thinko in unbang behavior 2022-10-03 13:47:55 -05:00
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
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
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
42a4216f22 osc: publish session-provided trigger functions: bang/unbang 2022-10-01 09:13:14 -05:00
7fe7adb83c push2: adapt to new unbang and 'stop' semantics (needs testing) 2022-10-01 09:13:14 -05:00
6c292a83da basic_ui: use session-provided bang/unbang functions 2022-10-01 09:13:14 -05:00
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
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
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
1e283adb22 disambiguate trigger functions: stop_all_triggers -> trigger_stop_all 2022-10-01 09:13:14 -05:00
75ae0fd4b1 disambiguate trigger functions: cue_bang -> trigger_cue_row 2022-10-01 09:13:14 -05:00
ddfefa2583 remove some debug printfs 2022-10-01 09:13:14 -05:00
be28c9ff88 osc: add functions to trigger cue rows, and stop all triggers 2022-10-01 09:13:14 -05:00
c09e66bb25 Fix apple/ARM FPU test, allow for FLT_EPSILON for unaligned math 2022-10-01 06:28:07 +02:00
61d192723a
More windows build fixes (see prev. commit) 2022-10-01 03:01:03 +02:00
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
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
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
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
a520adff62 Better version for d70ebde (compare timepos_t directly) 2022-09-30 04:57:09 +02:00
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
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
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
2d6e5d4638 Fix building unit-tests on macOS 2022-09-28 23:05:56 +02:00
dc90ec4e33
Add additional Lua TempoMap bindings 2022-09-28 18:47:55 +02:00
8b84a0c36f
Add explicit BBT_Offset print function (like timeline.h has) 2022-09-28 18:46:58 +02:00
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
1abf6a77d6
Even more Lua bindings 2022-09-27 20:00:50 +02:00
bf0a525647 remove unused variable 2022-09-27 09:32:19 -06:00
395bf4a650
Cont'd work on nutempo Lua bindings 2022-09-27 13:06:16 +02:00
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
28d11df6f6
operator% is a const operation 2022-09-27 13:04:49 +02:00
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
f79f3ee301
Remove unused API 2022-09-27 00:40:35 +02:00
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
6ff57ca37b improve accuracy of DEBUG_TRACE output 2022-09-26 16:40:08 -06:00
60aaccb2f9 a likely better fix than 8ba21e7fff for the same problem 2022-09-26 16:40:08 -06:00
831fd9c4b2
Amend eb85b336c, remove Lua binding of declared but not implemented method 2022-09-26 23:33:38 +02:00
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
e98fe4729e
LuaBridge - add API to try convert a value
This in in preparation to overload operators
2022-09-26 21:39:21 +02:00
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
f2eddd404b downloader: create destdir if it does not already exist, throw exception if this fails 2022-09-26 01:10:20 -06:00
e09913ced7
Set SMF::open option, do not scan when loading the model 2022-09-25 02:46:59 +02:00
0457646387
Allow to scan midi file during file read
This partially reverts eced764480. In many places Ardour uses
SMF directly, without loading the MIDI model in a libardour SMFSource.

In this case no information (track, channel-count) was available,
after eced764480, and worse various members were not initialized
and showed random numbers.

This fixes various import options.
2022-09-25 02:46:09 +02:00
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
7e5fe695d0 Increase coreMIDI robustness, do not drop late events
see also https://discourse.ardour.org/t/ardour-not-getting-all-messages-from-midi-keyboard/107618/13
2022-09-24 02:29:50 +02:00
0cd87a917c push2: apply concept in 0af0e3a8e8 to push2 code (unused follow action icon) 2022-09-22 09:20:01 -06:00
af28394bfd push2: fix an apparent bug in cairo when drawing follow action icons
It seems that using ::move_to() followed by Pango::Layout::show_in_cairo_context() leaves
the context in a state that is not correctly restored when using ::restore(). Therefore,
clear the path to avoid leaving any dangling current point
2022-09-22 00:43:38 -06:00
luz paz
7f06beda50 Fix typos
Found via `codespell -q 3 -S *.po,./.git,./share/patchfiles,./libs,./msvc_extra_headers,./share/web_surfaces,*.patch  -L acount,ba,buss,busses,discreet,doubleclick,hsi,ontop,retrn,ro,scrollin,seh,siz,sord,sur,te,trough,ue`
2022-09-21 19:09:55 -06:00
9b65be0e17
Add debug information for coreMIDI events 2022-09-22 00:42:56 +02:00
7d75ac0f14
Add Lua binding to remove plugin-preset 2022-09-21 18:21:27 +02:00
0b0f49412d remove some debug output 2022-09-21 09:13:26 -06:00
2316df357b remove some debug output 2022-09-21 09:13:17 -06:00
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
3ad819da4c
Add Lua binding to create/save plugin presets 2022-09-21 14:48:04 +02:00
3ca0f4e43d
Prepare API to resample session to engine when SR mismatches 2022-09-21 00:34:03 +02:00
f76e63fd89
Update size-request when font/style is set 2022-09-20 03:33:15 +02:00
5ef2d04cd8
Remove unused size_request-for_text helpers 2022-09-20 03:33:12 +02:00
8508b3dba4
Allow multiple sizing texts for ArdourButton/Dropdown
A widget's style (font) is only set after the widget has been
packed and inherits relevant information from the top-level window.

`set_size_request_to_display_given_text()` produces incorrect
results when it is called for widgets without a top-level
(here ARDOUR_UI::setup_windows() _main_window.add(), changes the
font from "Sans 11" to "Sans 9" for ArdourDropdowns).

`set_size_request_to_display_given_text()` must subscribe to
`signal_style_changed()`, however in case of ArdourButton UI-scaling
of elements also needs to be taken into account. It is preferable
to allow for multiple sizing-texts directly.
2022-09-20 02:35:26 +02:00
45cd07aa5a
Remove old layered-record-mode config 2022-09-19 22:50:47 +02:00
e38cb08901
Use new record-mode pref (1/2) 2022-09-19 22:50:06 +02:00
cade07472f
Add RecordMode enum to replace layered_record_mode 2022-09-19 22:49:47 +02:00
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
ac53f7e95a
Apple+H (hide window) shortcut does not work, so hide it
This likely broke in 3.x when Ardour migrated to context dependent
shortcuts (rather than GTK managed menu shortcuts).

While there is Gtkmm2ext::Application::hide, there is currently no
bindable action and hence no way to add a dedicated
shortcut. Furthermore, since this is a special NSApplication menu,
updating the menu-item when the action is bound is not trivial.

gtk_application_hide() is only implemented for macOS and
there is likely a better use for "H" shortcut anyway.
2022-09-18 16:33:29 +02:00
e42de1e229
Bump session format version for MIDI region transparency 2022-09-14 02:44:52 +02:00
b277244b12
Convert MIDI region transparency when loading old sessions 2022-09-14 02:44:49 +02:00
44bacae43d
Allow for silent session format updates 2022-09-14 02:44:44 +02:00
be24b51a6b downloader: remove unnecessary header 2022-09-13 14:15:24 -06:00
d087cd9465 downloader: use PBD::Thread instead of std::thread 2022-09-13 14:14:53 -06:00
aeccb137fd threaded archive inflation for library mgmt 2022-09-13 13:53:45 -06:00
4b25264db1 remove inflater and downloader from libardour 2022-09-13 13:53:45 -06:00
375daf4810 libpbd: new threader Inflater and Downlaoder classes 2022-09-13 13:53:45 -06:00
2061c3780d FileArchive: minor fixes to get progress reporting working 2022-09-13 13:53:45 -06:00
be096edd8c
Use rubberband 3.0 API if available 2022-09-13 06:44:41 +02:00
46deb15d12
ALSA: request device to query its settings
Querying available buffersizes and sample-rates requires access
to the device. Almost all ALSA devices are limited to
a single user-space application so we unconditionally try
to request access to the device.
2022-09-12 16:34:25 +02:00
18474d89f8
SystemExec try SIGINT before SIGKILL
Even though SIGINT is intended to be sent from terminals only,
it is more successful at terminating various child processes than
closing stdin and sending SIGTERM.
2022-09-12 16:17:55 +02:00
f85b4fef15
Distinct stderr messages from ARD 2022-09-12 16:15:10 +02:00
ea335eedeb
Clarify library URL pref name (amend d4532973) 2022-09-12 01:31:49 +02:00
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
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
9cfcca8ba4 library downloading: various fixes to download process 2022-09-10 15:19:02 -06:00
16ef3dd6b1
Fix MR:render_range debug output (nutempo) 2022-09-10 18:19:58 +02:00
644136bca0
NO-OP: re-indent EventsSortByTimeAndType 2022-09-10 18:19:58 +02:00
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
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
5ad7361b28
MidiStateTracker::flush restore CC (bank) before PGM 2022-09-10 18:19:57 +02:00
John Emmas
5737468768 libardour: some new classes get used in gtk2_ardour (so need to get exported) 2022-09-10 11:39:53 +01:00