Interact with the SuperCollider audio synthesis engine
Project description
Python client for SuperCollider
A lightweight Python module to control the SuperCollider audio synthesis engine.
Installation
The liblo
library is required for the underlying OSC communications.
brew install liblo # macOS
apt-get install liblo7 liblo-dev # Linux
Install the Python package:
pip3 install supercollider
Usage
Before using the library, start the SuperCollider server, either through the SuperCollider GUI or with scsynth -u 57110
.
Within the SC client, create the below SynthDef:
SynthDef(\sine, { |out = 0, freq = 440.0, gain = 0.0|
Out.ar(out, SinOsc.ar(freq) * gain.dbamp);
}).store;
From Python, you can now create and trigger Synths:
from supercollider import Server, Synth
server = Server()
synth = Synth(server, "sine", { "freq" : 440.0, "gain" : -12.0 })
synth.set("freq", 880.0)
For further examples, see examples.
See also
If you want a more fully-fledged approach that lets you construct and compile SynthDef
s from Python, you'd be better with Supriya.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file supercollider-0.0.4.tar.gz
.
File metadata
- Download URL: supercollider-0.0.4.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e4771ca307f30f188629c339bcfd4692abe9809feca4ec90be0d291d5fb605e |
|
MD5 | a3d288b9f03dcdab8fd04ba0b51bd1e9 |
|
BLAKE2b-256 | 9210817a71bcb510d386347ae8d2b27608fe5a3a2e0ed5aaff5145fa7f19fdbb |