byulparan / cl-collider

A SuperCollider client for CommonLisp
Other
218 stars 23 forks source link

The slot CL-COLLIDER::OSC-DEVICE is unbound in the object #<CL-COLLIDER::EXTERNAL-SERVER localhost-127.0.0.1:57120>. [Condition of type UNBOUND-SLOT] #138

Closed MarcRohrer closed 3 months ago

MarcRohrer commented 3 months ago

Hi,

I am highly intrested in cl-collider and try to run it under windows. Unfortunately I get:

SC-USER> (play (white-noise.ar 0.1))
; Debugger entered on #<UNBOUND-SLOT OSC-DEVICE {25A374B1}>
[1] SC-USER> 
; Evaluation aborted on #<UNBOUND-SLOT OSC-DEVICE {25A374B1}>
SC-USER> (server-query-all-nodes)
; Debugger entered on #<UNBOUND-SLOT OSC-DEVICE {24E7ABA1}>
[1] SC-USER> (server-status)
; Debugger entered on #<UNBOUND-SLOT OSC-DEVICE {23582B01}>

I do not quite understand, what the problem here is :-(

I installed SC and set it up for tidal in the first place. Can this have to do something with the error?

Marc

ntrocado commented 3 months ago

Hi! How are you booting the server and what messages do you get?

MarcRohrer commented 3 months ago

Hi,

the server-boot function starts the server, right?

; Cleared REPL history
CL-USER> (asdf:load-system "cl-collider")
WARNING: System definition file #P"h:/src/cl-collider/systems/pileup-20240503-f269473/pileup.asd" contains definition for system "pileup-tests". Please only define "pileup" and secondary systems with a name starting with "pileup/" (e.g. "pileup/test") in that file.
WARNING: redefining IEEE-FLOATS:ENCODE-FLOAT32 in DEFUN
WARNING: redefining IEEE-FLOATS:DECODE-FLOAT32 in DEFUN
WARNING: redefining IEEE-FLOATS:ENCODE-FLOAT64 in DEFUN
WARNING: redefining IEEE-FLOATS:DECODE-FLOAT64 in DEFUN
WARNING: redefining SIMPLE-INFERIORS:LOCATION in DEFGENERIC
WARNING: SuperCollider was not found in the default path.
T
CL-USER> (in-package :sc-user)
#<PACKAGE "SC-USER">
SC-USER> (setf *sc-plugin-paths* '("plugins\\"))
("plugins\\")
SC-USER> (defun paths ()
  (values *sc-synth-program* *sc-plugin-paths* *sc-synthdefs-path*))
PATHS
SC-USER> (paths)
#P"scsynth.exe"
("plugins\\")
"C:\\Users\\Marc\\AppData\\Local\\SuperCollider\\synthdefs\\"
SC-USER> (setf *s* (make-external-server "localhost" :port 57110))
#<CL-COLLIDER::EXTERNAL-SERVER localhost-127.0.0.1:57110>
SC-USER> (server-boot *s*)
; Debugger entered on #<SB-INT:STREAM-DECODING-ERROR {24F28051}>
*** ERROR: open directory failed 'plugins\': Das System kann den angegebenen Pfad nicht finden

Device options:

  - MME : Microsoft Soundmapper - Input   (device #0 with 2 ins 0 outs)

  - MME : Line (2- BIG KNOB STUDIO)   (device #1 with 2 ins 0 outs)

  - MME : In 1-24 (MOTU Pro Audio)   (device #2 with 24 ins 0 outs)

  - MME : In 1-2 (MOTU Pro Audio)   (device #3 with 2 ins 0 outs)

  - MME : Microsoft Soundmapper - Output   (device #4 with 0 ins 2 outs)

  - MME : BigKnob (2- BIG KNOB STUDIO)   (device #5 with 0 ins 2 outs)

  - MME : Realtek Digital Output (Realtek   (device #6 with 0 ins 2 outs)

  - MME : Out 1-24 (MOTU Pro Audio)   (device #7 with 0 ins 24 outs)

  - MME : DELL U4320Q (NVIDIA High Defini   (device #8 with 0 ins 2 outs)

  - MME : Lautsprecher (MOTU Pro Audio)   (device #9 with 0 ins 2 outs)

  - Windows DirectSound : Primärer Soundaufnahmetreiber   (device #10 with 2 ins 0 outs)

  - Windows DirectSound : Line (2- BIG KNOB STUDIO)   (device #11 with 2 ins 0 outs)

  - Windows DirectSound : In 1-24 (MOTU Pro Audio)   (device #12 with 24 ins 0 outs)

  - Windows DirectSound : In 1-2 (MOTU Pro Audio)   (device #13 with 2 ins 0 outs)

  - Windows DirectSound : Primärer Soundtreiber   (device #14 with 0 ins 2 outs)

  - Windows DirectSound : BigKnob (2- BIG KNOB STUDIO)   (device #15 with 0 ins 2 outs)

  - Windows DirectSound : Realtek Digital Output (Realtek(R) Audio)   (device #16 with 0 ins 2 outs)

  - Windows DirectSound : Out 1-24 (MOTU Pro Audio)   (device #17 with 0 ins 24 outs)

  - Windows DirectSound : DELL U4320Q (NVIDIA High Definition Audio)   (device #18 with 0 ins 2 outs)

  - Windows DirectSound : Lautsprecher (MOTU Pro Audio)   (device #19 with 0 ins 2 outs)

  - ASIO : Generic Low Latency ASIO Driver   (device #20 with 2 ins 2 outs)

  - ASIO : MOTU Pro Audio   (device #21 with 128 ins 128 outs)

  - ASIO : Realtek ASIO   (device #22 with 2 ins 2 outs)

  - ASIO : ReaRoute ASIO (x64)   (device #23 with 16 ins 16 outs)

  - Windows WASAPI : Realtek Digital Output (Realtek(R) Audio)   (device #24 with 0 ins 2 outs)

  - Windows WASAPI : Out 1-24 (MOTU Pro Audio)   (device #25 with 0 ins 24 outs)

  - Windows WASAPI : DELL U4320Q (NVIDIA High Definition Audio)   (device #26 with 0 ins 2 outs)

  - Windows WASAPI : Lautsprecher (MOTU Pro Audio)   (device #27 with 0 ins 2 outs)

  - Windows WASAPI : BigKnob (2- BIG KNOB STUDIO)   (device #28 with 0 ins 2 outs)

  - Windows WASAPI : In 1-24 (MOTU Pro Audio)   (device #29 with 24 ins 0 outs)

  - Windows WASAPI : In 1-2 (MOTU Pro Audio)   (device #30 with 2 ins 0 outs)

  - Windows WASAPI : Line (2- BIG KNOB STUDIO)   (device #31 with 2 ins 0 outs)

  - Windows WDM-KS : SPDIF Out (Realtek HDA SPDIF Out)   (device #32 with 0 ins 2 outs)

  - Windows WDM-KS : Headphones (Realtek HD Audio 2nd output)   (device #33 with 0 ins 2 outs)

  - Windows WDM-KS : Speakers (Realtek HD Audio output)   (device #34 with 0 ins 8 outs)

  - Windows WDM-KS : Stereomix (Realtek HD Audio Stereo input)   (device #35 with 2 ins 0 outs)

  - Windows WDM-KS : Eingang (Realtek HD Audio Line input)   (device #36 with 2 ins 0 outs)

  - Windows WDM-KS : Mikrofon (Realtek HD Audio Mic input)   (device #37 with 2 ins 0 outs)

  - Windows WDM-KS : Output (NVIDIA High Definition Audio)   (device #38 with 0 ins 2 outs)

  - Windows WDM-KS : Line (BIG KNOB STUDIO)   (device #39 with 2 ins 0 outs)

  - Windows WDM-KS : Lautsprecher (BIG KNOB STUDIO)   (device #40 with 0 ins 2 outs)

  - Windows WDM-KS : In 1-24 (In 1-24)   (device #41 with 24 ins 0 outs)

  - Windows WDM-KS : In 1-2 (In 1-2)   (device #42 with 2 ins 0 outs)

  - Windows WDM-KS : Out 1-24 (Out 1-24)   (device #43 with 0 ins 24 outs)

  - Windows WDM-KS : Out 1-2 (Out 1-2)   (device #44 with 0 ins 2 outs)

Requested devices:

  In:

  - (default)

  Out:

  - (default)

Selecting default system input/output devices

Booting with:

  In: MME : Line (2- BIG KNOB STUDIO)

  Out: MME : BigKnob (2- BIG KNOB STUDIO)

  Sample rate: 44100.000

  Latency (in/out): 0.013 / 0.091 sec

SC_AudioDriver: sample rate = 44100.000000, driver's block size = 64

SuperCollider 3 server ready.

[1] SC-USER> 

But I also get the condition:

:UTF-8 stream decoding error on
#<SB-SYS:FD-STREAM for "file C:\\Users\\Marc\\AppData\\Local\\Temp\\tmp7LQ0A0VN.tmp" {24EB16C9}>:

  the octet sequence #(153) cannot be decoded.
   [Condition of type SB-INT:STREAM-DECODING-ERROR]

Restarts:
 0: [ATTEMPT-RESYNC] Attempt to resync the stream at a character boundary and continue.
 1: [FORCE-END-OF-FILE] Force an end of file.
 2: [INPUT-REPLACEMENT] Use string as replacement input, attempt to resync at a character boundary and continue.
 3: [RETRY] Retry SLY mREPL evaluation request.
 4: [*ABORT] Return to SLY's top level.
 5: [ABORT] abort thread (#<THREAD "sly-channel-1-mrepl-remote-1" RUNNING {235100E9}>)

Backtrace:
 0: (SB-IMPL::STREAM-DECODING-ERROR-AND-HANDLE #<SB-SYS:FD-STREAM for "file C:\\Users\\Marc\\AppData\\Local\\Temp\\tmp7LQ0A0VN.tmp" {24EB16C9}> 1)
 1: (SB-IMPL::INPUT-CHAR/UTF-8 #<SB-SYS:FD-STREAM for "file C:\\Users\\Marc\\AppData\\Local\\Temp\\tmp7LQ0A0VN.tmp" {24EB16C9}> NIL :EOF)
 2: (SB-IMPL:ANSI-STREAM-READ-CHAR #<SB-SYS:FD-STREAM for "file C:\\Users\\Marc\\AppData\\Local\\Temp\\tmp7LQ0A0VN.tmp" {24EB16C9}> NIL :EOF #<unused argument>)
 3: (SB-IMPL:ANSI-STREAM-READ-SEQUENCE "
 ..)
 4: (READ-SEQUENCE "
 ..)
 5: (UIOP/STREAM:COPY-STREAM-TO-STREAM #<SB-SYS:FD-STREAM for "file C:\\Users\\Marc\\AppData\\Local\\Temp\\tmp7LQ0A0VN.tmp" {24EB16C9}> #<SB-IMPL::STRING-OUTPUT-STREAM {64AF311}> :ELEMENT-TYPE CHARACTER :..
 6: ((LABELS UIOP/RUN-PROGRAM::ACTIVITY :IN UIOP/RUN-PROGRAM::%CALL-WITH-PROGRAM-IO) #<SB-SYS:FD-STREAM for "file C:\\Users\\Marc\\AppData\\Local\\Temp\\tmp7LQ0A0VN.tmp" {24EB16C9}>)
 7: (UIOP/STREAM:CALL-WITH-INPUT-FILE #P"C:/Users/Marc/AppData/Local/Temp/tmp7LQ0A0VN.tmp" #<FUNCTION (LAMBDA (UIOP/RUN-PROGRAM::S) :IN UIOP/RUN-PROGRAM::%CALL-WITH-PROGRAM-IO) {24EB137D}> :ELEMENT-TYPE :..
 8: ((FLET "BEFORE94" :IN UIOP/RUN-PROGRAM::%CALL-WITH-PROGRAM-IO) #P"C:/Users/Marc/AppData/Local/Temp/tmp7LQ0A0VN.tmp")
 9: (UIOP/STREAM:CALL-WITH-TEMPORARY-FILE #<FUNCTION (FLET "BEFORE94" :IN UIOP/RUN-PROGRAM::%CALL-WITH-PROGRAM-IO) {64AF22D}> :WANT-STREAM-P NIL :WANT-PATHNAME-P T :DIRECTION :IO :KEEP NIL :AFTER NIL :DIR..
10: (UIOP/RUN-PROGRAM::%CALL-WITH-PROGRAM-IO UIOP/RUN-PROGRAM:SLURP-INPUT-STREAM #<SB-SYS:FD-STREAM for "socket 127.0.0.1:3171, peer: 127.0.0.1:3173" {23510001}> #<unused argument> #<FUNCTION (LAMBDA (UIO..
11: (UIOP/RUN-PROGRAM::%USE-SYSTEM "netstat -an" :OUTPUT #<SB-IMPL::STRING-OUTPUT-STREAM {64AF311}> :EXTERNAL-FORMAT :DEFAULT)
12: ((LAMBDA NIL :IN CL-COLLIDER::FIND-PORT))
13: (CL-COLLIDER::THREAD-WAIT-WITH-TIMEOUT #<FUNCTION (LAMBDA NIL :IN CL-COLLIDER::FIND-PORT) {24DFA9C5}> 15000)
14: (CL-COLLIDER::FIND-PORT #<SB-THREAD:THREAD "scsynth" RUNNING {24DFA471}> 57110)
15: ((:METHOD CL-COLLIDER::BOOTUP-SERVER-PROCESS (CL-COLLIDER::EXTERNAL-SERVER)) #<CL-COLLIDER::EXTERNAL-SERVER localhost-127.0.0.1:57110>) [fast-method]
16: ((:METHOD SERVER-BOOT (CL-COLLIDER::RT-SERVER)) #<CL-COLLIDER::EXTERNAL-SERVER localhost-127.0.0.1:57110>) [fast-method]
17: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SERVER-BOOT *S*) #<NULL-LEXENV>)
18: (EVAL (SERVER-BOOT *S*))
19: ((LAMBDA NIL :IN SLYNK-MREPL::MREPL-EVAL-1))
 --more--

The condition is shown in a separate Sly window, but the server continues booting. What is the problem?

Also startup.scd does not seem to be used unlike when I start the SuperCollider IDE...

Thank you very much for your help!

Marc

ntrocado commented 3 months ago

Can you try setting *sc-plugin-paths* to an existing absolute path? So you don't get this error: *** ERROR: open directory failed 'plugins\': Das System kann den angegebenen Pfad nicht finden. My guess would be that the utf-8 decoding error has to do with the system message for missing directory, and it's preventing cl-collider from finishing the server setup routine.

ntrocado commented 3 months ago

Also startup.scd does not seem to be used unlike when I start the SuperCollider IDE...

startup.scd is for the sclang interpreter, so it isn't used by cl-collider. You have to create an equivalent one on the lisp side. One way of accomplishing this, so you don't have to type the same stuff over and over again, is to create a system (you can call it "sc-setup" or whatever) that depends on cl-collider, sets all the variables that you need, boots the supercollider server, and loads stuff (synthdefs, etc.) that you want to have available. Then to start a session you just do (ql:quickload "sc-setup").

MarcRohrer commented 3 months ago

Hi,

ah ok. I will have a look at that. Thanx for the info!

The "plugins error is gone now, but I still get the other error

:UTF-8 stream decoding error on
#<SB-SYS:FD-STREAM for "file C:\\Users\\Marc\\AppData\\Local\\Temp\\tmp7LQ0A0VO.tmp" {257BF4C1}>:

  the octet sequence #(153) cannot be decoded.
   [Condition of type SB-INT:STREAM-DECODING-ERROR]

...

and executing one of the functions like

[1] SC-USER> (server-query-all-nodes)
; Debugger entered on #<UNBOUND-SLOT OSC-DEVICE {25BBC3C1}>

I also still get the other error

The slot CL-COLLIDER::OSC-DEVICE is unbound in the object
#<CL-COLLIDER::EXTERNAL-SERVER localhost-127.0.0.1:57110>.
   [Condition of type UNBOUND-SLOT]

Restarts:
 0: [USE-VALUE] Return a value as the slot-value.
 1: [STORE-VALUE] Store and return a value as the slot-value.
 2: [RETRY] Retry SLY mREPL evaluation request.
 3: [ABORT] Return to sly-db level 1.
 4: [RETRY] Retry SLY mREPL evaluation request.
 5: [*ABORT] Return to SLY's top level.
 --more--

Backtrace:
 0: ((:METHOD SLOT-UNBOUND (T T T)) #<unused argument> #<CL-COLLIDER::EXTERNAL-SERVER localhost-127.0.0.1:57110> CL-COLLIDER::OSC-DEVICE) [fast-method]
 1: (SB-PCL::SLOT-UNBOUND-INTERNAL #<CL-COLLIDER::EXTERNAL-SERVER localhost-127.0.0.1:57110> 22)
 2: ((:METHOD SEND-MESSAGE (CL-COLLIDER::EXTERNAL-SERVER)) #<CL-COLLIDER::EXTERNAL-SERVER localhost-127.0.0.1:57110> "/g_dumpTree" 0 0) [fast-method]
 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SERVER-QUERY-ALL-NODES) #<NULL-LEXENV>)
 4: (EVAL (SERVER-QUERY-ALL-NODES))
 5: ((LAMBDA NIL :IN SLYNK-MREPL::MREPL-EVAL-1))
 --more--

Thanx a lot for your help!

Marc

byulparan commented 3 months ago

I have some fixed to bootup process for Windows. Plz try again, and report it. I have no Windows machine, so It is difficult to keep up with changes in Windows OS.

and Currently quicklisp's cl-collider is outdated. Use github version until update Quicklisp.

MarcRohrer commented 3 months ago

I use OCICL, everything installed like a breeze :-)

wow!

and there is noise from (play (white-noise.ar 0.1))

but for your information, when installing via ocicl, all of the downloads work fine, but there is one warning:

WARNING: System definition file #P"H:/src/cl-collider/systems/pileup-20240503-f269473/pileup.asd" contains definition for system "pileup-tests". Please only define "pileup" and secondary systems with a name starting with "pileup/" (e.g. "pileup/test") in that file.

but when I first do a (asdf:load-system "cl-collider") there is quite some stuff going on :-( Unfortunately too large to pst here...

Thanx a lot!

Marc