Coming back to sc, my old code doesn't work!

Hello everyone,

I’m coming back to supercollider after some time away. I had this really cool project I was working on, and I’m quite sure it used to work! I was really proud that I’d finally managed to set up an organized structure of nodes and configure the server to build it when booting up. But I can’t seem to get it to work now!

Full code is here: https://github.com/mciul/sc/blob/master/matrix_scale.scd

When I run this code, it appears to make all the nodes I need, but when I trigger notes via MIDI, I get errors saying the nodes don’t exist. When I look at the node tree, it’s empty. Where did everything go?

'/quit' message sent to server 'localhost'.
-> localhost
Server 'localhost' exited with exit code 0.
-> localhost
Booting server 'localhost' on address 127.0.0.1:57110.
Number of Devices: 4
   0 : "Built-in Microph"
   1 : "Built-in Output"
   2 : "UMC404HD 192k"
   3 : "ZoomAudioD"

"UMC404HD 192k" Input Device
   Streams: 1
      0  channels 4

"Built-in Output" Output Device
   Streams: 1
      0  channels 2

SC_AudioDriver: sample rate = 44100.000000, driver's block size = 512
SuperCollider 3 server ready.
Requested notification messages from server 'localhost'
localhost: server process's maxLogins (1) matches with my options.
localhost: keeping clientID (0) as confirmed by server process.
Shared memory server interface initialized
waitForBoot
done
makeNodes pizzicatoFeedback
delaySynth[eighth] reading from 10 writing to 4
delaySynth[sixth] reading from 11 writing to 5
delaySynth[fifth] reading from 12 writing to 6
delaySynth[quarter] reading from 13 writing to 7
delaySynth[third] reading from 14 writing to 8
delaySynth[half] reading from 15 writing to 9
note 52, velocity 28 - [  ]
note 52, velocity 0 - [  ]
note 52, velocity 31 - [  ]
note 50, velocity 31 - [ quarter, fifth ]
FAILURE IN SERVER /n_set Node 1041 not found
FAILURE IN SERVER /n_set Node 1023 not found
FAILURE IN SERVER /n_set Node 1035 not found
FAILURE IN SERVER /n_set Node 1029 not found
FAILURE IN SERVER /n_set Node 1005 not found
FAILURE IN SERVER /n_set Node 1011 not found
FAILURE IN SERVER /n_set Node 1023 not found
FAILURE IN SERVER /n_set Node 1017 not found
FAILURE IN SERVER /n_set Node 1042 not found
FAILURE IN SERVER /n_set Node 1018 not found
FAILURE IN SERVER /n_set Node 1036 not found
FAILURE IN SERVER /n_set Node 1030 not found
FAILURE IN SERVER /n_set Node 1006 not found
FAILURE IN SERVER /n_set Node 1012 not found
FAILURE IN SERVER /n_set Node 1024 not found
FAILURE IN SERVER /n_set Node 1018 not found

over here I tried yr code - node tree was full of stuff as expected - don’t have a MIDI kbd attached ATM but

    MIDIIn.doNoteOnAction(1, 1, 64, 64); 

did play a note…

CMD-. caused the node tree to regenerate

so code looks ok …

I tried upgrading supercollider and got better results - but not consistent results.

It’s been working for a bit, but earlier I swear I had problems with the exact same code.

Is it possible that the sequencing of ServerBoot and waitForBoot is not consistent? My code seems to be assuming that the ~makeBusses function will finish executing before the waitForBoot function starts. Is there a chance that won’t be true?

In cases where you want things to happen in a certain order, I’d put everything inside .waitForBoot in the appropriate place. Here I suggest calling ~makeBusses.() close to the beginning of .waitForBoot, before the first s.sync.

1 Like