{"id":18918007,"url":"https://github.com/supercollider/example-plugins","last_synced_at":"2026-02-18T07:31:52.190Z","repository":{"id":75621197,"uuid":"58269188","full_name":"supercollider/example-plugins","owner":"supercollider","description":"**This project is deprecated!** See https://github.com/supercollider/cookiecutter-supercollider-plugin instead.","archived":false,"fork":false,"pushed_at":"2021-04-17T10:29:16.000Z","size":33,"stargazers_count":42,"open_issues_count":7,"forks_count":12,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-06-25T22:05:58.321Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supercollider.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-05-07T14:21:05.000Z","updated_at":"2024-10-21T11:09:41.000Z","dependencies_parsed_at":"2024-01-07T01:17:56.199Z","dependency_job_id":"36309e6e-2213-458c-a65f-168ab476131a","html_url":"https://github.com/supercollider/example-plugins","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/supercollider/example-plugins","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercollider%2Fexample-plugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercollider%2Fexample-plugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercollider%2Fexample-plugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercollider%2Fexample-plugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supercollider","download_url":"https://codeload.github.com/supercollider/example-plugins/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercollider%2Fexample-plugins/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29572397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T06:19:27.422Z","status":"ssl_error","status_checked_at":"2026-02-18T06:18:44.348Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T10:29:05.744Z","updated_at":"2026-02-18T07:31:52.173Z","avatar_url":"https://github.com/supercollider.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SuperCollider Example Plugins\n\nThis repository demonstrates how to write UGens for [SuperCollider](https://github.com/supercollider/supercollider) using a series of examples. Custom UGens are packaged in server plugins. Plugins are not to be confused with quarks, which are libraries for the language.\n\nThis supplements the [Writing Unit Generators](http://doc.sccode.org/Guides/WritingUGens.html) helpfile. Chapter 25 of [the SuperCollider Book](http://www.supercolliderbook.net/) is also a useful resource, although the build instructions are outdated.\n\nThere is a lot of conflicting material out there for UGen building. This is the official repository and should be the most up to date.\n\nBeyond this repository, the reader is encouraged to look at [sc3-plugins](https://github.com/supercollider/sc3-plugins) for more complex, real-world examples.\n\n## Directory\n\n- 01a-BoringMixer -- minimal example of a plugin\n- 01b-BoringMixer -- using a newer C++ wrapper\n- 02-MySaw -- introduces multiple calculation functions and state variables\n- 02b-MySaw -- using a newer C++ wrapper\n- 03-AnalogEcho -- introduces memory allocation and cubic interpolation\n\n## Compiling\n\nThis is how you build one of the examples in this directory. The examples are kept separate with duplicated code so that you can simply copy out a directory to start your own ugen (see [Development workflow](#development-workflow)). **Currently, this build system is missing Windows. Sorry, we're working on it...**\n\n### Step 1: Obtain header files\n\nBefore you can compile any plugin, you will need a copy of the SuperCollider *source code* (NOT the app itself). \nSource code tarballs can be downloaded from the [SuperCollider release page](https://github.com/supercollider/supercollider/releases). If you are on Linux, it's okay (and preferable) to use the Linux source tarball.\n\nYou will **not** need to recompile SuperCollider itself in order to get a plugin working. You only need the source code to get the C++ headers.\n\nThe source code version should roughly match your SuperCollider app version. For example, headers from any 3.9.x patch release will produce plugins compatible with any 3.9.x version, but not 3.8. This is due to occasional breaking changes in the plugin \"API\" (technically the ABI), which will occur only in 3.x releases. These breaking changes will not require modification to your plugin's source code, but compiled plugin binaries will need to be recompiled. If the server tries to load an incompatible plugin, it will give the \"API version mismatch\" error message.\n\n### Step 2: Create build directory and set `SC_PATH`\n\nCMake dumps a lot of files into your working directory, so you should always start by creating the `build/` directory:\n\n```shell\nexample-plugins/01a-BoringMixer/$ mkdir build\nexample-plugins/01a-BoringMixer/$ cd build\n```\n\nNext, we run CMake and tell it where the SuperCollider headers are to be found (don't forget the `..`!):\n\n```shell\nexample-plugins/01a-BoringMixer/build/$ cmake -DSC_PATH=/path/to/sc3source/ ..\n```\n\nHere, `/path/to/sc3source/` is the path to the source code. Once again, this is the *source code*, not the app itself.\n\nTo make sure you have the right path, check to ensure that it contains a file at `include/plugin_interface/SC_PlugIn.h`. If you get a warning that `SC_PlugIn.h` could not be found, then `SC_PATH` is not set correctly.\n\nCMake will remember your `SC_PATH`, so you only need to run that once per plugin.\n\n### Step 3: Set flags (optional)\n\nIf you don't plan on using a debugger, it's advisable to build in release mode so that the compiler optimizes:\n\n```shell\nexample-plugins/01a-BoringMixer/build/$ cmake -DCMAKE_BUILD_TYPE=RELEASE ..\n```\n\nSwitch back to debug mode with `-DCMAKE_BUILD_TYPE=DEBUG`.\n\nIf you also want to build the UGen for Supernova, then you need to set the 'SUPERNOVA' flag:\n\n```shell\nexample-plugins/01a-BoringMixer/build/$ cmake -DSUPERNOVA=ON ..\n```\n\nAgain, all these flags are persistent, and you only need to run them once. If something is messed up, you can trash the `build/` directory and start again.\n\n### Step 4: Build it!\n\nAfter that, make sure you're in the build directory, and call `make`:\n\n```shell\nexample-plugins/01a-BoringMixer/build/$ make\n```\n\nThis will produce a \"shared library\" file ending in `.scx`. On Linux, the extension is `.so`.\n\nYou can freely alternate between steps 3 and 4. If you decide to go back and change some CMake flags, just hit `make` again.\n\n## Installing\n\nCopy, move, or symbolic link the folder into your Extensions folder. You can find out which one that is by evaluating `Platform.userExtensionDir` in sclang. You can install the plugin(s) system-wide by copying to `Platform.systemExtensionDir`.\n\nIf you're not using sclang, the installation method varies. Ask the developer(s) of the client if you're not sure how.\n\n## Development workflow\n\nIn order to start developing a new UGen, make a copy of one of the example's directory. Change the `.cpp` filename, as well as the name and contents of the corresponding `.sc` file, and update the beginning of `CMakeLists.txt` with your new `.cpp` filename. Then you're ready to work on the code. If you are using Git, you may also want to copy over the `.gitignore` in the root of this project.\n\nIf you change your source file(s) or `CMakeLists.txt`, simply use `make` to recompile the shared library. You will need to restart scsynth/supernova for your changes to take effect.\n\nIf you change your `.sc` class file, you will need to restart sclang.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercollider%2Fexample-plugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupercollider%2Fexample-plugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercollider%2Fexample-plugins/lists"}