<h2 align="center">
  <b>Sardine</b>: ✨ Live Coding Library for Python ✨
</h2>
<p align="center"><i>
  Python's missing algorave module. Hackable live coding tool for modern Python (3.10+)
</i></p>

<p align="center">
  <img src=https://img.shields.io/discord/1029399269574193203 />
  <img src=https://img.shields.io/github/license/Bubobubobubobubo/sardine />
  <img src=https://img.shields.io/github/stars/Bubobubobubobubo/sardine />
  <img src=https://img.shields.io/pypi/wheel/sardine-system>
  <img src=https://img.shields.io/pypi/v/sardine-system>
  <img src=https://img.shields.io/pypi/status/sardine-system>
</p>

<p align="center">
  <a href="https://discord.gg/aPgV7mSFZh">Discord</a> |
  <a href="https://sardine.raphaelforment.fr/">Website</a> |
  <a href="https://sardine.raphaelforment.fr/showcase">Examples</a> |
  <a href="https://sardine.raphaelforment.fr/installation/">Installation</a> |
  <a href="https://raphaelforment.fr/">Author</a>  |
  <a href="https://toplap.org/">About Live Coding</a>
  <br><br>
  <p align='center'>
    <a href="https://github.com/bubobubobubobubo/sardine/graphs/contributors">
    <img src="https://contrib.rocks/image?repo=bubobubobubobubo/sardine" />
    </a>
  </p>
</p>

-----------

![Sardine algorave picture](pictures/sardine_intro_picture_repo.png)

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

## Installation

Refer to the [installation section](https://sardine.raphaelforment.fr/installation.html).

## Contributions

Sardine is in its early stages of development, and we're actively seeking contributors to help enhance 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.
Together, we can create an even more powerful tool for musical expression and creativity!
