Sardine: Hackable Live Coding Library for Python

:fish: Sardine :fish:: A Hackable Live Coding Library for Python

I started live-coding in 2019/2020 and since that time, I gravitated around SC-based live coding tools, even trying to create my own live coding library in SCLang. I ended up creating another tool, called Sardine that can talk with SuperCollider through SuperDirt. It could do much more with SC than what it currently does but maybe this forum has more ideas than me on the topic. Note that this library is a direct sibling of similar libraries such as FoxDot or Tidal but it is taking things in a different direction. It is currently designed to be very modular and configured/extended intensively by the user.

:warning: Here comes the elevator pitch :warning: taken from GitHub:


Sardine is a versatile and hacker-friendly Python library designed for musical improvisation, algorithmic composition, and beyond. It transforms your standard Python interpreter into a powerful music instrument, enabling you to create and map melodic and rhythmic patterns to any electronic instrument (MIDI, OSC, and SuperCollider). With Sardine, you can:

  • Unleash your musical creativity on stage, in the studio, or for personal enjoyment
    • Seamlessly communicate with any MIDI/OSC device and the SuperCollider audio engine using Sardine.
    • Utilize bindings for SuperDirt, a widely recognized synthesis engine embraced by live coders globally.
  • Empower your Python code with time-aware capabilities
    • Employ temporal recursion to make any Python code time and tempo aware.
    • Accurately launch synchronous or asynchronous functions with time-specific results.
    • Customize your own Senders or Receivers to pattern any desired elements!
  • Develop intricate audio/visual installations with MIDI and OSC I/O
    • Assign callbacks to any OSC event, transforming Sardine into a sophisticated reactive toolbox.
    • Monitor changing values and incorporate them into your musical patterns or code.
  • Synchronize with other computers and musical instruments
    • Synchronise your hardware with MIDI Clocks.
    • Synchronize effortlessly with other tools or players using the Link Protocol.


  • Very recent Python version (3.10 or 3.11 are mandatory requirements).
  • SuperCollider and SuperDirt if you want to gain access to the audio backend.
  • A configurable text editor or IDE.
  • Time to install and setup the whole thing :slight_smile:


  • The Sardine Website is the main source of information. It features installation instructions and a full documentation of all the features. Of course it can be better. Feel free to add to it by contributing.