🎼 Lovelace Music i

Lovelace Music

Description: Realizes Ada Lovelace's vision of algorithmic composition by transforming Bernoulli numbers into musical structures using WebAudio API.
How-to: Set parameters, generate a Bernoulli sequence, and click Play to hear mathematical music. Try the etudes for pre-composed examples!
Modes: Melodic (sign → direction), Rhythmic (magnitude → duration), Harmonic (chords), Timbral (filter modulation)

Algorithmic Composition from Bernoulli Numbers

Ada Lovelace's Vision

"The Analytical Engine might act upon other things besides number... the Engine might compose elaborate and scientific pieces of music of any degree of complexity or extent."
— Ada Lovelace, Note G (1843)

This module realizes Lovelace's prophetic insight: if musical harmony can be expressed symbolically, machines can compose music. Using Bernoulli numbers—mathematical sequences with deep connections to wave synthesis, harmonic analysis, and periodic functions—this engine transforms pure mathematics into sound and rhythm.

Bernoulli Parameters i

Bernoulli Parameters

Sequence Length: How many Bernoulli numbers to calculate (B₀ to Bₙ). Larger values create longer compositions.
Scale: Musical scale to use (Major, Minor, Pentatonic, etc.). Determines which notes are available.
Root Note: Starting note in MIDI format (60 = C4). All notes are generated relative to this root.

Default: 60 (C4)

Audio Parameters i

Audio Parameters

Waveform: Shape of the sound wave (sine = smooth, square = harsh, sawtooth = bright, triangle = mellow).
Tempo: Speed in beats per minute. Slower tempos let you hear each note clearly.
Volume: Playback volume level.

Mapping Mode i

Mapping Modes

Melodic: Sign determines direction (+ = up, − = down), magnitude determines interval size.
Rhythmic: Magnitude controls note duration, creating varied rhythmic patterns.
Harmonic: Generates chords instead of single notes.
Timbral: Modulates filter frequency for timbral variation.

Waveform Visualization

Controls

🎼 Lovelace Etudes i

Lovelace Etudes

Description: Pre-composed sequences exploring different Bernoulli number lengths. Each etude button generates a composition using that specific n value.
Daisy Bell: ⭐ Historic preset — the first song performed by a computer (IBM 704, Bell Labs, 1961).
Tip: Try different etudes to hear how sequence length affects musical structure!

Explore pre-composed motifs where each etude represents a different Bernoulli sequence length.