Hi all,

Sorry if this has been asked before. I'm about to buy a bela but I just want to get some input before make the purchase.

I've been using a hexaphonic pickup on my guitar to use .ar-to-.kr data for synths built in Supercollider on my laptop. I'd really like to break out of the box and make a standalone guitar synth device. I'm wondering if the bela would be able to keep up with processing six audio channels controlling n * 6 nodes (Frequency data * 6, Amplitude data * 6, Synth nodes * n * 6 ) in SCsynth and still keep a reasonably low (performable) latency.

Thanks!
Andrew

send some code and I can run it and see the CPU usage. "Synth nodes" is very generic...

As for latency, the latency is guaranteed and it will not increase with CPU processing. If you exceed the available CPU processing, it will just start dropping out. You can get a bit more performance increasing the blocksize from the default 16 to 64 or 128 samples, though.

Hey, thanks for responding. After the code to get my server settings going I usually have something along the lines of this:

//get frequency and amplitude from each string in a hexaphonic guitar pickup
Ndef(\g, {SoundIn.ar((2..7))}); //raw audio from inputs 3-8 on hardware interface

//clean up a bit for amplitude data
Ndef(\gt, {Compander.ar(SoundIn.ar((2..7)), SoundIn.ar((2..7)), thresh:1.2, slopeBelow: 1.25, slopeAbove:1, clampTime:0.002, relaxTime:0.1, mul:5)}); //gate
Ndef(\c, {Compander.ar(Ndef(\gt).ar(6), Ndef(\gt).ar(6), thresh:1, slopeBelow: 1, slopeAbove:0.1, clampTime:0.001, relaxTime:0.01, mul:1)}); //compression

Ndef(\g).clear;

//set up array of Tartinis using Ndef(\g) audio and collect only the freqs
Ndef(\gfreq, {Tartini.kr(Ndef(\c).ar(6)).collect{|x| x[0]}});
NDef(\gfreq).stop;
//set up array of Amplitudes using the gated and compressed \c audio
Ndef(\gamp, {Amplitude.kr(Ndef(\c).ar(6))});
NDef(\gamp).stop;

And use the above to control synths. I like using Gendy3

//GENDY
(
Ndef(\gendy, {
	|adist= 4, ddist= 1, apar=0.1, dpar=0.95, ascale=0.05, dscale=0.1, iCPs=21, gendamp=0.1, amp=0.1, mix=0.5, room=0.95,damp=0.85, mff=5, mfp=0, mfa=2|

	Out.ar(2,[Gendy3.ar(adist,ddist,apar,dpar,Ndef(\gfreq).kr(6)/*+SinOsc.kr([mff,mff,mff,mff,mff,mff],mfp,mfa) * [1,2]*/,ascale,dscale,iCPs,mul: Ndef(\gamp)+0.01)]);
})
)

Ndef(\gendy).play();
Ndef(\gendy).free;

Things have been mostly straightforward and simple but I'd like to build out a piece of hardware specifically dedicated to switching between Supercollider patches and modifying parameters.

11 days later

Sorry I am getting to this only now. So I managed to run this:

s = Server.default;

// Set up options for the Bela
s.options.numAnalogInChannels = 2;
s.options.numAnalogOutChannels = 2;
s.options.numDigitalChannels = 0;
s.options.maxLogins = 4;

s.options.blockSize = 512;
s.options.numInputBusChannels = 8;
s.options.numOutputBusChannels = 8;

s.waitForBoot {
//get frequency and amplitude from each string in a hexaphonic guitar pickup
Ndef(\g, {SoundIn.ar((0..5))}); //raw audio from inputs 1-6 on hardware interface
s.sync();

//clean up a bit for amplitude data
Ndef(\gt, {Compander.ar(SoundIn.ar((0..5)), SoundIn.ar((0..5), thresh:1.2, slopeBelow: 1.25, slopeAbove:1, clampTime:0.002, relaxTime:0.1, mul:5)}); //gate
s.sync();

Ndef(\c, {Compander.ar(Ndef(\gt).ar(6), Ndef(\gt).ar(6), thresh:1, slopeBelow: 1, slopeAbove:0.1, clampTime:0.001, relaxTime:0.01, mul:1)}); //compression
s.sync();

// ERROR: The line below would fail with `*** ERROR: SynthDef temp__0g1463690920_0 not found`, so I commented it out
//Ndef(\g).clear;
//s.sync();

//set up array of Tartinis using Ndef(\g) audio and collect only the freqs
Ndef(\gfreq, {Tartini.kr(Ndef(\c).ar(6)).collect{|x| x[0]}});
s.sync();

Ndef(\gfreq).stop;
s.sync();

//set up array of Amplitudes using the gated and compressed \c audio
Ndef(\gamp, {Amplitude.kr(Ndef(\c).ar(6))});
s.sync();
Ndef(\gamp).stop;
s.sync();

(
Ndef(\gendy, {
	|adist= 4, ddist= 1, apar=0.1, dpar=0.95, ascale=0.05, dscale=0.1, iCPs=21, gendamp=0.1, amp=0.1, mix=0.5, room=0.95,damp=0.85, mff=5, mfp=0, mfa=2|

	Out.ar(2,[Gendy3.ar(adist,ddist,apar,dpar,Ndef(\gfreq).kr(6)/*+SinOsc.kr([mff,mff,mff,mff,mff,mff],mfp,mfa) * [1,2]*/,ascale,dscale,iCPs,mul: Ndef(\gamp)+0.01)]);
})
);
s.sync();

Ndef(\gendy).play();

};

When running, this takes about 50% of the CPU (42% for actual audio processing, the remaining 8% for processing I/Os and passing them to the audio thread), however I cannot hear any sound at the output, not even when playing some audio through the inputs.

Keep in mind I have no idea what your code does and I got where I got by trial and errors. Note I had to remove one line as it was giving an error (marked in the code above).