
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Supriya is a Python API for SuperCollider.
Supriya lets you:
Boot and communicate with SuperCollider's synthesis engine in realtime.
Explore nonrealtime composition with scores.
Compile SuperCollider SynthDefs natively in Python code
Build time-agnostic asyncio-aware applications with the context interface.
Schedule patterns and callbacks with tempo- and meter-aware clocks
Install from PyPI:
pip install supriya
Or from source:
git clone https://github.com/supriya-project/supriya.git
cd supriya
pip install -e .
Get SuperCollider from http://supercollider.github.io/.
Start your Python interpreter and import Supriya:
>>> import supriya
Boot the SuperCollider server:
>>> server = supriya.Server().boot()
Import some classes:
>>> from supriya import Envelope, synthdef
>>> from supriya.ugens import EnvGen, Out, SinOsc
Make a synthesizer definition:
>>> @synthdef()
... def simple_sine(frequency=440, amplitude=0.1, gate=1):
... sine = SinOsc.ar(frequency=frequency) * amplitude
... envelope = EnvGen.kr(envelope=Envelope.adsr(), gate=gate, done_action=2)
... Out.ar(bus=0, source=[sine * envelope] * 2)
...
Visualize the SynthDef (requires Graphviz):
>>> supriya.graph(simple_sine)
Allocate it on the server:
>>> _ = server.add_synthdefs(simple_sine)
... and then sync the server before proceeding to ensure the SynthDef has been fully parsed by scsynth:
>>> _ = server.sync()
Create and allocate a group:
>>> group = server.add_group()
Create some synthesizers with the previously defined synthesizer definition, and allocate them on the server as a child of the previously created group:
>>> for i in range(3):
... _ = group.add_synth(simple_sine, frequency=111 * (i + 1))
...
Query the server's node tree:
>>> print(server.query_tree())
NODE TREE 0 group
1 group
1000 group
1003 simple_sine
amplitude: 0.1, frequency: 333.0, gate: 1.0
1002 simple_sine
amplitude: 0.1, frequency: 222.0, gate: 1.0
1001 simple_sine
amplitude: 0.1, frequency: 111.0, gate: 1.0
Release the synths:
>>> for synth in group.children[:]:
... synth.free()
...
Quit the server:
>>> server.quit()
This library is made available under the terms of the MIT license.
FAQs
A Python API for SuperCollider
We found that supriya demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.