Hi @KAtA,
If you take a look at the docstring of :sound_out
you can see:
"Outputs a mono signal to a soundcard output of your choice. By default will mix the incoming stereo signal (generated within the FX block) into a single mono channel. However, with the mode:
opt, it is possible to alternatively send either the incoming left or right channel out directly. "
In other words, what’s happening is:
---- left channel ---\ ---------------------------------------- left chan out
+---- mixed mono channel to output n
---- right channel ---/ ---------------------------------------- right chan out
We’re therefore effectively doing nothing to the input and output channels and are creating an additional channel which is piped to a specific sound card output.
So let’s take a look at this in code:
with_fx :sound_out, output: 4 do
# stereo sound source
end
This will take #stereo sound source
and output it to its external context and mix the source to mono and output to sound card output 4. If we only want to output to the sound card and not to the external context, we can supply an amp: 0
:
with_fx :sound_out, output: 4, amp: 0 do
# stereo sound source
end
This will only output the mixed mono signal to the sound card output 0 and not to the outer context, which means it won’t get automatically sent to channels 1 and 2 (which are the default channels of the outer context).
Now, this means that in your original code, when you nest two sets of with_fx
in this manner you’re effectively not passing any audio from the inner fx to the outer as you’re “muting” it with amp: 0
with_fx :sound_out, output: 3, amp: 0 do
# no sound here now as it has been muted
with_fx :sound_out, output: 4, amp: 0 do
# stereo sound source
end
end
This is probably a large part of the issue that you’re having.
Out of interest, what are you actually attempting to achieve? For example:
- Are you wanting to send the same mono-mixed stream to your sound card outputs 3 and 4?
- Were you trying to map channel 1 to 3 and 2 to 4 unchanged?
- Did you still want the signal to come out of outputs 1 and 2 or want that muted?
Hopefully we can get you sorted soon