munshkr / flok

Web-based P2P collaborative editor for live coding sounds and images
https://flok.cc
GNU General Public License v3.0
263 stars 40 forks source link

sclang REPL is not working with local supercollider #295

Open lukaprincic opened 2 months ago

lukaprincic commented 2 months ago

I'm trying to run a sclang repl and can't figure out what is happening. it seems like the REPL in console is not able to start the server (scsynth)?

I'm on Linux, running SC in both Emacs or SC IDE successfuly. SuperCollider 3.12.2

steps to reproduce:

jack is running

i choose sclang in https://flok.cc/s/muddy-rose-zebra-9eee667b

i click on REPL on right side and get the code to run in terminal:

npx flok-repl@latest -H wss://flok.cc \
  -s muddy-rose-zebra-9eee667b \
  -t sclang \
  -T user:LU

I run that in terminal:

$ npx flok-repl@latest -H wss://flok.cc \
  -s muddy-rose-zebra-9eee667b \
  -t sclang \
  -T user:LU
Hub address: wss://flok.cc
Session name: muddy-rose-zebra-9eee667b
Types: [ 'sclang' ]
> SC FFT global init: cosTable initialised.
compiling class library...
>   Found 867 primitives.
    Compiling directory '/usr/local/share/SuperCollider/SCClassLibrary'
    Compiling directory '/usr/local/share/SuperCollider/Extensions'
    Compiling directory '/home/random/.local/share/SuperCollider/Extensions'
    Compiling directory '/home/random/.local/share/SuperCollider/downloaded-quarks/LinuxExternal'
    Compiling directory '/home/random/.local/share/SuperCollider/downloaded-quarks/linuxutils-quark'
    Compiling directory '/home/random/.local/share/SuperCollider/downloaded-quarks/JACK'
    numentries = 1325460 / 20237376 = 0.065
    5802 method selectors, 3488 classes
    method table size 21516152 bytes, big table size 161899008
    Number of Symbols 15324
    Byte Code Size 447975
    compiled 606 files in 0.46 seconds

Info: 6 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.01 seconds
> JACK quark is attempting to contact the Jack server
> 

*** Welcome to SuperCollider 3.12.2. *** For help type ctrl-c ctrl-h (Emacs) or :SChelp (vim) or ctrl-U (sced/gedit).

There is no scsynth in jack (qjackctl) for example...

I run the code in flok, something like play { WhiteNoise.ar!2 * 0.1 }. It appears in the terminal window:

...
> JACK quark is attempting to contact the Jack server
> 

*** Welcome to SuperCollider 3.12.2. *** For help type ctrl-c ctrl-h (Emacs) or :SChelp (vim) or ctrl-U (sced/gedit).
< play{WhiteNoise.ar!2}

and nothing else happens.