Search code examples
clojureovertone

Can not connect to an external SuperCollider audio server from Overtone


I am a Clojure beginner, and I am trying to play with Overtone. But I am having trouble starting Overtone and connecting it with an external SuperCollider server.

I am following the tutorial from Overtone documentation: Connecting scsynth. Since I am on Windows 10 64bit I can not use the Internal SuperCollider server. So I installed SuperCollider and made sure the audio server is running at 127.0.0.1:57110.

Now when I try to load Overtone environment on lein relp and I get nil in return.

user=>(use 'overtone.core)
nil

So if the Overtone environment is loaded sucessfully, now we are supposed to connect with an external SuperCollider server. We can do this in two ways. Starting the external server from within Overtone, or connect to an existing running server.

To start an external server I tried the following command, but I get unresolved symbol error.

user=> (boot-external-server)

CompilerException java.lang.RuntimeException: Unable to resolve symbol: boot-external-server in this context, compiling:(C:\Users\<user>\AppData\Local\Temp\form-init401744747046363104.clj:1:1)

So I tried to connect to an existing server running on port 57110 but I get similar unresolved symbol error,

user=> (connect-external-server 57110)

CompilerException java.lang.RuntimeException: Unable to resolve symbol: connect-external-server in this context, compiling:(C:\Users\<user>\AppData\Local\Temp\form-init401744747046363104.clj:1:1)

user=> (connect-external-server)

CompilerException java.lang.RuntimeException: Unable to resolve symbol: connect-external-server in this context, compiling:(C:\Users\<user>\AppData\Local\Temp\form-init401744747046363104.clj:1:1)

Am I supposed to get nil when I run (use 'overtone.core)? My assumption is, all these symbols are unresolved because Overtone namespace is not loaded yet.

How do I solve this problem to start Overtone on my system?


Solution

  • Instead of (use 'overtone.core) I used (ns user (:require [overtone.core :refer :all])) and that solved the issue. Now I can call (boot-external-server) and (connect-external-server) without unresolved symbol error.