SOMA23 ENGINEWeb app · work in progress

SOMA23ENGINE

Sample banks in, an Ableton Live project out. You pick a style and draw an energy curve; the engine writes the arrangement, the MIDI patterns and the .als, with the sounds copied next to it, and it explains every one of its decisions.

A web app for my own use, not online yet · projects for Ableton Live 12 · nothing to download

SOMA23 ENGINE Arrangement Studio with the prototype open: the 17 tracks sorted into 5 groups (DRUMS, BASS, SYNTHS, ATMOSPHERES, FX) over 216 bars, under the sections Intro, Groove A, Groove B, Groove C, Break, Build-up, Drop, Peak, Groove D and Outro

Arrangement Studio with the prototype open · the app run locally for this page

The prototype, bar by bar

Ten sounds from a free pack, the Raw Deep Hypnotic style, 145 BPM, 6 minutes and an energy curve: this is what the engine made of them. Press play: the timeline follows the music, and the log shows each decision as you hear it.

0:00 / 6:01
Introbar 1
E minor · 145 BPM · seed 23

The audio could not be loaded. Reload the page to try again.

Prototype timeline: time, sections, wanted and actual energy curves, and the clips of the 17 tracks over 216 bars 0:00 0:30 1:00 1:30 2:00 2:30 3:00 3:30 4:00 4:30 5:00 5:30 TIME SECTIONS Intro · bar 1–24 · average energy 29 % Intro Groove A · bar 25–56 · average energy 47 % Groove A Groove B · bar 57–88 · average energy 60 % Groove B Groove C · bar 89–112 · average energy 55 % Groove C Break · bar 113–128 · average energy 33 % Break Build-up · bar 129–144 · average energy 58 % Build-up Drop · bar 145–152 · average energy 88 % Drop Peak · bar 153–168 · average energy 84 % Peak Groove D · bar 169–200 · average energy 67 % Groove D Outro · bar 201–216 · average energy 25 % Outro ENERGY 100% 50% 0 DRUMS Kick MIDI automation: low cut Hi-Hats MIDI Main Percussion MIDI Percussion 1 audio automation: volume Hats Loop audio Percussion 2 audio Cymbals audio BASS Main Bass MIDI automation: filter Bass Loop audio SYNTHS Synth 1 MIDI automation: filter Sequences audio automation: high cut ATMOSPHERES Texture audio automation: volume Drone audio automation: volume FX Impacts audio Risers audio Downlifters audio Transitions audio
  • wanted energy (the drawn points)
  • actual energy, recomputed from what plays
  • clip; bars: MIDI notes per bar
  • automation (filter, volume, low cut)

The engine's log

51 lines, translated from the French · click a line to jump there
216 barsa 5:58 track; the render itself runs 6:01
17 tracks5 MIDI and 12 audio, in 5 groups; 24 in Live with the groups and the 2 returns
99 clipsand 5,082 MIDI notes written one by one
15 + 4 sounds15 taken from the pack's 10 files, 4 made by the engine: riser, impact, downlifter, transition

The sound. This render comes from the app's own engine: it replays the sounds, Drum Racks, warped loops, filters, sends and effects, but it approximates Live's Wavetable synth with a subtractive synth. The reference sound is the project opened in Live 12.4.16, where it opens without errors.

The curve. Mean gap between wanted and actual energy: 0.073 on a 0 to 1 scale; correlation 0.926.

The sounds. They come from Shed Skin's “FREE Hypnotic Techno Sample Pack”. The Live project and its sounds are not available for download.

Five steps, from sample bank to .als

The engine applies hand-written rules for each style to the sounds you give it. Every step is visible in the app, and can be reworked by hand.

01 · LIBRARY
Each sound is copied as is, with its fingerprint, then analysed: family (13 categories), BPM locked to the grid of attacks, key, fundamental, length, transients, band spectrum, dynamics. Drum loops are sliced into one-shots, to be replayed as MIDI in Drum Racks.
02 · ENERGY CURVE
You draw it, or start from a template. The engine reads it phrase by phrase and derives the sections: intro, build-up, groove, break, drop, peak, outro. You can also draw the zones yourself.
03 · ARRANGEMENT
Each role (kick, hats, percussion, basses, synths, textures, drone, effects) has its own entry and exit thresholds by energy, forbidden sections and a minimum time on stage. How many elements enter per phrase follows the gap between the wanted energy and what is already playing. A log explains every decision.
04 · MIDI
Patterns are written note by note for each style: kick, hats, Euclidean and polyrhythmic percussion, rolling basses, polymetric hypnotic motifs, acid, stabs, arpeggios. With swing, humanisation, velocities, note probabilities (Live 11 and later), variations over 1, 4, 8, 16 and 32 bars, and transitions: kick cut before a drop, fills.
05 · EXPORT
A self-contained folder: the .als, the copied sounds, the sounds made by the engine, one .mid per track, the .wav render and FLAC stems, the notes and the arrangement as JSON. Plus a ZIP of the lot.

Rules, not a black box

The full name says “AI Underground Music Engine”. Yet there is no neural network and no language model inside: hand-written style profiles, thresholds, rules. And a deterministic engine: same sounds, same settings, same seed, same project.

Checked for this page. Run again locally with the prototype's settings and seed 23, the app wrote the same track: the 99 clips, the 5,082 notes and the 51 log lines, identical. The screenshots on this page come from that run.

The prototype's log, above, shows these rules at work: every entry, every exit, every hand-over is written down with the energy of the moment and the section.

Free description

You can also write whatever you want, in French or English. Rules turn it into settings; the app shows what it understood and ignores the rest. The example sentence from the screen (in French), and the app's answer:

une track tribe mentale à 148 BPM, très hypnotique, avec des percussions organiques, des kicks secs et puissants, des textures industrielles, une progression lente sur 6 minutes, un break central et une reprise brutale
  • “tribe mental”style Tribe Mental
  • “148 bpm” · “6 minutes”148 BPM · 6 min
  • “très hypnotique”hypnosis 90%
  • “brutal / puissant”aggressiveness 75%
  • “sombre / mental”darkness 80%
  • “répétitif / évolution lente”variation 30%
  • percussion · kick · texturesorganic · dry · industrial
  • “un break”, slow, central, brutalenergy curve drawn

A few rules, as seen in the prototype

No kick in a break. Each role has forbidden sections: in the prototype's break, kick, bass, hats and percussion leave, and Synth 1 comes back alone, filtered, over the atmospheres.

The basses never play together. During the peak, the Bass Loop takes the Main Bass's place, then hands it back at bar 169.

No flickering. An element enters above an energy threshold and only leaves below a lower one; in Raw Deep it stays at least 16 bars, unless a section forbids it.

The number of entries follows the slope. A gentle rise brings in one element per phrase, a steep one several at once: in Groove A, elements arrive one by one, every 8 bars; at the drop, three enter together.

Atmospheres move away from the low end. At bar 41, when the Main Bass enters, the texture's low cut goes from 30 to 220 Hz, the drone's from 30 to 140 Hz.

Before a drop, the kick cuts out. An 8-bar rise, then an impact on the first beat of the drop.

Rising energy changes the music, not just the volume: active tracks, pattern density, accents, filters.

Everything is tuned. The key is voted by the tonal sounds (E minor); the texture, in C# minor, goes up 3 semitones; the kick, whose fundamental sits at 51.8 Hz, goes down 4 semitones, towards E.

A 20-minute set, on two decks

The Live Set Generator chains parts of a few minutes, played in turn on two sets of tracks, A and B, like two decks: they overlap during transitions, kick and bass swap halfway through, and the tempo glides from one part to the next. The test set: 20 minutes, from Raw Deep Hypnotic to Tribe.

Overview of the 20-minute set: sections, parts on decks A and B, tempo, energy curves and the clips of the 31 tracks 0:00 · bar 1 6:19 · bar 225 12:45 · bar 465 19:56 · bar 744 TIME SECTIONS S01 Intro · bar 1–40 · average energy 29 % Intro S01 Groove A · bar 41–72 · average energy 44 % S01 Groove B · bar 73–104 · average energy 52 % S01 Groove C · bar 105–136 · average energy 58 % S01 Groove D · bar 137–168 · average energy 49 % S01 Groove E · bar 169–200 · average energy 47 % S01 Groove F · bar 201–224 · average energy 59 % S02 Groove A · bar 225–256 · average energy 52 % S02 Groove B · bar 257–288 · average energy 62 % S02 Groove C · bar 289–320 · average energy 58 % S02 Groove D · bar 321–352 · average energy 66 % S02 Groove E · bar 353–384 · average energy 67 % S02 Groove F · bar 385–416 · average energy 44 % S02 Groove G · bar 417–448 · average energy 51 % S02 Groove H · bar 449–464 · average energy 63 % S03 Groove A · bar 465–496 · average energy 59 % S03 Groove B · bar 497–528 · average energy 72 % S03 Groove C · bar 529–560 · average energy 68 % S03 Groove D · bar 561–584 · average energy 76 % S03 Peak A · bar 585–616 · average energy 86 % Peak A S03 Peak B · bar 617–640 · average energy 83 % Peak B S03 Groove E · bar 641–672 · average energy 74 % S03 Groove F · bar 673–704 · average energy 60 % S03 Outro · bar 705–744 · average energy 38 % Outro DECK ADECK B 1 · Raw Deep Hypnotic Techno · 142 BPM 2 · Tribe / Tekno Tribe · 149 BPM 3 · Tribe / Tekno Tribe · 156 BPM transition : bar 225–256 transition : bar 465–496 TEMPO (BPM) 142 149 156 ENERGY 100% 50% 0 TRACKS A17 A Cymbals A Hi-Hats A Hats Loop A Kick A Percussion 1 A Percussion 2 A Main Percussion A Bass Loop A Main Bass A Sequences A Synth 1 A Drone A Texture A Downlifters A Impacts A Risers A Transitions TRACKS B14 B Cymbals B Hi-Hats B Hats Loop B Kick B Percussion 1 B Percussion 2 B Main Percussion B Main Bass B Sequences B Synth 1 B Drone B Texture B Downlifters B Transitions
  • tempo
  • transition: both decks play (32 bars)
  • wanted energy
  • actual energy
  • peak
3 parts19:56 · Raw Deep Hypnotic on deck A, then Tribe on B, then Tribe on A
142 → 156 BPM142, 149, then 156 BPM, gliding during the transitions; D# minor
31 tracks10 MIDI and 21 audio; 38 in Live with the groups and returns
422 clipsand 28,441 MIDI notes

It opens in Live 12.4.16 with no errors in Live's log, with all its sounds found next to the .als. It follows the energy curve less closely than the 6-minute track: mean gap 0.185, correlation 0.874. No audio excerpt of the set on this page.

Three styles worked on, nine variants

A style is a profile: tempo range, pace of change, entry thresholds for each role, patterns, length and content of the breaks.

Raw Deep Hypnotic

138–150 BPM · 145 by default

Slow evolution: on a gentle rise, one new element per 8-bar phrase, which then stays at least 16 bars; motifs mutate every 32. Light swing, offbeat, rolling or hypnotic basses, polymetric motifs. In the break, the synth enters alone, filtered.

Tribe / Tekno Tribe

160–185 BPM · 172 by default

Always on the move: on a gentle rise, two new elements per phrase; accents and fills every 4 bars, mutations every 8. Half-time kick in the intro and ghost notes, polyrhythmic percussion (3, 5, 7) with rolls, galloping bass. The short break keeps the percussion.

Hard Techno

145–160 BPM · 152 by default

Breaks and ruptures: on a gentle rise, two new elements per phrase; mutations every 16 bars, little humanisation. Half-time kick in the intro, clap, heavy offbeat bass, stabs. A break of 8 to 16 bars.

The variants

VARIANTTEMPOBASED ONWHAT CHANGES
Industrial Techno135–150Hard Technostabs and polymetric motifs
Acid Techno135–150Raw Deep Hypnoticacid bass
Mental Techno150–175Tribe“mental” loops, mutations every 16 bars
Minimal Techno124–134Raw Deep Hypnoticsparser percussion
Dark Techno128–142Raw Deep Hypnoticmotifs and stabs, darker settings
Hardtek175–195Tribeharder-hitting kick
Tribe Mental170–190Tribe“mental” loops
Psy Techno138–146Raw Deep Hypnotictriplet bass, “mental” loops
Experimental Electronic110–150Raw Deep Hypnoticexperimental motifs, 3, 5 and 7 polyrhythms

Curve templates for a track: slow hypnotic rise, two peaks with a central break, long atmospheric break, hypnotic plateau (DJ tool), central break and brutal drop. For a 60 to 180-minute set: Hypnotic Journey, Underground Peak Time, Raw Tribe Experience, Industrial Assault, Dark Progressive Journey.

On screen

Nine screens. Screenshots of the app run locally with the prototype: nothing is mocked up. The interface is in French.

Arrangement Studio: the whole prototype, 17 tracks in 5 groups, sections, volumes, mute and solo
Arrangement Studio. The whole track: move, resize, duplicate, split, solo, mute, volume, sections, partial regeneration, versions.
Energy Curve Editor: wanted curve with its points, curve generated by phrases and computed actual curve, and the list of sections read by the engine
Energy Curve Editor. The wanted energy (points), the energy read by phrases, the actual energy; regenerate with another curve.
MIDI Studio: piano roll of the Synth 1 motif in Groove B, 256 notes on three pitches, with velocities
MIDI Studio. The Synth 1 motif in Groove B, 256 notes: quantise, swing, length, repeat, regenerate a sequence, export .mid.
Sample Library: the Shed Skin pack sounds with waveform, category, BPM, key and length, and the one-shots sliced from the loops
Sample Library. Imported and analysed sounds, one-shots sliced from the loops; everything can be corrected by hand.
Track Generator: style, tempo, length, key, seed and eleven settings, from overall energy to transition intensity, and the free description
Track Generator. Style, tempo, length, key, seed and eleven settings, from rhythmic complexity to transition intensity.
Live Set Generator: length from 60 to 180 minutes, style journey, start and end tempo, part length, transitions, and the Hypnotic Journey energy curve
Live Set Generator. From 60 to 180 minutes: the order of styles, start and end tempo, length of the parts and transitions.

← scroll →

DASHBOARD
The library by category, recent projects, running jobs (analysis, composition, render, export).
SAMPLE LIBRARY
Import WAV, AIFF, MP3, FLAC, OGG, MIDI and ZIP, file by file or by folder; automatic analysis, filters, preview, corrections.
TRACK GENERATOR
A track (mode A), or an arrangement from a selection of sounds (mode C); settings, free description, energy curve.
LIVE SET GENERATOR
A 60 to 180-minute set (mode B), in parts alternating on two decks.
ARRANGEMENT STUDIO
The multitrack timeline, listening to the mix or the stems, comparing versions, partial regeneration.
MIDI STUDIO
The piano roll: notes, velocities, quantise, swing, length, motif repeat, regeneration, .mid export.
ENERGY CURVE EDITOR
The three curves and the sections read by the engine; a new curve recomposes the track.
PROJECTS
Exports: .als, ZIP, WAV, stems, MIDI, with or without audio render.
SETTINGS
Target loudness for renders, default style, tempo and seed; the state of the system and of the Live template.

What comes out: a folder Live opens

An .als file is compressed, undocumented XML, and Live rejects a file whose structure strays from what it expects. So the engine invents nothing: it starts from a project saved by Live, and every generated track, clip or device is a copy of an element of that template with new values: name, colour, notes, sound, loop, volume.

Then: automation IDs renumbered, sounds referenced with their exact size, date and length, relative paths so the folder stays valid once moved or unzipped. A validator checks the structure, then comes the real test: opening the project in Live and reading its log. No project is called valid without that test.

Under the hood

The engine

Python 3.13 and FastAPI. Analysis with librosa, NumPy, SciPy, SoundFile, pyloudnorm and FFmpeg; Rubber Band to stretch tonal sounds at render time. Long jobs run in the background.

PostgreSQL 16 on the server, SQLite for development.

The interface

React, TypeScript, Vite and Tailwind; nine screens.

The arrangement, as versioned JSON, is the single source of truth: the editor changes it, the .als, .mid and .wav exports read it. Regenerating a track means rewriting its clips and keeping the rest.

The server

Docker Compose: the app listens locally on port 8023, PostgreSQL in its own container, memory capped at 5 GB. Nginx publishes it behind a password, with imports up to 4 GB.

Written, not yet built or online.

Where the project stands

PHASECONTENTSTATUS
1Study of the .als format, architecturedone
2Import (WAV, AIFF, MP3, FLAC, OGG, MIDI, ZIP) and analysisdone, tested
3MIDI pattern generatordone, tested
4Evolving arrangementdone, tested
5Energy curve: wanted, generated, actualdone, tested
6Writing the .alsdone, opened in Live 12.4.16
7Web interface, nine screensdone
8Exports and testsdone
9Musical tuning, by earto do

Checked

  • The prototype and the 20-minute set open in Live 12.4.16 with no errors in Live's log; every referenced sound is found next to the .als.
  • 15 automated tests (analysis, import, ZIP, MIDI, patterns, arrangement, partial regeneration, set, .als export, render, API) pass on SQLite and on PostgreSQL 16; run again for this page on SQLite, they pass.
  • The full path in the browser: free description, generation, splitting and moving clips, saving a version, adding a note in the piano roll, regenerating a sequence, export.
  • For this page: the app run again locally rewrites the prototype identically, note for note.

Not yet, or to be confirmed

  • Live 11: a project written for Live 12 does not open in Live 11. It needs a template saved by Live 11, and a test.
  • Docker: the files are written, the image is not built yet. Render times on the server are still to be measured.
  • The app's audio render approximates Live's Wavetable synth; the reference sound is Live's.
  • 4/4 time only.
  • No user accounts: access goes through the Nginx password.
  • Imported MIDI files are analysed and filed, but are not yet used as material by the generators.
  • Partial regeneration of a set: for now, the whole part is regenerated.
  • Musical quality is tuned by ear (phase 9), and that listening is still to be done.
  • The Live template comes from a commercial template: to be rebuilt from a blank project before the app is ever distributed.

Sounds in the prototype and the set: Shed Skin's “FREE Hypnotic Techno Sample Pack”. Ableton and Live are trademarks of Ableton AG; SOMA23 ENGINE is an independent project with no connection to Ableton. Michroma font: SIL Open Font License.