No description
  • C++ 91.8%
  • SuperCollider 5.1%
  • C 1.9%
  • CMake 0.4%
  • Python 0.2%
  • Other 0.2%
Find a file
Dennis Scheiba ea525289de
Add wasm support for sclang (#7440)
* add wasm option to sclang cmake

rename yaml to yaml-cpp

use force on sclang_server off

force static plugins and no x11 for wasm build

mount class library into wasm binary

refactor sclang_sources definition to incorporate emscripten build

increase default wasm stack size for sclang

* patch sclang network stack for wasm

wasm has no socket access, so anything socket related will be removed for the wasm build

* patch NetAddr primitives for wasm

wasm has no network stack. in order to keep existing code working, the primitives will simply do nothing.
default ip address is 127.0.0.1.

* add wasm platform architecture primitive

* make canCallOS depend on if default thread is main thread

normally language clients execute code in their main thread.
this is not the case for the wasm lang client b/c it could freeze the browser tab, yet the AppClock needs to run on the main thread, so a flag was added to indicate on which thread this runs.

* make sclang main method a noop for wasm

sclang gets booted through a function call in wasm

* introduce USE_STD_ASYNC definition to avoid boost thread pool

replaces _MSC_VER guard such that emscripten can also use std::future
the boost thread pool does not work for some reason on emscripten.

* remove DiskOut SynthDef on wasm

DiskOut plugin is not available, so it has to be removed from the default synth defs

* add wasm platform files in class library

overwrites are replacing the unix cmd startup of scsynth with a JS call.
Also introduces the JS class to run JS code from within sclang
Defaults to a reduced default memSize for wasm server.
Enforce running JS code on the main thread

* load wasm platform class library folder

this decides which platform folder gets included during compilation.
since the wasm build is otherwise close to unix, this has not been put in its dedicated class.

* skip osc init on wasm of language client

network stack gets replaced by a JS I/O wrapper on wasm

* add wasm language client

instead of a traditional terminal client, wasm is exposing the I/O via javascript.
any osc messages are also passed via javascript.

run AppClock on main thread and use try_lock in order to not block on the main thread

enforce running JS code on the main thread

* add pre-js file for sclang wasm

this exposes a type-hinted and documented high level api via JS

* add sclang wasm demo website

provides an example and a way to test the sclang wasm build

* init editor

the editor is a mockup of the sc IDE for the browser.
it demonstrates how sclang and scsynth can exchange osc data.

* cmake: make webosc a dedicated library

* build web editor as wasm target in ci

* add sclang to wasm readme

also add debugging notes

* add wasm support and info in readme

* use try for invoking module methods

this makes sure we do not leak memory in case the function raises an exception

* add simple sclang spinup and eval test for wasm build
2026-09-23 18:11:44 +02:00
.github add simple sclang spinup and eval test for wasm build 2026-09-23 15:34:06 +02:00
.vscode build/sclang check parser errors in pre commit (#7481) 2026-05-11 17:31:00 +01:00
cmake_modules cmake: update FindPortaudio.cmake 2026-07-21 14:28:11 -07:00
common load wasm platform class library folder 2026-09-23 15:34:05 +02:00
editors sclang: missing null terminator/size (#7720) 2026-09-22 21:23:29 +01:00
examples Fix bare \r and clean up formatting (#7538) 2026-06-03 09:38:18 +01:00
external_libraries add wasm option to sclang cmake 2026-09-23 11:27:44 +02:00
HelpSource sclang: Large compile rewrite. (#7500) 2026-09-21 18:46:59 +01:00
icons apply use single blank line as file ending in sc files 2024-08-30 10:34:46 +02:00
include sclang: Large compile rewrite. (#7500) 2026-09-21 18:46:59 +01:00
lang add simple sclang spinup and eval test for wasm build 2026-09-23 15:34:06 +02:00
langutils sclang: Large compile rewrite. (#7500) 2026-09-21 18:46:59 +01:00
package Update changelog_to_schelp.sh 2021-07-11 17:11:23 -07:00
platform add simple sclang spinup and eval test for wasm build 2026-09-23 15:34:06 +02:00
QtCollider sclang: Large compile rewrite. (#7500) 2026-09-21 18:46:59 +01:00
SCClassLibrary Add wasm support for sclang (#7440) 2026-09-23 18:11:44 +02:00
SCDoc build: modernize gcc/clang discovery 2025-11-30 02:59:36 -08:00
server use try for invoking module methods 2026-09-23 15:34:06 +02:00
sounds source tree reorganization 2010-11-30 20:45:02 +01:00
testsuite sclang: Large compile rewrite. (#7500) 2026-09-21 18:46:59 +01:00
tools build/sclang check parser errors in pre commit (#7481) 2026-05-11 17:31:00 +01:00
vcpkg/triplets Update x64-osx-release-supercollider.cmake 2022-09-11 12:59:42 -07:00
.clang-format Bump to clang-format-14 (#6196) 2024-05-20 09:38:00 +02:00
.editorconfig correct .editorconfig syntax 2024-09-16 12:12:34 +08:00
.git-blame-ignore-revs Update .git-blame-ignore-revs (#6959) 2025-06-09 23:23:49 +02:00
.gitignore Add VS Code IDE settings (#6351) 2025-04-29 09:45:37 +02:00
.gitmodules sclang: new lexer (#7394) 2026-05-11 15:05:49 +01:00
.pre-commit-config.yaml remove bison precommit (#7571) 2026-06-17 14:47:52 +01:00
AUTHORS updated News-3.7.schelp, CHANGELOG and AUTHORS 2016-03-13 13:08:55 +01:00
build_sclang.cfg.in sclang, scide: allow excluding default class library paths via language config file flag 2020-07-07 11:23:07 +01:00
CHANGELOG.md docs: update changelog with clarification on boost (#7254) 2025-11-23 22:43:49 +01:00
CHANGELOG_archive.md Move 3.6.6 changelog to the archive 2018-02-04 22:45:49 -08:00
cmake_uninstall.cmake.in Fix uninstall cmake target on linux (#7640) 2026-07-17 00:21:43 +02:00
CMakeLists.txt add wasm option to sclang cmake 2026-09-23 11:27:44 +02:00
CODE_OF_CONDUCT.md Update Code of Conduct regarding AI use (#7284) 2026-04-24 10:15:39 -07:00
CONTRIBUTING.md Move CONTRIBUTING.md and DEVELOPING.md to the wiki 2019-07-26 22:28:07 -07:00
COPYING enable GPL3 code by default 2010-01-24 17:05:45 +00:00
DEVELOPING.md Move CONTRIBUTING.md and DEVELOPING.md to the wiki 2019-07-26 22:28:07 -07:00
INSTALL Remove iPhone ReadMes (#6901) 2025-05-28 11:02:12 +02:00
README.md add wasm support and info in readme 2026-09-23 15:34:06 +02:00
README_BELA.md Update README_BELA.md (#7270) 2025-12-02 08:14:58 -08:00
README_LINUX.md Add Flatpak build (#7569) 2026-07-09 22:05:28 +02:00
README_MACOS.md Update README_MACOS.md 2026-07-21 14:28:11 -07:00
README_RASPBERRY_PI.md Project docs: rewrite README_RASPBERRY_PI for 3.14 and new RPi OS (#6906) 2025-05-29 10:48:51 -07:00
README_WASM.md add sclang to wasm readme 2026-09-23 15:34:05 +02:00
README_WINDOWS.md README_WINDOWS.md: update build instructions (#7641) 2026-09-07 13:56:31 -07:00
SCVersion.txt cmake: remove old version variables (#7352) 2026-01-28 23:36:54 +01:00
vcpkg.json vcpkg integration: switch to manifest mode 2026-07-21 14:28:11 -07:00

SuperCollider Build Status

SuperCollider is a platform for audio synthesis and algorithmic composition, used by musicians, artists, and researchers working with sound. It consists of:

  • scsynth, a real-time audio server with hundreds of unit generators ("UGens") for audio analysis, synthesis, and processing
  • supernova, an alternative server to scsynth with support for parallel DSP on multi-core processors
  • sclang, an interpreted programming language that controls the servers
  • scide, an editing environment for sclang with an integrated help system

sclang comes with its own package manager, called Quarks. scsynth and supernova both support third-party plugins via C and C++ APIs.

SuperCollider is written in C++17 using several third-party libraries, including Qt and Boost. It can be used on Windows, macOS, a variety of Linux and BSD distributions, Raspberry Pi, the Bela platform and the browser via WebAssembly.

The online documentation of the development version is available via dev.docs.supercollider.online.

Install

macOS and Windows builds for stable releases are provided at our downloads page. See the macOS README and Windows README for instructions on usage, and how to build SC yourself.

To get the latest stable version, Linux users will need to build SuperCollider themselves or use the Flatpak build. See the Linux README for instructions.

See the Raspberry Pi, Bela and WebAssembly READMEs for instructions on building on those platforms.

Platform support

SuperCollider is tested with:

  • Windows 10 64-bit and MSVC 2022
  • macOS 15 and Xcode 15.2
  • Ubuntu 26.04 and gcc 16

SuperCollider is known to support these platforms:

  • Windows 10, 11
  • macOS 12-15, 26
  • Ubuntu 22.04-26.04
  • WebAssembly

SuperCollider has guaranteed support for:

  • Windows 10, 11
  • MSVC 2022, 2026
  • macOS 15, 26
  • Xcode 16, 26
  • Debian >= 11
  • Ubuntu 24.04, 26.04
  • Fedora 40-44
  • Arch Linux
  • gcc >= 13
  • clang >= 18
  • Qt >= 6.2

There is still limited support for Qt 5.15. Further details are described in README_MACOS.md.

For more information on platform support guarantees, see the project Wiki.

Learn

The official docs can be viewed in the SuperCollider IDE's built-in documentation browser. You can also view them online at doc.sccode.org.

We recommend the following resources for learning SC:

Discuss

You can join our forum at scsynth.org or our Slack channel.

You can also view the archives for the old mailing lists at sc-users and sc-dev.

Please read our adopted code of conduct, which applies to all the above communities.

Contribute

Development of SuperCollider happens here on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving SuperCollider.

Code of Conduct

Please read our adopted code of conduct before contributing, so that you can understand what actions will and will not be tolerated.

Contributing Guide

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes.

Good First Issues

To help you get your feet wet and get you familiar with our contribution process, we have a list of good-first-issues that contain bugs which have a relatively limited scope. This is a great place to get started. You can also ask on our developer's mailing list, on Slack, or on the forum.

License

SuperCollider is free software available under Version 3 the GNU General Public License. See COPYING for details.