summaryrefslogtreecommitdiff
path: root/libs
AgeCommit message (Collapse)Author
2020-02-14Fix seamless looping w/split-cyclesRobin Gareus
This fixes the following (loop-lennth > internal_playback_seek length. Due to read-ahead on some cycles the following can happen --- Loop From: 3528000 To: 3880800 (len: 352800) start-sample: 3880971 playback_sample: 3528171 nframes: 96 start-sample: 3880875 playback_sample: 3528075 nframes: 192 --- which resulted in disk_samples_to_consume == 0;
2020-02-14Fix potential deadlock (session-template with latent procs)Robin Gareus
2020-02-14Fix cross-compile linking (arm-linux ld)Robin Gareus
Explicitly specify required libraries (waf does no longer forward .uselib dependencies of libraries used by .use). This leads to undefined symbols.
2020-02-13LCXL: make sends assignable for 32CJan Lentfer
* add an option to the controller configuration gui to assign the 3x2 send banks in mixer mode to either the upper (1-6) or lower (7-12) Mixbus sends * This was a user request to better support the workflow of the CoMondo Mix system
2020-02-13Fix Mixbus well-known filter controls (HP/LP freq)Robin Gareus
2020-02-13LCXL: fix pan for Mixbus device mode, tooJan Lentfer
2020-02-13FP8: fix direction of panner bar on scribble-stripRobin Gareus
(amend 4f90bd6298, see also c663a2d8ef6)
2020-02-13FP8: don't send non-ASCII chars to scribble-stripRobin Gareus
In particular the degree sign (\u00B0) used by Mixbus' panner caused issues.
2020-02-13Address sidechain-port name uniquenessRobin Gareus
[Re]name sidechain port directly when a plugin is added. Usually plugins are constructed without an Route (owner is unset). PluginInsert c'tor may already create a side-chain port, at the time of construction the sidechain port will be created using the port-name "toBeRenamed". Previously the plugin had to be added to a route using "add_processor", in order to set a unique name, before a new plugin with sidechain could be constructed. ProcessorBox::use_plugins() did that in the correct sequence, however there may have been cases where this didn't work, and Route::add_processors() was called directly..
2020-02-12LCXL: Make the pan fix nice againJan Lentfer
2020-02-12FaderPort8: Don't lock shift, when using shift + encoderRobin Gareus
2020-02-12Fix Faderport 2/8/16 pan azimuth knob directionRobin Gareus
See also c663a2d8ef6
2020-02-12Fix loop-fade and de-click buffersize calculationRobin Gareus
Exponential approach to zero: 1 / exp(t) == exp (-t) we "stretch" it by a time-constant "c": gain(t) = exp (-t * c) To find the time t, at which the exponential approach reaches gain "g": exp (-c * t) = g take the log of both sides: log (exp (-c * t) = log (g) since log (exp (x)) == x : -c t = log (g) divide by -c : t = -log (g) / c set g = 1e-5 and c = _a/sr and we get: t = -log (1e-5) / (_a/sr) The iterative approach using g += c * (target_gain - g); converges faster than the exact exp() calculation. Except with 32-bit float, if target-gain is 1.0f and "c" is small. With 32bit float (1.0 - 1e-5) = .9999900 is represented as sign: +1 | mantissa: 0x7fff58 | exponent: 126 there are only 126 "steps" to 1.0. Rounding of the lowest mantissa bit does matter. We have to assume worst-case, and increase the required loop_fade_length buffersize. vs. approaching 0, where there are over 2^110 steps between zero and 1e-5.
2020-02-12NO-OP: use #define for de-click + fade gain coefficientRobin Gareus
2020-02-12Prevent out-of-bounds array accessRobin Gareus
2020-02-12fix missing MIDI playback by using correct (expanded) logic in ↵Paul Davis
DiskReader::declick_in_progress() If use_transport_fades() is false, then the declick_amp will have its gain always set to the current target (no declick). Therefore only testing if it has reached zero is not enough, we need to check if we are declicking at all.
2020-02-12Revert commit #39975dc3c6 from Feb 7thJohn Emmas
'using namespace ARDOUR;' is needed for the MSVC build. (I guess it could be enclosed by a #ifdef if it's causing issues for the gcc build)
2020-02-11move the point of adding a new MIDI track until *after* the instrument is addedPaul Davis
This seems ripe with all kinds of subtle breakage potential. Sigh.
2020-02-09LCXL: Adopt pan knob behaviourJan Lentfer
* "left/right" changed in A6, adopt for this * add a pick_up_rev function to honour this
2020-02-09ptformat: Update to upstream 55f08d8 (simplify version detection)Damien Zammit
2020-02-08Add missing include for compat (memcpy needs string.h)Robin Gareus
2020-02-07Reduce used namespaceRobin Gareus
This partially reverts 40cca52b, this code is only using ARDOUR::Session and nothing else from ARDOUR.
2020-02-07Changes needed for building with MSVCJohn Emmas
Mostly these are to do with TLSF which I hadn't in fact been building!! Hopefully there won't be any problems for the gcc builds.
2020-02-06always use plugin's ::midnam_model() method to provide the name of a custom, ↵Paul Davis
plugin provided MIDNAM document
2020-02-06Fix DSP::process_map edge-case (unconnected inputs)Robin Gareus
previously this could result in signals being passed though (in-place) when inputs were disconnected.
2020-02-06Prefer TLSF over realloc-pool for LuaProcRobin Gareus
With 4MB RAM and 1.5MB locked base memory (C++ bindings), TLSF has a better worst-case performance (-20% std-dev execution time compared to realloc-pool). Even though on average Realloc-Pool performs better (-9% average time, compared to TLSF).
2020-02-06Fix rt-safety of LuaProc w/o chanmappingRobin Gareus
Since Lua function arguments are not typed, there is no explicit "const", and a function can always modify the parameter. When passing `ChanMapping const&` as argument, the object is copy constructed. In this specific case the std::map<> members of ChanMapping allocate memory. Passing a pointer to the object works around this issue. LuaBridge later dereferences the object as needed when calling c++ methods, and copy-construction would only happen later.
2020-02-06Fix rt-safety (const reference, not const copy)Robin Gareus
PluginInsert (and a few other places) iterate over channel mappings using a const iterator. However mappings() allocated memory since it was copied
2020-02-06Update DSP::ConvolutionRobin Gareus
Expose zita-convolver bindings, to allow for custom NxM convolution matrices, and dedicated FIR processors.
2020-02-06Audio ROM Lua BindingsRobin Gareus
2020-02-06Add a Read Only Memory Audio SourceRobin Gareus
This will come in handy for FIR, or short samples in combination with a Lua convolution processor.
2020-02-06Add Lua Bindings for Readable c'torRobin Gareus
2020-02-06Break out API to create readables from filesRobin Gareus
2020-02-06Lua Array, assert indices > 0Robin Gareus
2020-02-06Extend Lua binding for static methodsRobin Gareus
This add support for Lua bindings for static member functions in weak/share ptr class bindings.
2020-02-04Auto-Input should default ON (per irc discussion)Ben Loftis
2020-02-04Fix a potential case where PresentationInfo type flag is not set (see ↵Ben Loftis
comment for details)
2020-02-03Initialize uninitialized variable (Session StateProtector)Robin Gareus
2020-01-31Lua bindings for locations and locate dispositionRobin Gareus
2020-01-30Fix assert() when removing track(s)Robin Gareus
ARDOUR::Session::remove_routes() explicitly calls save_state (_current_snapshot_name) Update assert() to treat an empty name equivalently as explicitly specified _current_snapshot_name
2020-01-30Use session-version when loading processor stateRobin Gareus
Stateful::loading_state_version vs. Stateful::current_state_version See also 0a5837ec7111
2020-01-30Fix recursive locks during undo/redo due to state saveRobin Gareus
undo may restore locations, which may trigger a state-save. This can result in a deadlock: Location::set_state () -> Locations::get_state() both acquire a the same lock: #2 0x000055a8421836d0 in Glib::Threads::Mutex::Lock::Lock(Glib::Threads::Mutex&) (this=0x7ffe38dcad40, mutex=...) at /usr/include/glibmm-2.4/glibmm/threads.h:687 #3 0x00007fc637731e9c in ARDOUR::Locations::get_state() (this=0x55a8466d4740) at ../libs/ardour/location.cc:1075 #4 0x00007fc637bf14b7 in ARDOUR::Session::state(bool, ARDOUR::Session::snapshot_t, bool) (this=0x55a846d0f050, save_template=false, snapshot_type=ARDOUR::Session::NormalSave, only_used_assets=false) at ../libs/ardour/session_state.cc:1406 #5 0x00007fc637bed2c8 in ARDOUR::Session::save_state(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, bool, bool, bool, bool) (this=0x55a846d0f050, snapshot_name="", pending=true, switch_to_snapshot=false, template_only=false, for_archive=false, only_used_assets=false) at ../libs/ardour/session_state.cc:815 #6 0x00007fc637b4d967 in ARDOUR::Session::auto_punch_start_changed(ARDOUR::Location*) (this=0x55a846d0f050, location=0x55a848fe11d0) at ../libs/ardour/session.cc:1395 #7 0x00007fc637b4da21 in ARDOUR::Session::auto_punch_end_changed(ARDOUR::Location*) (this=0x7fc637b4da21 <ARDOUR::Session::auto_punch_end_changed(ARDOUR::Location*)+67>, location=0x7ffe38dcbf10) at ../libs/ardour/session.cc:1403 [..] #14 0x00007fc637730a2a in ARDOUR::Location::set_state(XMLNode const&, int) (this=0x55a848fe11d0, node=..., version=6000) at ../libs/ardour/location.cc:715 #15 0x00007fc637732428 in ARDOUR::Locations::set_state(XMLNode const&, int) (this=0x55a8466d4740, node=..., version=6000) at ../libs/ardour/location.cc:1130 #16 0x000055a842388dd7 in MementoCommand<ARDOUR::Locations>::undo() (this=0x55a84d1e5f10) at ../libs/pbd/pbd/memento_command.h:141 #17 0x00007fc635b50707 in UndoTransaction::undo() (this=0x55a84d513b80) at ../libs/pbd/undo.cc:128 #18 0x00007fc635b50e1c in UndoHistory::undo(unsigned int) (this=0x55a846d11338, n=0) at ../libs/pbd/undo.cc:267 #19 0x00007fc637c0dfff in ARDOUR::Session::undo(unsigned int) (this=0x55a846d0f050, n=1) at ../libs/ardour/session_state.cc:5577
2020-01-30Allow StateProtector to save pending filesRobin Gareus
This is in preparation for saving state while the session is record-arm'ed. Most notably config changes and undo/redo. In case both normal and pending save happens, pending must be last and is required to recover from crashes during recording.
2020-01-30Add some sanity checks for Session::save parametersRobin Gareus
2020-01-30Cont'd work on loading old route templatesRobin Gareus
This builds on top of 51d2bb: * v6 routes templates/states have a version per <Route> * older route-states are assumed to be from ardour-5 Stateful::loading_state_version 3002, unless specified otherwise
2020-01-29Save/Use state-version with route templatesRobin Gareus
Currently using Ardour-5 route templates (state version "3002") with Ardour6 fails. As opposed to session-templates, Route templates were not versioned. This ensures future compatibility (and may allow to interpret unversioned templates as "3002")
2020-01-29Fix tests failing to build by adding LIB_FFTW3FNikolaus Gullotta
2020-01-29Reduce overhead of Lua session-scriptsRobin Gareus
2020-01-29Fix MIDI loop capture alignmentRobin Gareus
Loop recording creates a single long source, regions have to be "split" from this source, using "start" as offset. Since MIDI uses absolute timestamps, offsetting this by accumulating buffer_position += (*ci)->samples; like Track::use_captured_audio_sources() does, is not correct. Furthermore, record_enabled() may be off when stopping recording, MIDI needs to be flushed regardless.
2020-01-29Allow to dis/engage rec-arm while loopingRobin Gareus