home/ modules/ python-live-coding-with-renardo-and-sardine

Python live coding with Renardo

  • learner can drive SuperCollider from Python players with patterns and attributes
  • learner can use scale degrees, chords, tunings and stochastic patterns
  • learner can automate arrangement with time-varying values and multi-backend routing

Live-code a Python (Renardo) set: players sending SynthDefs via >>, patterned attributes and stochastic patterns, Roman-numeral chords and just-intonation tuning, arrangement automated with var()/linvar and eclipse/fadein, routed to a chosen backend.

This module builds toward performing a full live-coded set from a Python editor — the algorave scenario where your rig is a laptop running Renardo over a booted SuperCollider server, and the audience hears every edit the moment you evaluate it. Python live coding trades TidalCycles’ Haskell mini-notation for familiar imperative syntax, which makes it the natural entry point for Python programmers into performance, and its multi-backend routing means the same set can drive scsynth, REAPER, Ableton Live, or hardware MIDI.

The arc starts supported: get SuperCollider installed and booting before Renardo (the classic silent-startup trap), then drill the core gesture — assigning a SynthDef to a player with the >> operator and shaping it with attributes like dur, amp, and sus, plus play() string patterns for drums. These moves must become automatic; they are the typing you do continuously on stage. From there, musicality layers in: scale-degree pitch values instead of MIDI numbers, PGroups and Roman-numeral chord constants for progressions, just-intonation tuning for purer chords, and stochastic generators like PRand and PWhite for parts that never repeat identically. Finally, arrangement becomes code: var() steps chord roots per section, linvar() sweeps filter cutoffs, and .eclipse()/.fadein() let layers breathe without manual muting — culminating in the unsupported capstone set routed to your chosen backend.

Every required atom is something the capstone breaks without: sound won’t start, chords won’t voice, or the arrangement won’t move on its own. Supporting atoms enrich the practice — the wider scale library, microtonal degrees, Pvar structural switching, effect internals, startup files, the orientation fact that Renardo supersedes FoxDot, and the Sardine framework as a contrasting Python live-coding paradigm worth knowing once the Renardo workflow is solid.

Atoms in this module

Required — these gate the capstone

FoxDot and its fork Renardo live-code music in Python using SuperCollider as the audio engine
Concept L2 First instrument FN
Renardo requires SuperCollider installed and bootable separately before it can produce sound
Procedure L2 First instrument FN
Renardo players receive SynthDef instructions via the `>>` operator and play patterns continuously
Procedure L2 First instrument F
Renardo player attributes (`dur`, `amp`, `pan`, `sus`, `oct`) control timing and expression per note
Concept L2 First instrument F
Renardo Patterns are cyclic sequences that support arithmetic, slicing, and algorithmic manipulation
Concept L2 First instrument F
Renardo's `play()` instrument uses a string of characters to define a rhythmic sample pattern
Procedure L2 First instrument F
Renardo uses scale degree integers (not MIDI notes) as pitch values, converted via `Scale.default`
Concept L2 First instrument FA
PGroups in Renardo trigger multiple notes simultaneously on a single beat as a chord
Concept L2 First instrument FA
Renardo pre-defines Roman numeral chord constants I–VII as PGroups for quick chord progressions
Fact L2 First instrument FA
Renardo supports just intonation as an alternative tuning system via `Tuning.just` on any scale
Fact L3 Craft FAB
Renardo's PRand, PChoice and PWhite generate stochastic values that re-roll each cycle
Concept L3 Craft F
Renardo's `var()` creates a time-varying value that switches between states at bar-aligned boundaries
Concept L3 Craft F
Renardo's `linvar()` interpolates values linearly across its duration, unlike the step-wise `var()`
Concept L3 Craft F
Renardo's `lpf` and `hpf` attributes apply per-note low-pass and high-pass filters directly on players
Procedure L2 First instrument FB
Renardo's `.fadein(n)` method ramps amplitude from 0 to full over n beats
Fact L2 First instrument F
Renardo's `.eclipse(dur, every, offset)` periodically silences a player for automatic arrangement breaks
Fact L3 Craft F
Renardo supports SuperCollider, REAPER, Ableton Live, and MIDI as swappable audio backends
Fact L2 First instrument FN

Supporting — enrichment, not gating

Renardo is the actively maintained successor to FoxDot for Python live coding over SuperCollider
Fact L0 Orientation F
Renardo ships a large built-in scale library covering modes, bebop, world, and symmetric scales
Fact L2 First instrument FA
Renardo supports microtonal pitches as floating-point scale degrees interpolated between semitones
Fact L3 Craft FB
Renardo's `Pvar` makes entire Patterns switch over time, enabling structural variation between cycles
Concept L3 Craft F
Renardo's `Ring` cycles through its elements indefinitely when called, unlike a one-shot list
Concept L3 Craft F
Renardo defines audio effects as SC SynthDefs in Python using an `effect_manager` DSL, then exposes them as player attributes
Concept L3 Craft FB
Renardo's TempoClock pre-queues events 0.25 seconds early to compensate for processing latency
Concept L3 Craft F
Renardo's gatherer module enables downloading sample packs and instrument chains from a community server
Fact L2 First instrument FN
Renardo startup files run automatically on launch to pre-configure the session environment
Procedure L2 First instrument F
Renardo 1.0 replaces the legacy Tkinter editor with a browser-based Svelte web client as its default interface
Fact L1 Foundations FN
Renardo's REAPER backend controls instruments via OSC, enabling DAW-quality effects without SuperCollider
Concept L3 Craft FN
Renardo's Ableton backend can automate parameters with TimeVar at up to 300Hz via AbletonOSC
Fact L3 Craft FN
Renardo's VRender extension converts note sequences and lyrics into a vocal WAV via sinsy.jp singing synthesis
Fact L3 Craft F
Sardine turns Python into a time-aware live coding instrument by making function evaluation immediate and hot-reloadable
Concept L2 First instrument F
Sardine Players (Pa–PZ) are the core scheduling unit: each holds a looping pattern that runs against the global clock
Concept L2 First instrument F
Sardine's live coding relies on a REPL: evaluate-and-update any code while the scheduler keeps running
Procedure L2 First instrument F
Sardine embeds three distinct pattern mini-languages (Sardine PL, Ziffers, Vortex) selectable per player
Concept L3 Craft F