All Projects → ideoforms → python-supercollider

ideoforms / python-supercollider

Licence: MIT license
Python client for the SuperCollider audio synthesis server

Programming Languages

python
139335 projects - #7 most used programming language

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.

License

This library is made available under the terms of the MIT license.

See also

  • If you want a more comprehensive framework that lets you construct and compile SynthDefs from Python, take a look at Supriya.
  • For an excellent Python + SuperCollider live coding environment, check out FoxDot
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].