ardour.git
6 years agoTweak Lua GC
Robin Gareus [Wed, 29 Nov 2017 11:03:18 +0000 (12:03 +0100)]
Tweak Lua GC

6 years agoupdate to lua-5.3.4
Robin Gareus [Wed, 29 Nov 2017 03:22:26 +0000 (04:22 +0100)]
update to lua-5.3.4

6 years agoOSC: add /select/plugin/activate cause some add deactivated
Len Ovens [Tue, 28 Nov 2017 20:16:36 +0000 (12:16 -0800)]
OSC: add /select/plugin/activate cause some add deactivated
And clean up plugin code as well

6 years agoFix "open folder" for non-ASCII paths on Windows
Robin Gareus [Sun, 26 Nov 2017 23:42:29 +0000 (00:42 +0100)]
Fix "open folder" for non-ASCII paths on Windows

6 years agoRemove unused API
Robin Gareus [Sun, 26 Nov 2017 08:50:35 +0000 (09:50 +0100)]
Remove unused API

6 years agoSidechain latency compensation - part one
Robin Gareus [Sun, 26 Nov 2017 08:48:54 +0000 (09:48 +0100)]
Sidechain latency compensation - part one

This properly sets the port-latencies of PluginInsert owned ports as well
as handles external sends (send-target playback latency).

NB. This needs more work to ensure that Sidechain input port playback
latency is set before the feeding send queries it the connected latency.
Re-ordering process may change sidechain or external-send latencies,
but since re-ordering does not change the route's latency,
engine.update_latency() may not be called.

6 years agoAdd convenience methods to set port latencies
Robin Gareus [Sun, 26 Nov 2017 08:38:32 +0000 (09:38 +0100)]
Add convenience methods to set port latencies

6 years agoOSC: Only send new select send values
Len Ovens [Thu, 23 Nov 2017 20:04:21 +0000 (12:04 -0800)]
OSC: Only send new select send values
no clear first, no double send

6 years agoOSC personal monitor fix off by one bug.
Len Ovens [Tue, 14 Nov 2017 17:23:39 +0000 (09:23 -0800)]
OSC personal monitor fix off by one bug.

6 years agoRemove duplicate assignment (amend 867460cd3)
Robin Gareus [Thu, 23 Nov 2017 14:34:21 +0000 (15:34 +0100)]
Remove duplicate assignment (amend 867460cd3)

6 years agoExample Lua script to move regions (insert gaps)
Robin Gareus [Thu, 23 Nov 2017 14:27:29 +0000 (15:27 +0100)]
Example Lua script to move regions (insert gaps)

6 years agoMake static analysis happy..
Robin Gareus [Thu, 23 Nov 2017 10:29:07 +0000 (11:29 +0100)]
Make static analysis happy..

If the copy c'tor of ProcessorSelection was actually used,
assigning the XMLProcessorSelection
    processors = other.processors;
would lead to duplicate free() of the XMLNode*
XMLProcessorSelection would need a dedicated copy c'tor that
duplicates allocates a new XMLNode.
see also #10 at https://www.viva64.com/en/b/0540/

Anyway, the copy c'tor and assignment is never used. This commit makes
this explicit.

6 years agoRemove unreachable code.
Robin Gareus [Thu, 23 Nov 2017 09:51:20 +0000 (10:51 +0100)]
Remove unreachable code.

if (working_on_selection) {
  ...
} else {
  if (working_on_selection) { .. never reached .. }
}

Found by PVS: https://www.viva64.com/en/b/0540/

6 years agoNO-OP: cleaner syntax
Robin Gareus [Thu, 23 Nov 2017 09:46:44 +0000 (10:46 +0100)]
NO-OP: cleaner syntax

6 years agoConsistent default argument for virtual fn.
Robin Gareus [Thu, 23 Nov 2017 09:45:04 +0000 (10:45 +0100)]
Consistent default argument for virtual fn.

6 years agoCatch exceptions by const reference
Robin Gareus [Thu, 23 Nov 2017 09:38:52 +0000 (10:38 +0100)]
Catch exceptions by const reference

6 years agoFix a potential(?) nullptr dereference
Robin Gareus [Thu, 23 Nov 2017 09:38:05 +0000 (10:38 +0100)]
Fix a potential(?) nullptr dereference

6 years agofix call to std::unique; to actually erase dups.
Robin Gareus [Thu, 23 Nov 2017 09:23:54 +0000 (10:23 +0100)]
fix call to std::unique; to actually erase dups.

6 years agoFix potentially ambiguous printf()
Robin Gareus [Thu, 23 Nov 2017 09:12:34 +0000 (10:12 +0100)]
Fix potentially ambiguous printf()

Not a real issue, since it's just supposed to be some unique number.
but still.

Reported by PVS-Studio - https://www.viva64.com/en/b/0540/

6 years agoNo need for memset to clear a byte.
Robin Gareus [Thu, 23 Nov 2017 09:10:32 +0000 (10:10 +0100)]
No need for memset to clear a byte.

6 years agoremove useless test, fgets() already ensures MAX_STRING_LEN
Robin Gareus [Thu, 23 Nov 2017 08:56:57 +0000 (09:56 +0100)]
remove useless test, fgets() already ensures MAX_STRING_LEN

Found by PVS-Studio - https://www.viva64.com/en/b/0540/

6 years agoFix another duplicate if from session/system config consolidation
Robin Gareus [Thu, 23 Nov 2017 08:53:50 +0000 (09:53 +0100)]
Fix another duplicate if from session/system config consolidation

Found by PVS-Studio - https://www.viva64.com/en/b/0540/

6 years agoFix size-request call
Robin Gareus [Thu, 23 Nov 2017 08:53:09 +0000 (09:53 +0100)]
Fix size-request call

use  Requisition Gtk::Widget::size_request ()  const;
and not deprecated
void Gtk::Widget::size_request  (const Requisition&);

Found by PVS-Studio - https://www.viva64.com/en/b/0540/

6 years agoFix duplicate if(A) else if (A) condition
Robin Gareus [Thu, 23 Nov 2017 08:22:21 +0000 (09:22 +0100)]
Fix duplicate if(A) else if (A) condition

Issue came to be from consolidating Session and UI configuration.
Found by PVS-Studio - https://www.viva64.com/en/b/0540/

6 years agoFix typo in 318e7efb
Robin Gareus [Wed, 22 Nov 2017 23:10:54 +0000 (00:10 +0100)]
Fix typo in 318e7efb

6 years agoGUI to set clock-origin marker
Robin Gareus [Wed, 22 Nov 2017 23:10:36 +0000 (00:10 +0100)]
GUI to set clock-origin marker

6 years agoImplement clock delta modes
Robin Gareus [Wed, 22 Nov 2017 21:10:37 +0000 (22:10 +0100)]
Implement clock delta modes

* use new config variable
* update GUI to select delta-modes
* delegate delta-calculation to MainClock
* save offset to calculate absolute-time

6 years agoAdd clock-delta mode enum
Robin Gareus [Wed, 22 Nov 2017 21:09:17 +0000 (22:09 +0100)]
Add clock-delta mode enum

6 years agoIntroduce a dedicated "Clock Origin" Marker
Robin Gareus [Wed, 22 Nov 2017 21:08:40 +0000 (22:08 +0100)]
Introduce a dedicated "Clock Origin" Marker

6 years agoFix switch statements in ExportTimespanSelector
Robin Gareus [Wed, 22 Nov 2017 19:36:58 +0000 (20:36 +0100)]
Fix switch statements in ExportTimespanSelector

6 years agoAdd seconds as clock-unit
Robin Gareus [Wed, 22 Nov 2017 19:36:28 +0000 (20:36 +0100)]
Add seconds as clock-unit

6 years agoRelease (debug) lock before emitting signal
Robin Gareus [Mon, 13 Nov 2017 22:31:12 +0000 (23:31 +0100)]
Release (debug) lock before emitting signal

6 years agoRevert "editor_pt_import: Process wav indexes once only"
Damien Zammit [Sat, 18 Nov 2017 04:27:37 +0000 (15:27 +1100)]
Revert "editor_pt_import: Process wav indexes once only"

This reverts commit 7422ffe6920deba396debb670c713849a64be43b.

6 years agoOSC: only reset cue sends that do not have a new send
Len Ovens [Tue, 14 Nov 2017 01:18:33 +0000 (17:18 -0800)]
OSC: only reset cue sends that do not have a new send

6 years agoOSC: /cue/previous_aux should always refresh
Len Ovens [Mon, 13 Nov 2017 17:32:24 +0000 (09:32 -0800)]
OSC: /cue/previous_aux should always refresh

6 years agoOSC: cue buttons can accept float or int
Len Ovens [Sun, 12 Nov 2017 21:52:18 +0000 (13:52 -0800)]
OSC: cue buttons can accept float or int

6 years agoFix typo (missing quote) in patch-change window title
Robin Gareus [Mon, 13 Nov 2017 22:31:39 +0000 (23:31 +0100)]
Fix typo (missing quote) in patch-change window title

6 years agoAdd API to allow buffer offsets when applying gain
Robin Gareus [Fri, 10 Nov 2017 21:52:10 +0000 (22:52 +0100)]
Add API to allow buffer offsets when applying gain

6 years agoAdd a noise generator (Lua DSP)
Robin Gareus [Sat, 11 Nov 2017 21:47:47 +0000 (22:47 +0100)]
Add a noise generator (Lua DSP)

6 years agoa-comp: Fix typo with previous patch
Damien Zammit [Sat, 11 Nov 2017 13:16:44 +0000 (00:16 +1100)]
a-comp: Fix typo with previous patch

6 years agoa-comp: Fix noise floor - asymptotics
Damien Zammit [Sat, 11 Nov 2017 02:59:41 +0000 (13:59 +1100)]
a-comp: Fix noise floor - asymptotics

6 years agoOSC link: make whole link set follow strip_types
Len Ovens [Fri, 10 Nov 2017 16:38:08 +0000 (08:38 -0800)]
OSC link: make whole link set follow strip_types
strip should not run periodic when blank - crash fix

6 years agoOSC: set_surface sets linkset, linkid
Len Ovens [Wed, 8 Nov 2017 17:36:32 +0000 (09:36 -0800)]
OSC: set_surface sets linkset, linkid
/set_surface/* deals with linked surfaces

6 years agoOSC: catch bad commands on /cue/* created crash on exit
Len Ovens [Wed, 8 Nov 2017 04:18:23 +0000 (20:18 -0800)]
OSC: catch bad commands on /cue/* created crash on exit

6 years agoFix a-reverb bypass/enable
Robin Gareus [Wed, 8 Nov 2017 00:37:50 +0000 (01:37 +0100)]
Fix a-reverb bypass/enable

6 years agoOSC link: Clean up link not ready and surface refresh
Len Ovens [Tue, 7 Nov 2017 17:31:14 +0000 (09:31 -0800)]
OSC link: Clean up link not ready and surface refresh

6 years agoOSC link: make selection work correctly
Len Ovens [Mon, 6 Nov 2017 21:37:37 +0000 (13:37 -0800)]
OSC link: make selection work correctly

6 years agoOptimize zresampler for no re-sampling case.
Robin Gareus [Sun, 5 Nov 2017 23:13:14 +0000 (00:13 +0100)]
Optimize zresampler for no re-sampling case.

6 years agoSome further notes (and experiments) on optimizations
Robin Gareus [Sun, 5 Nov 2017 23:12:32 +0000 (00:12 +0100)]
Some further notes (and experiments) on optimizations

6 years agoAdd some notes for future optimizations (and prepare API)
Robin Gareus [Sat, 4 Nov 2017 16:11:10 +0000 (17:11 +0100)]
Add some notes for future optimizations (and prepare API)

6 years agoChange Delayline to use power-of-two size and bitmasking
Robin Gareus [Sat, 4 Nov 2017 15:39:08 +0000 (16:39 +0100)]
Change Delayline to use power-of-two size and bitmasking

6 years ago[Re]-Implement Delayline flush.
Robin Gareus [Sat, 4 Nov 2017 15:24:09 +0000 (16:24 +0100)]
[Re]-Implement Delayline flush.

Also don't automatically flush the delayline at transport or monitor-
changes anymore.

With full-graph latency compensation, delaylines are before the
disk-reader, aligning input (disk uses read-ahead to align).

Flushing the delayline should only happen when input-monitoring
is disengaged. It's best degated to the Route or object using the
Delayline (potentially latency-aligned delayed flush).

6 years agoOptimize Delaylines: block-process (not one sample at a time)
Robin Gareus [Sat, 4 Nov 2017 04:20:14 +0000 (05:20 +0100)]
Optimize Delaylines: block-process (not one sample at a time)

This also tweaks fade behavior when the latency changes to prefer a
x-fade when possible.

This new variant does not support concurrent re-allocation and
execution. Hence the auto-connect thread needs to take a lock before
updating latencies (actually there's no need for an explicit update with
built-in backends, so this case remains to be updated further)

6 years agoClean up delayline API: don't use 'get_' for accessor method-name
Robin Gareus [Fri, 3 Nov 2017 18:26:44 +0000 (19:26 +0100)]
Clean up delayline API: don't use 'get_' for accessor method-name

6 years agoOSC link: first working commit for linking two surfaces as one
Len Ovens [Fri, 3 Nov 2017 19:35:19 +0000 (12:35 -0700)]
OSC link: first working commit for linking two surfaces as one

6 years agoFix scroll-wheel on mixer-sliders
Robin Gareus [Fri, 3 Nov 2017 14:55:33 +0000 (15:55 +0100)]
Fix scroll-wheel on mixer-sliders

74c986534b changes the semantics of fader-flags:
NoVerticalScroll  was "ignore vertical scroll for horizontal faders".
Now the flag ignores all vertical scrolling.

6 years agoAuditioner, silence buffer at end.
Robin Gareus [Fri, 3 Nov 2017 03:26:33 +0000 (04:26 +0100)]
Auditioner, silence buffer at end.

6 years agoDon't crash when auditioning empty .mid files.
Robin Gareus [Fri, 3 Nov 2017 03:14:23 +0000 (04:14 +0100)]
Don't crash when auditioning empty .mid files.

6 years agoFix polarity-control size (and crash during audition)
Robin Gareus [Fri, 3 Nov 2017 02:05:54 +0000 (03:05 +0100)]
Fix polarity-control size (and crash during audition)

Also initialize new polarity-invert with gain 1.0, not inverted.
Don't fade-in.

6 years agoAccommodate newly added/removed source(s) in our MSVC project (libardour)
John Emmas [Thu, 2 Nov 2017 10:16:24 +0000 (10:16 +0000)]
Accommodate newly added/removed source(s) in our MSVC project (libardour)

6 years agoWrap automation on loop-position, split plugin processing
Robin Gareus [Wed, 1 Nov 2017 14:46:23 +0000 (15:46 +0100)]
Wrap automation on loop-position, split plugin processing

6 years agoClick-free polarity inversion, also use accelerated (AVX, SSE) Amp
Robin Gareus [Tue, 31 Oct 2017 21:21:12 +0000 (22:21 +0100)]
Click-free polarity inversion, also use accelerated (AVX, SSE) Amp

6 years agoFix samples-moved (and invalid use of not initialized CubicInterpolation)
Robin Gareus [Tue, 31 Oct 2017 21:01:46 +0000 (22:01 +0100)]
Fix samples-moved (and invalid use of not initialized CubicInterpolation)

6 years agoInterpolation phase[] is initially empty
Robin Gareus [Tue, 31 Oct 2017 21:01:04 +0000 (22:01 +0100)]
Interpolation phase[] is initially empty

6 years agoFix set_loop() return value (amend 00a4ad)
Robin Gareus [Tue, 31 Oct 2017 21:00:22 +0000 (22:00 +0100)]
Fix set_loop() return value (amend 00a4ad)

6 years agoRelax assertion to allow rolling backwards into 0.
Robin Gareus [Tue, 31 Oct 2017 18:54:08 +0000 (19:54 +0100)]
Relax assertion to allow rolling backwards into 0.

6 years agoMove Loop Location to Processors
Robin Gareus [Tue, 31 Oct 2017 17:32:26 +0000 (18:32 +0100)]
Move Loop Location to Processors

The processors will becomes responsible to know about loop-positions
and map latency-compensated start_sample, end_sample into the loop-range
as needed.

6 years agoFix NSM for distro-builds (waf install)
Robin Gareus [Tue, 31 Oct 2017 14:26:29 +0000 (15:26 +0100)]
Fix NSM for distro-builds (waf install)

6 years agoSmall steps towards rolling backwards..
Robin Gareus [Tue, 31 Oct 2017 02:51:08 +0000 (03:51 +0100)]
Small steps towards rolling backwards..

6 years agoMigrate to Polarity-inversion processor & fix proc positions
Robin Gareus [Tue, 31 Oct 2017 02:18:59 +0000 (03:18 +0100)]
Migrate to Polarity-inversion processor & fix proc positions

* invert polarity after disk i/o proc or return
* fix position of export-proc (after polarity)
* fix input-meter (before disk-writer or after return)

6 years agoAdd polarity-invert processor
Robin Gareus [Tue, 31 Oct 2017 02:15:43 +0000 (03:15 +0100)]
Add polarity-invert processor

6 years agoFix importing tempo-maps for non-integer pulsed time-signatures
Robin Gareus [Mon, 30 Oct 2017 21:24:21 +0000 (22:24 +0100)]
Fix importing tempo-maps for non-integer pulsed time-signatures

6 years agoUse new externally_connected API
Robin Gareus [Mon, 30 Oct 2017 18:43:32 +0000 (19:43 +0100)]
Use new externally_connected API

6 years agoNO-OP: whitespace
Robin Gareus [Mon, 30 Oct 2017 18:43:18 +0000 (19:43 +0100)]
NO-OP: whitespace

6 years agoAdd & implement PortEngine::externally_connected() API
Robin Gareus [Mon, 30 Oct 2017 18:41:42 +0000 (19:41 +0100)]
Add & implement PortEngine::externally_connected() API

6 years agoAdd missing header (-Wmissing-prototypes)
Robin Gareus [Mon, 30 Oct 2017 18:39:42 +0000 (19:39 +0100)]
Add missing header (-Wmissing-prototypes)

6 years agoAdd weak linked symbol for "jack_port_is_mine"
Robin Gareus [Mon, 30 Oct 2017 18:39:10 +0000 (19:39 +0100)]
Add weak linked symbol for "jack_port_is_mine"

6 years agoFix fade-out at quit.
Robin Gareus [Mon, 30 Oct 2017 16:27:13 +0000 (17:27 +0100)]
Fix fade-out at quit.

6 years agoAlways optimize zita-resampler, nothing to debug here
Robin Gareus [Mon, 30 Oct 2017 15:28:24 +0000 (16:28 +0100)]
Always optimize zita-resampler, nothing to debug here

6 years agoremove non rt-safe debug messages
Robin Gareus [Mon, 30 Oct 2017 15:23:21 +0000 (16:23 +0100)]
remove non rt-safe debug messages

6 years agoParallel execution of cycle-start/end
Robin Gareus [Mon, 30 Oct 2017 14:58:36 +0000 (15:58 +0100)]
Parallel execution of cycle-start/end

6 years agoAdd a RT-Tasklist
Robin Gareus [Mon, 30 Oct 2017 04:52:18 +0000 (05:52 +0100)]
Add a RT-Tasklist

6 years agoMove coreaudio_set_realtime_policy into libpbd
Robin Gareus [Mon, 30 Oct 2017 14:57:39 +0000 (15:57 +0100)]
Move coreaudio_set_realtime_policy into libpbd

6 years agoAdd MSVC support for building the 'zita-resampler' library (which is now needed by...
John Emmas [Mon, 30 Oct 2017 13:55:51 +0000 (13:55 +0000)]
Add MSVC support for building the 'zita-resampler' library (which is now needed by libardour)

6 years agoAccommodate the change from libtimecode to libtemporal (gtk2_ardour)
John Emmas [Mon, 30 Oct 2017 12:44:44 +0000 (12:44 +0000)]
Accommodate the change from libtimecode to libtemporal (gtk2_ardour)

6 years agoAccommodate the change from libtimecode to libtemporal
John Emmas [Mon, 30 Oct 2017 11:01:19 +0000 (11:01 +0000)]
Accommodate the change from libtimecode to libtemporal

6 years agoRemove unused per-port buffer offset
Robin Gareus [Sun, 29 Oct 2017 17:44:06 +0000 (18:44 +0100)]
Remove unused per-port buffer offset

6 years agoNO-OP: whitespace
Robin Gareus [Sun, 29 Oct 2017 17:36:32 +0000 (18:36 +0100)]
NO-OP: whitespace

6 years agoQuick hack to test engine vari-speed (2/2)
Robin Gareus [Sun, 29 Oct 2017 17:32:27 +0000 (18:32 +0100)]
Quick hack to test engine vari-speed (2/2)

6 years agoQuick hack to test engine vari-speed (1/2)
Robin Gareus [Sun, 29 Oct 2017 17:32:17 +0000 (18:32 +0100)]
Quick hack to test engine vari-speed (1/2)

6 years agoMove vari-speed into backend (resample ports)
Robin Gareus [Sun, 29 Oct 2017 17:30:18 +0000 (18:30 +0100)]
Move vari-speed into backend (resample ports)

Previously Ardour used a /local/ per track vari-speed mechanism.
Now that the disk-reader is a latency-compensated processor, the speed
of each disk-reader would need to be maintained locally, offset by each
disk-reader's output latency. Furthermore each disk-reader may
produce a different number of samples, depending on its global alignment.

This commit introduces port-data resampling directly at the engine-level:
Up/down-sample all input ports at the beginning, and down/up-sample output
port-data using the inverse ratio at the end of the session's process
cycle.
The session itself is unaware of the speed-change, and only needs to
handle transport speeds {-1, 0, +1}.

This also allows for aligned cue-monitoring and vari-speed recording,
and also pitch-shifts synthesized MIDI along.

6 years agoAdd a dedicated mono variable resampler version
Robin Gareus [Sun, 29 Oct 2017 14:06:40 +0000 (15:06 +0100)]
Add a dedicated mono variable resampler version

6 years agoFix/update alsa backend build recipe (statically link zresampler)
Robin Gareus [Sun, 29 Oct 2017 19:03:24 +0000 (20:03 +0100)]
Fix/update alsa backend build recipe (statically link zresampler)

6 years agoUpdate Lua Bindings, fix inconsistencies.
Robin Gareus [Sun, 29 Oct 2017 17:32:49 +0000 (18:32 +0100)]
Update Lua Bindings, fix inconsistencies.

6 years agoRevert "relax zita-resampler's relative ratio"
Robin Gareus [Sun, 29 Oct 2017 16:55:57 +0000 (17:55 +0100)]
Revert "relax zita-resampler's relative ratio"

This reverts commit d1b5a9ed3deb3045971bd16f6613ef328e49b7e8.

6 years agoFix loading sessions w/new tempo-map.
Robin Gareus [Sat, 28 Oct 2017 13:44:39 +0000 (15:44 +0200)]
Fix loading sessions w/new tempo-map.

Newly constructed sessions don't save "Tempo-start" property.
If there's no "start" node, _legacy_bbt is never explicitly set and
the default c'tor is used, which sets bar = 1.
The test for legacy session checks bar != 0.

All new sessions were processed with fix_legacy_session(), which breaks
the tempo-map and makes the session not loadable (duplicate Tempo).

6 years agoFix initial cycle noise with dummy-loopback
Robin Gareus [Sat, 28 Oct 2017 13:35:58 +0000 (15:35 +0200)]
Fix initial cycle noise with dummy-loopback

6 years agorelax zita-resampler's relative ratio
Robin Gareus [Tue, 3 Oct 2017 16:02:35 +0000 (18:02 +0200)]
relax zita-resampler's relative ratio

6 years agoAccommodate newly added/removed source(s) in our MSVC project (libpbd)
John Emmas [Fri, 27 Oct 2017 12:08:32 +0000 (13:08 +0100)]
Accommodate newly added/removed source(s) in our MSVC project (libpbd)

6 years agoAdd a RAII SpinLock (using boost's spinlock)
Robin Gareus [Thu, 26 Oct 2017 20:33:11 +0000 (22:33 +0200)]
Add a RAII SpinLock (using boost's spinlock)