Can I use SuperCollider with programming languages other than sclang?

Updated

Yes. SuperCollider's client/server architecture separates the audio engine from the language that controls it, so you can drive the scsynth server from Python, JavaScript, Haskell, Scala, and other languages. The native client is sclang, but it is not the only way in. This applies to the standard scsynth server; the alternative supernova engine is a separate implementation of the same server role.

Why other languages can control SuperCollider

SuperCollider is built from three major components:

  • scsynth – a real-time audio engine implemented as a server
  • sclang – an interpreted programming language that acts as a client to the server
  • scide – an editor for sclang with an integrated help system

Because the server and the language are separate processes, the server does not care which client connects to it. The documentation states that "due to the client/server architecture, it is possible for multiple clients to connect and control what is happening on the server." That single design decision is what makes multi-language control possible.

Which languages have client implementations

The site lists several client implementations in other programming languages, including:

  • Python
  • JavaScript
  • Haskell
  • Scala

These clients connect to scsynth and control it, the same role sclang plays natively. The list given is not exhaustive, so other community clients may exist beyond these.

What this means in practice

If you already work in one of those languages, you can send control messages to a running scsynth server without writing sclang. The server handles audio synthesis; your language of choice handles the logic and sequencing.

A few conditions to keep in mind:

  • You still need a running scsynth server for the client to talk to.
  • The client implementations are separate projects, so their feature coverage and maintenance may differ from sclang.
  • sclang remains the native language and the reference client, and scide is built around it.

Choosing an approach

Situation Reasonable choice
You want the documented, first-party path Use sclang with scide
You already code in Python, JavaScript, Haskell, or Scala Use the corresponding client implementation
You need multiple controllers at once Any mix of clients, since multiple clients can connect to the server

For setup, downloads, and the current version (3.14.1 for Mac, Linux, and Windows), see the Downloads section of the SuperCollider site. For community help, the forum at scsynth.org is the recommended starting point.