fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] synth.audio-groups and LADSPA effects


From: Marcus Weseloh
Subject: Re: [fluid-dev] synth.audio-groups and LADSPA effects
Date: Mon, 3 Aug 2020 13:17:59 +0200

Hi Bill,

FluidSynth does not seem to mix the internal group channels back into
the main output if you are using audio-groups=2 and audio-channels=1.
That means that only the audio that gets written to Main:L1/Main:R1
can actually be heard via your soundcard.
Not sure if this is a feature or a bug... Tom, do you know anything
about the design decisions here?

Please also bear in mind that when you are using the internal reverb
and chorus effects, they get rendered to the first output channel
(L1/R1 in your setup). So even if the rhodes gets rendered to L2/R2
due to --audio-groups=2, it's reverb is rendered to L1/R1. That is why
you hear rhodes and harpsichord so quiet (it's only the wet reverb
sound) and also with the delay effect (The internal reverb and chorus
run *before* any LADSPA effects).

To achieve your goal of having the delay only on piano and
harpsichord, you could use a zero-gain amp effect to mix the audio
from rhodes and vibes (both on L2/R2) into L1/R2. Sadly you can't use
the default LADSPA "amp.so" for this, as it doesn't support --mix (the
run_adding interface). But amp_1181.so works quite well and has a
default zero-gain. So your effects.txt could look like this:

ladspa_effect dL /usr/lib/ladspa/delay.so
ladspa_effect dR /usr/lib/ladspa/delay.so
ladspa_link dL Inp Main:L1
ladspa_link dR Inp Main:R1
ladspa_link dL Out Main:L1
ladspa_link dR Out Main:R1

# Route L2 -> L1 with zero gain
ladspa_effect AmpL /usr/lib/ladspa/amp_1181.so --mix
ladspa_link AmpL Inp Main:L2
ladspa_link AmpL Out Main:L1

# Route R2 -> R1 with zero gain
ladspa_effect AmpR /usr/lib/ladspa/amp_1181.so --mix
ladspa_link AmpR Inp Main:R2
ladspa_link AmpR Out Main:R1

ladspa_start

And to get around the problem with the internal effects always being
rendered on L1/R1, you could simply disable them (-R0 -C0) and add
your own LADPSA effects. For example a tap_reverb:

# Use SoundFont reverb:send to add reverb to main output
ladspa_effect Rev /usr/lib/ladspa/tap_reverb.so --mix
ladspa_link Rev "Input Left" Reverb:Send
ladspa_link Rev "Input Right" Reverb:Send
ladspa_link Rev "Output Left" Main:L1
ladspa_link Rev "Output Right" Main:R1

Or ignore the SoundFont Reverb:Send channel and simply add a global
reverb to main out:

# Add reverb to main output
ladspa_effect Rev /usr/lib/ladspa/tap_reverb.so
ladspa_link Rev "Input Left" Main:L1
ladspa_link Rev "Input Right" Main:R1
ladspa_link Rev "Output Left" Main:L1
ladspa_link Rev "Output Right" Main:R1

Cheers
Marcus


Am Mo., 3. Aug. 2020 um 06:40 Uhr schrieb Bill Peterson <albedozero@gmail.com>:
>
> Hi Tom - thanks for the reply. I tried to follow the LADSPA documentation's 
> advice, but maybe I'm not understanding how synth.audio-channels and 
> synth.audio-groups interact. Here's the command line I'm using:
>
> sudo fluidsynth -a alsa -o midi.autoconnect=1 -o synth.ladspa.active=1 -o 
> synth.audio-channels=1 -o synth.audio-groups=2 -f effects.txt
>
> and effects.txt:
> load /usr/share/sounds/sf2/FluidR3_GM.sf2
> select 0 1 0 0 # piano
> select 1 1 0 4 # rhodes
> select 2 1 0 6 # harpsichord
> select 3 1 0 11 # vibes
> ladspa_effect dL /usr/lib/ladspa/delay.so
> ladspa_effect dR /usr/lib/ladspa/delay.so
> ladspa_link dL Inp Main:L1
> ladspa_link dR Inp Main:R1
> ladspa_link dL Out Main:L1
> ladspa_link dR Out Main:R1
> ladspa_start
>
> My intent is for the delay effect to only apply to some channels (e.g. piano 
> and harpsichord), but I hear the delay effect on all channels. Oddly, 
> channels 1 and 3 (rhodes and harpsichord), also sound quiet, as if they're 
> coming through the Reverb/Chorus channels only. I get the same result with 
> synth.audio-channels=2. What am I doing wrong?
>
> Thanks!
> Bill
>
> On Sat, Jul 25, 2020 at 8:03 AM Tom M. <tom.mbrt@googlemail.com> wrote:
>>
>> > experimenting with various combinations of values synth.audio-channels and 
>> > synth.audio-groups either gets me effects on all channels or none
>>
>> Seems like you created the Ladspa effects on the Main:L and Main:R
>> ports. Have you tried explicitly specifying the subgroups as described
>> here?
>>
>> https://github.com/FluidSynth/fluidsynth/blob/master/doc/ladspa.md#multi-channel-output
>>
>>
>> Tom
>
> _______________________________________________
> fluid-dev mailing list
> fluid-dev@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/fluid-dev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]