Carmen Variations — Layered NoteSequences


Overview

  • Uses Magenta’s browser SoundFont player to schedule a multi‑layer rendition inspired by Habanera. All parts are written into a NoteSequence with start/end times derived from beats and current tempo.

Parts

  • Bass ostinato: Long‑short‑long‑short cell in D minor; occasional octave jumps and velocity variance add life.
  • Melody phrase: A two‑bar motif repeats with small transpositions and ornaments controlled by a variation percentage.
  • Harmonies: Dyads/triads under the melody locked to the diatonic collection.
  • Arpeggios: Broken chords providing motion after the theme is established.
  • Canon/counter‑melody: Staggered entries echo the tune at offsets, creating a simple round.

Controls

  • Tempo: QPM slider affects beat→seconds conversion when constructing sequences.
  • Variation: Probability gates add transpositions, grace notes, octave leaps, and duration jitter.

Flow

  • First play lazily loads the piano SoundFont; subsequent plays reuse buffers. A log panel shows part starts and scheduling events.

Ideas

  • Add key changes, reharmonizations, or user‑selectable modes (natural/harmonic minor). Export to MIDI via NoteSequence serialization.