Sonic Pi

repository·dev·Indexed 10 days ago

https://github.com/sonic-pi-net/sonic-pi

An open-source live coding environment that functions as a musical instrument, designed for both education and professional live performances. It includes features for audio configuration via v5-audio-settings.toml, global code definition through init.rb, and GUI customization. The environment integrates tools like the aubio library for audio analysis and supports real-time video sharing via Spout2 on Windows and Syphon on macOS.

Tokens
102.1K
Snippets
437
Records
605
Agent score
95%

What's inside Sonic Pi

  1. Overview of aubio Python package

    dev

    aubio is a collection of tools for music and audio analysis that integrates the C-based aubio library with NumPy. It provides efficient tools for processing audio signals, including:

    • Reading audio from media files, videos, and remote streams.
    • High-quality phase vocoders, spectral filterbanks, and linear filters.
    • Mel-Frequency Cepstrum Coefficients (MFCC) and standard spectral descriptors.
    • Note attack (onset) detection.
    • Pitch tracking (fundamental frequency estimation).
    • Beat detection and tempo tracking.

    The package is compatible with both Python 2 and Python 3.

  2. Overview of the Syphon framework

    dev

    Syphon is a framework for sharing video and still images with other applications in real-time. It consists of three main components:

    1. Syphon Servers: Used to make frames available to other applications. You can use either SyphonMetalServer or SyphonOpenGLServer.
    2. Syphon Clients: Used to connect to and receive frames from a server. You can use either SyphonMetalClient or SyphonOpenGLClient.
    3. Syphon Server Directory: Used to discover available servers on the system via SyphonServerDirectory.

    Interoperability: Servers and clients are interoperable between OpenGL and Metal. For example, a Metal client can receive frames from an OpenGL server.

  3. Overview of aubio library features

    dev

    aubio is a library designed to label music and sounds by listening to audio signals and detecting events. It is used for tasks such as segmenting sound files before attacks, pitch detection, beat tapping, and producing MIDI streams from live audio.

    Core algorithms and routines include:

    • Onset detection methods
    • Pitch detection methods
    • Tempo tracking and beat detection
    • MFCC (mel-frequency cepstrum coefficients)
    • FFT and phase vocoder
    • Up/down-sampling
    • Digital filters (low pass, high pass, etc.)
    • Spectral filtering
    • Transient/steady-state separation
    • Sound file read/write access
    • Mathematics utilities for music applications
  4. Overview of the vendored Spout2 subset

    dev

    This directory contains a minimal, vendored subset of Spout2, which is a server-side DirectX 11 sender. It is used by Sonic Pi's Publish Window via Spout feature on Windows.

    Unlike the full upstream repository, this subset only includes the SpoutDX (DirectX 11 sender) path. It deliberately omits OpenGL helpers, GL-based wrappers, demos, examples, and the SpoutPanel / SpoutSettings tools.

  5. What is Syphon and how to use it

    dev

    Syphon is an open source technology for macOS that enables real-time sharing of video and still images between different applications.

    This specific repository hosts the Syphon.framework, which is intended for developers who want to integrate Syphon capabilities directly into their own software.

    If you are looking for existing plugins for tools like Quartz Composer, Max/Jitter, or FFGL, you should visit the Syphon Implementations repository instead.

  6. Overview of aubio features

    dev

    aubio is a collection of algorithms and tools designed to label and transform music and sounds. It can process audio by scanning files or listening to live audio signals to detect musical events such as drum hits, note frequencies, or rhythmic tempos.

    Key capabilities include:

    • Onset Detection: Segmenting sound files before attacks.
    • Pitch Detection: Identifying musical notes.
    • Tempo & Beat Tracking: Tapping the beat and tracking tempo.
    • Signal Processing: FFT, phase vocoder, up/down-sampling, and digital filters (low pass, high pass, etc.).
    • Feature Extraction: MFCC (mel-frequency cepstrum coefficients) and transient/steady-state separation.
    • MIDI Generation: Producing MIDI streams from live audio.
    • File I/O: Sound file read and write access.
  7. Introduction to Synths in Sonic Pi

    dev
    In Sonic Pi, a synth (short for synthesizer) is the primary mechanism for creating sound. While physical analog synthesizers can be complex, Sonic Pi provides a simplified interface to trigger and manipulate sophisticated sound generation. This tutorial section focuses on the basics of triggering and manipulating these synthesizers to create music.
  8. Overview of aubio command line tools

    dev

    The aubio library provides several command line tools for audio analysis and manipulation. These are categorized into tools provided by the Python module and additional tools included with the library.

    Python module tools:

    • aubio: Used to estimate and extract descriptors from sound files.
    • aubiocut: Used to slice sound files at detected onset or beat timestamps.

    Additional library tools:

    • aubioonset: Outputs timestamps of detected note onsets.
    • aubiopitch: Identifies the fundamental frequency (pitch) for each frame of input sound.
    • aubiomfcc: Computes Mel-frequency Cepstrum Coefficients (MFCC).
    • aubiotrack: Outputs timestamps of detected beats.
    • aubionotes: Emits MIDI-like notes containing onset, pitch, and duration.
    • aubioquiet: Extracts quiet and loud regions from audio.
  9. Overview of Sonic Pi

    dev
    Sonic Pi is an open-source live coding musical instrument designed for both education and professional performance. It allows users to create music by writing code in real-time, balancing simplicity for beginners with power for professional artists and DJs. It sits at the intersection of Art, Technology, and Education.
  10. What can be translated in Sonic Pi

    dev

    The translation effort focuses on two main areas:

    • Sonic Pi Qt GUI: The desktop application interface. It contains a limited number of message strings and is relatively easy to translate.
    • The Tutorial: A comprehensive, step-by-step guide for new users. This is a large document written in GitHub Markdown, which includes special control character sequences that should be respected during translation.

    Note: The Reference documentation is currently not available for translation.

    Note for Developers: If you are contributing code and need to understand the internal internationalization (i18n) mechanics, refer to the Translation Workflow instead of this guide.

  11. Configure synth envelopes (ADSR)

    dev

    Sonic Pi synths use an envelope to shape the amplitude of a sound over time. The total length of the sound is calculated as attack + decay + sustain + release.

    Envelope Parameters:

    • attack: Time (in beats) to reach attack_level. Default is 0 (or 0.1 for :growl).
    • decay: Time (in beats) to move from attack_level to sustain_level. Default is 0.
    • sustain: Time (in beats) to remain at sustain_level. Default is 0.
    • release: Time (in beats) to move from sustain_level to silence. Default is 1.
    • attack_level, decay_level, sustain_level: The specific amplitude levels reached at each stage. Defaults are typically 1.
    • env_curve: The shape of the curve between levels. Options: 1 (linear), 2 (exponential), 3 (sine), 4 (welch), 6 (squared), 7 (cubed). Default is 2.

    Note: Envelope timing parameters (attack, decay, sustain, release) are scaled with the current BPM and cannot be changed once set for a playing note.