About Services Tools Blog Contact us

Long-Form Generative MIDI Performance

Plays a multi-hour generative set to a hardware synthesiser and a drum machine, with a local Ollama model (Gemma) steering tempo, scale and density.

  • Music Generation
  • Media production
  • Tool
  • Productised
  • Local/private
  • 2026

The problem

A long ambient set takes too long to sequence by hand, and a fixed loop does not develop. The instruments were already in the room. What was missing was a player who could keep changing the music for hours.

What it does

You give it a theme, a duration and a MIDI port. A director asks the Gemma model through Ollama to reshape tempo, scale and density over the running time, and a rule-based drift takes over if the model fails. Notes go out over USB, one channel to the synthesiser and the drum channel to the drum machine using its standard drum layout. A one-minute practice run plays with the model switched off, so connections can be checked without a full set.

Outcomes

  • The set changes over hours instead of repeating one loop.
  • The synthesiser and the drum machine play on separate channels.
  • If the model is down, the set keeps playing on the rule-based drift.
  • A practice run checks the connections without starting a long performance.

Simplified mockup

Interactive preview with sample data. Nothing is sent to a server.

Two-hour set Model on

Clock
0:00:00
of 2:00:00
Tempo
56
bpm, drifting
Scale
Dorian
colour tone highlighted
Channels
1 + 10
synth · drums
Theme
Synth ch 1 Drums ch 10 USB MIDI 1 · factory drum map

Thirty two seconds of the engine with the model off, rendered on this machine. USB MIDI is not opened from this page.

Performance
Ready. Nothing has left the page.
Piano roll two bars, then the part develops
0:002:00
F5
Eb5
D5
C5
B4
Bb4
Ab4
F4
Kick
Snare
Hat
Playing now Arrives as the set develops Drum channel

Director arc

Density across two hours
Stretches
AtScaleTempoDensitySource
0:00Dorian56Lowmodel
0:46Dorian62Midmodel
1:12Dorian58Middrift
1:40Aeolian54Lowmodel

The 1:12 stretch is the fallback. The local model did not answer, so the set kept moving instead of stopping.

MIDI ports

Port
USB 1
open on Play
Synth
Ch 1
Drums
Ch 10
factory map
Factory drum map
VoiceNoteChannel
Kick3610
Snare3810
Closed hat4210
Synth pad and lead-1

Dry run prints the plan and does not open USB MIDI. A full set is the only path that arms the instruments.

How it works

  1. Read the theme, the duration and the MIDI connection.
  2. Ask the model for the next stretch of tempo, scale and density.
  3. If that call fails, keep a rule-based drift going so the set does not stop.
  4. Send notes on the synthesiser channel and the drum channel.
  5. Offer a one-minute practice run with the model disabled.

Pipeline

flowchart LR
  Theme[Theme text] --> Plan[Arc plan]
  Plan --> Drift[Harmony drift]
  Drift --> Midi[USB MIDI]
  Midi --> Synth[Synth channel]
  Midi --> Drums[Drum channel]

Sample output

Thirty two second software render of a generated stretch, model off