Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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 SynthDefs 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.

Files for supercollider, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size supercollider-0.0.4.tar.gz (6.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page