Bug 169 - EFFECT_INSTANCE: FX_SEND Outputs errors
Summary: EFFECT_INSTANCE: FX_SEND Outputs errors
Status: RESOLVED FIXED
Alias: None
Product: LinuxSampler
Classification: Unclassified
Component: other (show other bugs)
Version: SVN Trunk
Hardware: PC Linux
: P5 normal
Assignee: Christian Schoenebeck
URL:
Depends on:
Blocks:
 
Reported: 2012-01-11 14:23 CET by Nicola Pandini
Modified: 2019-03-11 16:16 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicola Pandini 2012-01-11 14:23:21 CET
Hi,
If I set the outputs of an FX SEND (assigned to an EFFECT CHAIN) to outputs 2 and 3, I've got the following error:

Engine::RouteAudio() Error: invalid FX send (L) destination channel (0->2)



I'm using the following lscp script:

CREATE AUDIO_OUTPUT_DEVICE JACK ACTIVE=true CHANNELS=4 SAMPLERATE=44100 NAME='LinuxSampler'

SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 NAME='0'

SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS=NONE

SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 NAME='1'

SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS=NONE

SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 2 NAME='2'

SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 2 JACK_BINDINGS=NONE

SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 3 NAME='3'

SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 3 JACK_BINDINGS=NONE

ADD SEND_EFFECT_CHAIN 0

CREATE EFFECT_INSTANCE LADSPA '/usr/lib/ladspa/calf.so' 'Reverb'

APPEND SEND_EFFECT_CHAIN EFFECT 0 0 0



REMOVE MIDI_INSTRUMENT_MAP ALL



ADD CHANNEL

LOAD ENGINE SFZ 0

SET CHANNEL VOLUME 0 1.0

SET CHANNEL MIDI_INSTRUMENT_MAP 0 NONE

SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0

SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 0 0

SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 1 1

LOAD INSTRUMENT NON_MODAL '/home/sfz_library/example.sfz' 0 0



CREATE FX_SEND 0 3 'New effect send'

SET FX_SEND LEVEL 0 0 1.0

SET FX_SEND AUDIO_OUTPUT_CHANNEL 0 0 0 2

SET FX_SEND AUDIO_OUTPUT_CHANNEL 0 0 1 3

SET FX_SEND EFFECT 0 0 0 0
Comment 1 Christian Schoenebeck 2019-03-10 16:35:42 CET
Does this problem still persist or can this report be closed?
Comment 2 Nicola Pandini 2019-03-11 11:57:24 CET
Hi, the problem is still there(2.0.0.svn76), but I don't use the effect chain feature anymore.
Should new versions solve the problem?
Comment 3 Christian Schoenebeck 2019-03-11 12:34:56 CET
Ok, I haven't tried your example yet, but looking at your LSCP commands, if I understand you correctly then the following two commands:

SET FX_SEND AUDIO_OUTPUT_CHANNEL 0 0 0 2
SET FX_SEND AUDIO_OUTPUT_CHANNEL 0 0 1 3

were actually intended by you to send those FX sends directly to the audio output device's audio channels 3 and 4. That's fine, but then you also do this at the end:

SET FX_SEND EFFECT 0 0 0 0

which causes your FX send not to be sent directly to the audio output device channels, but rather to the reverb effect that you loaded before. And that reverb effect I guess is stereo (that is 2 channels, not 4 channels).

So if you omit the last LSCP command then it should actually work as expected by you.
Comment 4 Nicola Pandini 2019-03-11 15:04:11 CET
Yes, I can confirm that removing "SET FX_SEND EFFECT 0 0 0 0" solve the problem.
Thanks!
Comment 5 Christian Schoenebeck 2019-03-11 16:16:41 CET
So this issue was simply due to confusion of how to use the LSCP commands for the purpose of using external effects.

To avoid that in future I just committed some changes, providing more useful error messages for FX send routing problems and making the LSCP reference documentation more clear about external vs. internal effects:

http://svn.linuxsampler.org/cgi-bin/viewvc.cgi?view=revision&revision=3501

I'm going to close this report. Thanks!