sonic-pi
sonic-pi copied to clipboard
sound_out(_stereo) distorts on channels 3-16 when using control note/slide
Observed in Windows/Linux, Sonic Pi 3.1. I use the ESI Gigaport HD+ 8 channel interface. Default settings, routing from the Sonic Pi outputs to the interfaces playback ports configured via jack (Linux), ASIO driver (Windows)
Running the following code works perfectly fine with output: 1, 2, as well as without the sound_out fx.
with_fx :sound_out, amp: 0, output: 1 do live_loop :kick do use_synth :sine play :c2, slide: 0.3, release: 1, amp: 1 control note: :c0 sleep 0.25 end end
Whenever I switch to any other output (3-16) the output gets distorted comparable to adding the distortion fx, but when I remove the control note: :c0 command I cannot observe this issue. Removing the slide: 0.3 option also removes the issue. Just to be on the safe side, I tested rerouting every Sonic Pi output to every single interface output resulting in the described issue only with outputs 3 to 16. If there's more data I can provide, please let me know.
Hi there,
this issue is because Sonic Pi doesn't have an FX chain running for any outputs other than 1 and 2.
By default, audio through outputs 1 and 2 passes through an FX chain which includes a compressor, limiter, low and high pass filters etc. This is part of the safety system.
Currently this can't be enabled on other channels - although it really should (this is clearly a feature for the future). For now, you can get something similar by adding your own compressor, limiter etc by nesting FX blocks:
with_fx :sound_out, amp: 0, output: 1 do
with_fx :compressor do
live_loop :kick do
use_synth :sine
play :c2, slide: 0.3, release: 1, amp: 1
control note: :c0
sleep 0.25
end
end
end