• CTAG-ALSA
  • mode switches detected on the audio thread!

sps should i say yes to it to continue?

Yes. That just means that it's the first time you connect to the board.

alt text
This is what happened after "yes". But the problem (mode switch detected on the audio thread) still shows up after i get back to my code:

s = Server.default;

s.options.numAnalogInChannels = 8;
s.options.numAnalogOutChannels = 8;
s.options.numDigitalChannels = 16;

s.options.blockSize = 16;
s.options.numInputBusChannels = 2;
s.options.numOutputBusChannels = 2;

s.options.postln;

s.waitForBoot({
"Server Booted".postln;


SynthDef(\pressSensorL, {arg inbus = 0, outbus = 0;
var toe, heel, signal;
toe = AnalogIn.ar(0);
heel = AnalogIn.ar(1);
signal = toe * heel;
Out.kr(outbus, signal);
}).add;

SynthDef(\pressSensorR, {arg inbus = 0, outbus = 0;
var toe, heel, signal;
toe = AnalogIn.ar(0);
heel = AnalogIn.ar(1);
signal = toe * heel;
Out.kr(outbus, signal);
}).add;

//System Specifications
~variableMappingRate = 0.01;

// create Buses
~leftBus = Bus.control(s, 1);
~rightBus = Bus.control(s, 1);

// create Variable
~leftVar = 0;
~rightVar = 0;

// Which Bus should be
l = Synth(\pressSensorL, [\outbus, ~leftBus] );
r = Synth(\pressSensorR, [\outbus, ~rightBus]);

Tdef(\VariableSwitch, {
loop{
~leftBus.get({arg value; ~leftVar = value;});
~rightBus.get({arg value; ~rightVar = value;});
~variableMappingRate.wait;
}
}).play;

SynthDef('pm', {arg freq=200, amp=0.5, pan=0, dur=1, modfreq=200, idx=0.1, modphase=0, trig=1;
var sig, env;
sig = PMOsc.ar(freq, modfreq, idx, SinOsc.ar(modfreq 3));
env = EnvGen.ar(Env.perc(0.01, 1), trig, timeScale: dur, doneAction: 2);
Out.ar(0, Pan2.ar(sig
env * amp, pan));
}).add;

Tdef(\Test_The_VariableSwitch, {
~synthPm = Synth(\pm, [\out, 1]);
loop {
~synthPm.set(\freq, ~leftVar);
~synthPm.set(\dur, ~leftVar);
~synthPm.set(\amp, ~rightVar);
}});

Tdef(\Test_The_VariableSwitch).play;
})

Do you have any ideas what the problem could be?
Best,

    sps This is what happened after "yes"

    Right you have some errors in the code you ran so far ( the trailing d).

    Do the following:
    - download this file on your Desktop https://github.com/BelaPlatform/supercollider/releases/download/v3.11.2-bela-fix-digitalIn/Supercollider-v3.11.2-bela-c91c4980a1.deb
    - run the following:

    scp ~/Desktop/Supercollider-v3.11.2-bela-c91c4980a1.deb root@bela.local:

    verify that no error message is printed, then run:

    ssh root@bela.local dpkg -i Supercollider-v3.11.2-bela-c91c4980a1.deb

    verify that no error message is printed.

    • sps replied to this.
    • sps likes this.

      alt text
      An Error shows up:
      error: cannot access archive 'Supercollider-v3.11.2-bela.debssh': No such file or directory

      could you run the commands exactly as I wrote them in the previous post?

      • sps replied to this.

        giuliomoro Right you have some errors in the code you ran so far ( the trailing d).

        Could you point out what you mean by the trailing d?

        sps it shows no such file or directory

        did you download the file I linked to to your desktop? If you download it to some other location you will need to adjust the path in the command accordingly, which is why I recommend you download it to the Desktop.

        • sps likes this.

        yes, I am sorry for misunderstood. And no error message has printed on terminal.
        Back to Bela IDE, and got a new error:

        Building project ...
        Build finished
        Running project ...
        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 = 676873 / 7312006 = 0.093
        3961 method selectors, 1846 classes
        method table size 4921220 bytes, big table size 29248024
        Number of Symbols 9224
        Byte Code Size 264630
        compiled 227 files in 2.17 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.1 seconds
        Welcome to SuperCollider 3.11.2. For help type ctrl-c ctrl-h (Emacs) or :SChelp (vim) or ctrl-U (sced/gedit).
        a BelaServerOptions
        Booting server 'localhost' on address 127.0.0.1:57110.
        Server 'localhost' exited with exit code 127.
        scsynth: symbol lookup error: scsynth: undefined symbol: Bela_HwConfig_new

        alt text
        although it does not shows any error. But i couldn't even run the SuperCollider Example Code on Bela IDE after it...
        Any ideas how could i fix it?
        Thanks

        right, it looks like you have an incompatible version of the Bela core code installed. The safest thing to do would be to update your whole Bela core code as that will also update Supercollider.

        Here are the instructions:
        - download this zip archive to your desktop https://github.com/BelaPlatform/Bela/archive/refs/heads/master.zip
        - run the following in the terminal:

        cd ~/Desktop
        unzip -q Bela-master.zip
        cd ~/Desktop/Bela-master
        ./scripts/update_board -y

        again, for each command verify that no error is printed before executing the next one.

        • sps replied to this.
        • sps likes this.