Bubobubobubobubo/sardine

Python's missing "algorave" module. Live code music with Python using MIDI, OSC and/or SuperCollider.

Python

324

1,928 commits

updated May 19, 2025

See the code

README

Sardine: ✨ Live Coding Library for Python ✨

Python's missing Algorave module. Hackable live coding tool for modern Python (3.10+)

Discord | Website | Examples | Installation | Author | About Live Coding | Live Coding France

Buy Me a Coffee at ko-fi.com


Sardine algorave picture

Sardine is a versatile and user-friendly Python library designed for musical improvisation, algorithmic composition, and more. It turns your standard Python interpreter into a powerful musical instrument, allowing 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 or in the studio

    • Seamlessly communicate with any MIDI/OSC device and the SuperCollider audio engine using Sardine.
    • Utilize bindings for SuperDirt, a widely recognized audio engine embraced by live coders globally.
  • Python code but with time/tempo-awareness

    • 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 kind of data!
  • Develop intricate audiovisual performances 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.

Installation

Refer to the installation section.

Contributions

Sardine is in its early stages of development, and we're actively seeking contributors to help the project. If you're passionate about music and technology, we welcome your expertise, whether it's code, documentation, or ideas. We are looking for contributors!

To collaborate with the Sardine community, connect with us on Discord, Github or send a private message if you have specific inquiries.

Generating documentation

Sardine documentation is using mdbook. You first need to have Rust properly installed.

cargo install mdbook
mdbook serve --open

You should have the documentation automatically opened in your browser at http://localhost:3000/.

algorave
algorithmic-music
audio
improvisation
live-coding
midi
music
musicology
open-source
osc
patterns
python
sequencer
synthesis
toplap

Contributors

Bubobubobubobubo

1,268 commits

thegamecracks

487 commits

HighHarmonics2

42 commits

mugulmd

21 commits

Bubobubobubobubo/sardine

Python's missing "algorave" module. Live code music with Python using MIDI, OSC and/or SuperCollider.

Python

324

1,928 commits

updated May 19, 2025

See the code

README

Sardine: ✨ Live Coding Library for Python ✨

Python's missing Algorave module. Hackable live coding tool for modern Python (3.10+)

Discord | Website | Examples | Installation | Author | About Live Coding | Live Coding France

Buy Me a Coffee at ko-fi.com


Sardine algorave picture

Sardine is a versatile and user-friendly Python library designed for musical improvisation, algorithmic composition, and more. It turns your standard Python interpreter into a powerful musical instrument, allowing 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 or in the studio

    • Seamlessly communicate with any MIDI/OSC device and the SuperCollider audio engine using Sardine.
    • Utilize bindings for SuperDirt, a widely recognized audio engine embraced by live coders globally.
  • Python code but with time/tempo-awareness

    • 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 kind of data!
  • Develop intricate audiovisual performances 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.

Installation

Refer to the installation section.

Contributions

Sardine is in its early stages of development, and we're actively seeking contributors to help the project. If you're passionate about music and technology, we welcome your expertise, whether it's code, documentation, or ideas. We are looking for contributors!

To collaborate with the Sardine community, connect with us on Discord, Github or send a private message if you have specific inquiries.

Generating documentation

Sardine documentation is using mdbook. You first need to have Rust properly installed.

cargo install mdbook
mdbook serve --open

You should have the documentation automatically opened in your browser at http://localhost:3000/.

algorave
algorithmic-music
audio
improvisation
live-coding
midi
music
musicology
open-source
osc
patterns
python
sequencer
synthesis
toplap

Contributors

Bubobubobubobubo

1,268 commits

thegamecracks

487 commits

HighHarmonics2

42 commits

mugulmd

21 commits

Languages

Python

82.9%

HTML

14.8%

TeX

2.1%