Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsMay 27, 2026·4 min de lecture

Sonic Pi — Code-Based Music Creation and Live Performance Tool

A free, open-source live coding synthesizer that lets you create music by writing code in a Ruby-inspired language, designed for both education and professional performance.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Sonic Pi
Commande d'installation directe
npx -y tokrepo@latest install f1ae9e48-59a5-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

Sonic Pi is a free, open-source live coding environment for creating music through code. Developed by Sam Aaron at the University of Cambridge, it uses a Ruby-inspired domain-specific language for real-time audio synthesis and sample playback. It was originally designed to teach programming through music but has grown into a tool used by professional musicians for live performances and studio composition.

What Sonic Pi Does

  • Provides a code editor that generates real-time audio from a Ruby-inspired DSL
  • Includes a library of built-in synthesizers, samples, and effects (reverb, distortion, filters)
  • Supports live loops that can be modified and re-evaluated while music plays
  • Sends and receives MIDI and OSC messages for integration with hardware and other software
  • Ships with a comprehensive built-in tutorial covering both coding and music concepts

Architecture Overview

Sonic Pi consists of a GUI editor frontend, a Ruby-based language server, and SuperCollider as the audio synthesis backend. When the user writes code and presses Run, the language server evaluates the Ruby DSL and sends OSC messages to SuperCollider, which renders the audio in real time. Live loops are implemented as named threads that can be hot-swapped without stopping playback. A timing system based on logical time ensures rhythmic precision regardless of system latency. MIDI output is handled through a separate MIDI subsystem.

Self-Hosting & Configuration

  • Download installers for Windows, macOS, Linux, and Raspberry Pi from sonic-pi.net
  • On Linux, install via package manager or build from source using the provided CMake scripts
  • Configure audio output in Preferences (ALSA, JACK, PulseAudio, or CoreAudio)
  • Set MIDI devices in the IO panel to send or receive MIDI from external hardware
  • Enable OSC in settings to communicate with other live coding tools or visual software

Key Features

  • Hot-swappable live loops allow real-time music modification during performance
  • Built-in synthesizers (FM, subtractive, additive, wavetable) with parameter control
  • Time-stretching and slicing of audio samples for beat manipulation
  • MIDI and OSC support for controlling hardware synths and receiving external input
  • Cross-platform with dedicated support for Raspberry Pi for low-cost music education

Comparison with Similar Tools

  • TidalCycles — Haskell-based live coding for pattern-oriented music; Sonic Pi uses Ruby syntax which is more accessible to beginners
  • SuperCollider — the audio engine Sonic Pi uses internally; SuperCollider requires learning its own sclang language, while Sonic Pi wraps it in a friendlier DSL
  • Overtone — Clojure-based music programming; Sonic Pi provides a more self-contained environment with a built-in editor and tutorial
  • FoxDot — Python live coding for music; Sonic Pi offers a richer set of built-in synths and tighter timing guarantees
  • Scratch — visual block-based coding for kids; Sonic Pi bridges the gap to real text-based programming through music

FAQ

Q: Do I need to know how to code to use Sonic Pi? A: No. The built-in tutorial teaches programming from scratch using music as the motivator.

Q: Can I use my own audio samples? A: Yes. Place WAV or FLAC files in a folder and load them with the sample command using the file path.

Q: Is Sonic Pi suitable for live performance? A: Yes. It has been used in concerts and festivals worldwide. Live loops and hot-swapping make it reliable for real-time shows.

Q: Does it support recording? A: Yes. You can record the output directly to a WAV file from within Sonic Pi.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires