What is Sardine?

For my research project, I chose the live coding platform Sardine. I decided to go with Sardine because it stands out as a relatively new and exciting option built with Python. Sardine is a live coding environment and library for Python 3.10 and above. What sets Sardine apart is its focus on modularity and extensibility. Key components like clocks, parsers, and handlers are designed to be easily customized and extended. Think of it as a toolkit that allows you to build your own personalized live coding setup. It allows the customisation of IO logic, without the need to rewrite or refactor low-level system behaviour.

In its complete form, Sardine is designed to be a flexible toolkit for building custom live coding environments. The core components of Sardine are:

  • A Scheduling System: Based on asynchronous and recursive function calls.
  • A Modular Handler System: Allowing the addition/removal of various inputs/outputs (e.g., OSC, MIDI).
  • A Pattern Language: A general-purpose, number-based algorithmic pattern language.
    • For example, a simple pattern might look like this:
      D('bd sn hh cp', i=i)
  • The FishBowl: A central environment for communication and synchronization between components.

However, configuring and using the full Sardine environment can be complex. This is where Sardine Web comes in. Sardine Web is a web-based text editor and interface built to provide a user-friendly entry point into the Sardine ecosystem. It simplifies the process of writing, running, and interacting with Sardine code.

The Creator: Raphaël Maurice Forment

Sardine was created by Raphaël Maurice Forment, a musician and live-coder from France, based in Lyon and Paris. Raphaël is not a traditional programmer but has developed his skills through self-study, embracing programming as a craft practice. He is currently pursuing his PhD at the Jean Monnet University of Saint-Etienne, focusing on live coding practices. His work involves building musical systems for improvisation, and he actively participates in concerts, workshops, and teaching live coding both in academic and informal settings.

Sardine began as a side project to demonstrate techniques for his PhD dissertation, reflecting his interest in exploring new ways to integrate programming with musical performance. Raphaël’s background in music and his passion for live coding have driven the development of Sardine, aiming to create a flexible tool that can be adapted to various artistic needs.

My Live Demo

To demonstrate Sardine in action, I created a simple piece that highlights its scheduling and pattern language capabilities.

In this code snippet I used two different types of senders (d for Player and D for swim) where Player used for shorthand pattern creation, and @swim used for fundamental mechanism to create patterns.

Sardine in the Context of Live Coding

Sardine builds upon the ideas of existing Python-based live coding libraries like FoxDot and TidalVortex. However, it emphasizes flexibility and encourages users to create their own unique coding styles and interfaces. It tries to avoid enforcing specific ‘idiomatic patterns’ of usage, pushing users to experiment with different approaches to live performance and algorithmic music.

The creators of Sardine were also inspired by the Cookie Collective, a group known for complex multimedia performances using custom setups. This inspired the idea of a modular interface that could be customized and used for jam-ready synchronization. By allowing users to define their own workflows and interfaces, Sardine fosters a culture of experimentation and innovation within the live coding community.

This reading made me realize how much emotion hides in tiny timing details! I never thought a snare drum hit slightly late could create that “laid-back” groove feeling. It’s wild how West African traditions—like stomping/clapping in the ring shout—evolved into modern drumset backbeats.

After reading this paper the idea that “soul” comes from human imperfection stuck with me. Even drum machines today try to fake those micro-delays to sound more “human.” But when tech goes too far , music feels robotic—like it’s missing a body. On the flip side, artists like George Lewis use computers to add new layers of creativity, blending human and machine in improvised jazz. I also found the link between body movement and rhythm fascinating. Bass drum = foot, snare = hand. That connection to dance and ritual explains why groove feels so physical. It’s not just sound; it’s like the music is a body moving.

This made me listen differently. Now I notice how tiny delays or “mistakes” give music its heartbeat. Even pop stars like Madonna try to inject “soul” into electronic beats—but maybe the real magic is already in those micro-moments we feel but don’t always hear.

To define something is to stake a claim to its future, to make a claim about what it should be or become. This makes me hesitate to define live coding.

This quote caught my eye as soon as I started reading the text, it resonated with me because I think it captures the fluid and dynamic nature of live coding. It is fascinating to see live coding not just as a technical practice but as an artistic/creative approach that challenges programming norms. Before this class, I associated the phrase “live coding” with writing efficient code in real time for some work related things. However, now I think of it as an improv performance, something similar to rap freestyles, thus making me rethink the rigid perception of programming.

I found it kind of intriguing how live coding embraces transparency, exposing the thought process behind the code and allowing the audience to witness the creative journey in real time. Of course it comes with some extra pressure on the programmer/artist because everything needs to be done live and mistakes can make the performance a bit awkward. This visibility challenges the traditional black-box approach in tech, where software operates behind the scenes.

Live coding changed the notion of coding for me, now I see coding as an entity that adapts and evolves with me as a potential performer. The more I practice, the more I would be able to create and express via coding. It is safe to say that I started to appreciate coding not just like a tool but as a medium of self-expression.