Jev is TypeSafe AI's decision model. It cannot write a note. Given a state and a list of options it returns one choice with a probability for every option. So we let code do everything that only needs to be legal, and let Jev do the judging: which chord, which note, how long. Every call is recorded, and every song below can be rebuilt on screen call by call, at the speed Jev actually answered.
The demos
Press play on any score; the cursor follows the notes. “Watch it being built in Jev's real time” opens the replay: the empty grid, then the chords landing, then the notes, with Jev's probabilities and raw responses for every call, each taking exactly as long as Jev took (a speed control is there if you want the gist). These were recorded on 22 September 2026 against jev-1.13.0, before the engine gained its rest rule, so a replay can show a rest offered next to a long length; the notes played are the ones Jev chose then.
Jev wrote everything
Content and warm, a summer evening by the river
F major · 88 bpm · AABA · 32 bars, about 87 s · mood: “content and warm, a summer evening by the river”
“Content and warm, a summer evening by the river”: F major at 100% confidence, 88 bpm, a full AABA; the bridge slows to half notes and the tune comes home.
Jev chose mode major (100%), tempo 88 bpm (84%). First phrase: F Bb F Bb F Bb Bb C. 14 chord calls, 48 note calls, about $0.0040; Jev agreed with code's first choice on 38% of notes and 93% of chords.
A minor · 72 bpm · 16-bar period · 16 bars, about 53 s · mood: “wistful, late night”
“Wistful, late night”: minor at 100% confidence, 72 bpm, an all-minor i–iv–v, two long notes a bar.
Jev chose mode minor (100%), tempo 72 bpm (93%), form short_16 (44%). First phrase: Am Dm Em Am Dm Em Dm Em. 7 chord calls, 14 note calls, about $0.0013; Jev agreed with code's first choice on 79% of notes and 86% of chords.
Playful, skipping down the street on a spring afternoon
G major · 120 bpm · AABB · 16 bars, about 32 s · mood: “playful, skipping down the street on a spring afternoon”
“Playful, skipping down the street on a spring afternoon”: major at 100% confidence, 120 bpm, a two-note skip in eighths that never sits down, and a second pair of phrases that lifts it a third.
Jev chose mode major (100%), tempo 120 bpm (84%). First phrase: G C C D. 6 chord calls, 48 note calls, about $0.0037; Jev agreed with code's first choice on 21% of notes and 83% of chords.
Restless, pacing the room at midnight, unable to sleep
E minor · 140 bpm · 8-bar period · 8 bars, about 14 s · mood: “restless, pacing the room at midnight, unable to sleep”
“Restless, pacing the room at midnight, unable to sleep”: E minor at 100%, 140 bpm, and Jev opened on F#dim, the one tense chord in the key, which code had ranked last of seven.
Jev chose mode minor (100%), tempo 140 bpm (68%), form mini_8 (21%). First phrase: F#dim Bm F#dim Bm. 3 chord calls, 16 note calls, about $0.0013; Jev agreed with code's first choice on 19% of notes and 0% of chords.
Eb major · 72 bpm · 16-bar period · 16 bars, about 53 s · mood: “tender, rocking a child to sleep”
“Tender, rocking a child to sleep”: E-flat major, 72 bpm at 95% confidence, two long notes a bar for sixteen bars.
Jev chose tempo 72 bpm (95%). First phrase: Eb Eb Ab Eb Ab Eb Ab Bb. 7 chord calls, 14 note calls, about $0.0013; Jev agreed with code's first choice on 71% of notes and 86% of chords.
The doctrine, borrowed from jev-go: code computes, Jev judges. Jev never generates text or notes. It picks from options that code enumerated, so it cannot write an illegal note, a bar that does not add up, or a chord outside the key. What it can do is prefer.
Setup. Given a mood such as “wistful, late night”, one call asks Jev for the mode (major or minor), the tempo (five bands) and the song form (an 8-bar period, a 16-bar period, AABB, or the classic 32-bar AABA), unless you pinned them. The mood text then rides along in every later call.
Chords, one call per fresh bar. The options are the seven diatonic triads, plus the seventh chords for jazz and bossa. Each option carries facts computed by code: its quality and harmonic function, the root motion from the previous chord and how many tones they share, how usual the move is in songs, and what it does right before the coming cadence. Cadence chords are set by the form. A repeated phrase keeps its model's chords. In the interleaved variant the chord for a bar is decided just before its notes, one bar ahead, so it can see the melody so far.
Notes, one call per note. Code offers the scale tones within an octave of the last note, plus a rest, and the lengths that still fit in the bar. Each pitch says what interval it makes, whether it is a chord tone, whether it resolves a leap, whether it is a new high point, how far it is from the cadence note. Each length says where it starts and ends and whether it syncopates. Jev answers both questions in one call.
Forced moves, no call. The last bar of every phrase holds the closing degree, tonic or dominant. The answering phrase repeats the opening phrase bar for bar except that last bar, and the return repeats the answer. Repetition is what makes sixteen bars of choices sound like a song.
Output is real ABC notation, a JSON trace of every request and response, and a page that renders the score with abcjs, plays it with the chords underneath, and replays the whole composition decision by decision.
What we found
Jev has a preference, and it is consistency. With the same options in front of it, it favours the chord tone, the same rhythm as the last bar, the same chord as the last bar. That gives motifs for free, and it also gives chains: the first bridge we got was seven whole notes, and Jev's probability for “hold again” climbed from 64% to 94% over three bars even when told the previous bars were held. A jazz bridge later sat on C7 for five bars.
So code got two rules of the game. A whole note is not offered in the first bar of a phrase or right after a bar that held one note. A chord root is not offered for a third bar in a row. Everything else is Jev's.
Mood reaches the music. “Wistful, late night” came back minor at 100% confidence and 72 bpm; “playful, skipping down the street” came back major at 100% and 120 bpm in skipping eighths. “Restless, pacing the room at midnight” made Jev open on the diminished chord, the one tense chord in the key, which code's own ranking had put last of seven. In testing, “jazz” walked ii–V–I in sevenths and “bossa nova” split the mode almost evenly, which is fair. Tempo answers are softer, 30% to 90%, so pin the tempo if you care.
Jev is not echoing code's ranking. Code ranks every option with a one-ply score of its own; Jev's pick was code's first choice between 35% and 80% of the time depending on the tune, and the page shows the rank of every pick.
It is fast and nearly free. A call takes about 250 ms and about 1,600 input tokens; a 32-bar AABA is 60 to 80 calls, roughly twenty seconds and half a cent.
Run it yourself
npm test
npm run compose -- --mood "wistful, late night" # Jev picks mode, tempo, form, chords, notes
npm run compose -- --mood jazz --key F # named moods: jazz, bossa nova (seventh chords)
npm run compose -- --chords "C G Am F" --mood "a bright pop chorus" --tempo 120 --form aaba_32
npm run compose -- --mood "triumphant" --order interleaved
npm run serve # http://localhost:3222
Needs Node 22.15+ (for --use-system-ca) and a TypeSafe API key in .dev.vars; without one a seeded mock plays Jev's part so the whole pipeline runs offline. Jev bills input only, $0.042 per million tokens.