Thanks for the quick reply giuliomoro!
I updated bela and am still having no luck, although now s.options.adcLevel = 1;
is now necessary to get channels [0,1] to respond to changes in s.options.pgaGainLeft/Right
.
I added the config file like this:
root@bela:~# echo "CL=2,30,3,0,4,30,5,0,6,30,7,0" > /root/.bela/belaconfig
root@bela:~# cat /root/.bela/belaconfig
CL=2,30,3,0,4,30,5,0,6,30,7,0
and here's the code i'm running:
s = Server.default;
s.options.numAnalogInChannels = 8;
s.options.numAnalogOutChannels = 8;
s.options.numDigitalChannels = 16;
s.options.numInputBusChannels = 8;
s.options.numOutputBusChannels = 8;
s.options.maxLogins = 4;
s.options.bindAddress = "0.0.0.0"; // allow anyone on the network connect to this server
s.options.adcLevel = 1; // workaround so .pgaGainLeft/Right works (must be out of range > 0) --> (https://forum.bela.io/d/2810-pga-gain-in-supercollider/3)
s.options.pgaGainLeft = 30.0; // THIS WORKS! (default is 10 dB)
s.options.pgaGainRight = 0.0; // (but only for positive numbers...!)
s.options.belaMaxScopeChannels = 8;
s.waitForBoot({
SynthDef("help-scope",{ arg out=0;
// var in = SoundIn.ar([0,1,2,3,4,5,6,7]).belaScope(0); // input from channels [0,1,2,3,4,5,6,7]
var in = SoundIn.ar((0..7)).belaScope(0); // a bit of shorthand...
Out.ar(out, in); // output starting at ch 0
}).play;
});
ServerQuit.add({ 0.exit }); // quit if the button is pressed
and the console output
Building project ...
Build finished
Running project ...
Warning: bela_startup.service changed on disk. Run 'systemctl daemon-reload' to reload units.
compiling class library...
Found 726 primitives.
Compiling directory '/usr/share/SuperCollider/SCClassLibrary'
Compiling directory '/usr/share/SuperCollider/Extensions'
Compiling directory '/root/.local/share/SuperCollider/Extensions'
numentries = 1111862 / 12516972 = 0.089
4223 method selectors, 2964 classes
method table size 8244668 bytes, big table size 50067888
Number of Symbols 11767
Byte Code Size 331042
compiled 455 files in 3.07 seconds
Info: 4 methods are currently overwritten by extensions. To see which, execute:
MethodOverride.printAll
compile done
localhost : setting clientID to 0.
internal : setting clientID to 0.
Class tree inited in 0.3 seconds
*** Welcome to SuperCollider 3.12.1. *** For help type ctrl-c ctrl-h (Emacs) or :SChelp (vim) or ctrl-U (sced/gedit).
Booting server 'localhost' on address 127.0.0.1:57110.
Found 0 LADSPA plugins
Warning in SC_BelaDriver::DriverSetup(): hardware buffer size (16) different from SC audio buffer size (64). Changed the hardware buffer size to be equal to the SC audio buffer size .
SC_BelaDriver: >>DriverSetup - Running on PRU (1)
Configured with
(8) analog input and (8) analog output channels, (16) digital channels, and (0) multiplexer channels.
HeadphoneLevel (-6.000000 dB), pga_gain_left (30.000000 dB) and pga_gain_right (0.000000 dB)
DAC Level (0.000000 dB), ADC Level (999999.000000 dB) oscilloscope channels (8)
Speakers are not muted.
SC_AudioDriver: sample rate = 44100.000000, driver's block size = 64
SuperCollider 3 server ready.
Requested notification messages from server 'localhost'
localhost: server process's maxLogins (4) matches with my options.
localhost: keeping clientID (0) as confirmed by server process.
Shared memory server interface initialized
Bela stopped
I get the volume boost on i/o [0,1], but not on any of the [2,3] or any of the other high pairs. Do you have any idea what could be going wrong? Perhaps I need to manually tell it to read the new settings file or something?
thanks!