#92 ladspa: support multi-channel plugins and chains

closed-accepted
nobody
None
5
2014-10-17
2012-06-10
eric_wong
No

This patch depends on two other ones in the tracker.

https://sourceforge.net/tracker/?func=detail&aid=3534107&group_id=10706&atid=310706
https://sourceforge.net/tracker/?func=detail&aid=3534107&group_id=10706&atid=310707

Alternatively, you can pull all of them with:

git pull git://bogomips.org/sox ladspa-multiport
(commit ac6b0b18e7e0f51c6f77ad48e6f9555fc9b8d045)

Stereo (and multi-channel) LADSPA plugins are now supported
out-of-the box as long as the SoX effects chain surrounding them
matches the number of input/output ports of the LADSPA plugin.

Mono LADSPA plugins continue to be supported, and may be cloned
with the "-r" switch to match the number of input/output
channels in the effects chain.

LADSPA plugins which modify the number of channels remain
unsupported. SoX already has native support for remapping
channels.

Plugins with a single input and output port and mono input
should continue to work as-is and there should be no
regressions.

unless there exists a LADSPA plugin which takes interleaved
data. I've yet to find a LADSPA plugin which expects
interleaved data, so one can only assume nobody else uses/or
supports interleaved data in LADSPA.

Plugins tested with this patch:

various TAP plugins (http://tap-plugins.sf.net/)
* echo (stereo)
* pinknoise (mono)
* limiter (mono)

bs2b-ladspa (stereo) (http://bs2b.sf.net/)

Discussion

  • eric_wong
    eric_wong
    2012-10-06

    My "ladspa-multiport" branch on git://bogomips.org/sox.git is now on
    commit fb24fe13cddf4cd40dcfa404614e8ccace38efba

    To get all my LADSPA-related patches:

    git pull git://bogomips.org/sox.git ladspa-multiport

    I've made the lastest two commits to support the vocoder plugin:

    commit fb24fe13cddf4cd40dcfa404614e8ccace38efba
    Author: Eric Wong <normalperson@yhbt.net>
    Date: Fri Oct 5 17:07:11 2012 -0700

    ladspa: support M:N channel mapping in plugins

    This allows plugins such as the LADSPA vocoder to work.

    Using the formant.wav and carrier.wav samples from
    http://www.sirlab.de/linux/descr_vocoder.html the following
    command-line is successful:

    sox -M formant.wav carrier.wav \ -b 16 result.wav rate 44100 \ ladspa vocoder 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

    Using 16-bit (or higher) output reduces the noise-floor hiss
    greatly since LADSPA processing is done as 32-bit float.

    commit e19ca32db1f6b92df2b551d05df180693abae531
    Author: Eric Wong <normalperson@yhbt.net>
    Date: Sat Jul 28 00:22:57 2012 -0700

    ladspa: set all necessary SOX_EFF_* flags

    There are many LADSPA plugins in the wild, they may change
    the number of channels, sample rate, length of audio
    as well as handle multiple channels internally. So set all
    flags which may need to be set.

     
  • Ulrich Klauer
    Ulrich Klauer
    2013-01-08

    • status: open --> closed-accepted