13
0
Commit Graph

19639 Commits

Author SHA1 Message Date
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