Generate Random Music with AI
Moss Music is a deterministic music generator that runs entirely in your browser. Roll the dice for a five-part arrangement — melody, harmony, chords, bass and drums — shaped over a song form you pick, then edit it in the piano roll or read it as staff notation. Export MIDI, MusicXML, WAV or JSON: no sign-up, and the same seed always rebuilds the same piece.
Moss Classical · c7f3a9
96 BPM · C Major
Style
Classical
Parts
5 · incl. drums
Form
Pop · climax arc
What you can do with Moss Music
Every tune is a seed you can hold on to. The engine hashes that short string into a 32-bit number and drives a mulberry32 generator from it, so the same seed with the same settings rebuilds exactly the same piece, note for note. Each of the five parts draws from its own derived random stream, which is why switching the drums on never shifts the melody.
Melody, harmony, chords, bass and drums are generated as five independent parts. A song form — pop, ABAB, ballad or through-composed — splits your bar count into intro, verse, chorus, bridge and outro, and every section can carry its own subset of parts, so the drums can sit out the intro and come back on the chorus.
Every part is editable, not just the melody: drag notes and velocities in the piano roll, or read the whole piece as staff notation with the clef, key signature and time signature drawn on each staff. Undo and redo, set a loop region, or re-roll just the bars you dislike — the parts you did not touch keep their original notes.
The chat agent never invents notes: it calls the composition engine with parameters such as style, key, scale, tempo, length, time signature, energy and chord complexity, then plays, pauses, stops and swaps the instrument for you. Because the engine is deterministic, anything the agent produces is reproducible from its seed.
What you export is a project, not a recording: MIDI with all five parts on separate tracks, MusicXML, a ZIP of per-part stems, a print-ready score, 16-bit WAV rendered offline, and JSON carrying the seed and every setting. MIDI import closes the loop — export it, rewrite it in a DAW, bring it back as an editable piece.
Because generation is deterministic, a share link only has to carry the recipe — 23 settings, encoded in the URL — rather than thousands of notes. Send someone the link and they rebuild your arrangement exactly, with the same form, the same tension arc and the same drum pattern, on their machine.
Specs and limits
The real numbers this app runs on, taken from the implementation rather than rounded up for marketing. If a limit is listed here, it is one you will actually meet.
- Length
- 4 to 128 bars, snapped to multiples of four, 16 by default. Ask for 10 bars and you get 12.
- Tempo
- Free BPM, and each style starts at its own: classical 96, pop 118, jazz 132, lo-fi 78, electronic 128, folk 104, 8-bit 132.
- How long a piece runs
- Bars x steps per bar x step seconds, where a step is an eighth note. In 4/4 a bar holds four beats, so 16 bars at 120 BPM lasts about 32 seconds; in 6/8 a bar holds six eighth notes, so the same bar count runs shorter.
- Parts
- 5: melody, harmony, chords, bass and drums. Switching a layer off removes it from generation; muting it in the mixer only silences it, which leaves the piece itself unchanged.
- Styles
- 7: classical, pop, jazz, lo-fi, electronic, folk and 8-bit.
- Scales
- 9: major, natural minor, harmonic minor, major and minor pentatonic, blues, dorian, lydian and mixolydian.
- Melody algorithms
- 11 across 6 families: random walk, Markov, Euclidean, fractal, dice, L-system, cellular automaton, chaos, serial, genetic and chiptune run. They are interchangeable, so one seed can be heard eleven different ways.
- Chords
- 9 progression presets, plus chord complexity (extensions, sus, add, 6th, diminished, half-diminished, augmented), randomness (borrowed chords, secondary dominants, tritone substitution, deceptive cadences) and 5 voicing modes (auto voice-leading, root, inversion, drop 2, open).
- Drum kit
- 17 voices — kick, soft kick, snare, rimshot, clap, ghost snare, three toms, closed, pedal and open hi-hat, ride, crash, tambourine, shaker and cowbell. Pitched as General MIDI note numbers and exported on MIDI channel 10.
- Song form
- 5 forms (none, pop, ABAB, ballad, through-composed) split your bar count into 6 possible section roles: intro, verse, chorus, bridge, outro and main. Sections marked as repeats reuse the first pass instead of generating new material.
- Shape and groove
- 4 tension arcs (climax, wave, arch, none) and 3 rhythm feels (flat, natural, groovy). Both are applied after the notes exist, which is why changing them on the same tune never rewrites the notes.
- Time signature and swing
- 4/4, 3/4, 2/4 and 6/8. Swing delays only the drum grid off-beats, by up to two thirds of a step, and leaves every other part exactly where it was.
- Instruments
- 16 sampled instruments plus an 8-bit chip voice. Five travel with the site (grand piano, electric piano, glockenspiel, marimba, music box) and the rest stream from a public soundfont library on first use.
- Editing
- Every part is editable: drag notes, drag velocities in the velocity lane, undo and redo, set a loop region, or re-roll any bar range. A note is stored as pitch, start time, duration and velocity.
- Mixer
- 5 channel strips with gain, pan, mute and solo. Mix and reverb are listening preferences stored on your machine and are deliberately kept out of share links and JSON exports, so the same recipe sounds the same everywhere.
- Notation and print
- Piano roll, sequence view, or staff notation with clef, key signature and time signature drawn on each staff. The print-ready score and the MusicXML export share the same notation engine as the screen, down to ledger lines, accidentals and beaming.
- Export
- MIDI with five tracks, MusicXML, 16-bit PCM WAV rendered one second past the end so note releases are not clipped, JSON carrying the seed and settings, per-part stems as a ZIP, and a print-ready score.
- Import
- MIDI files come back in. Track names are read first, so a file exported from Moss Music round-trips to the same five parts; other files have their tracks assigned by average pitch. Tempo and time signature are read from the file.
How a project actually goes
Roll a seed
One click composes a complete piece from a fresh random seed. Keep the seed and you can return to exactly this tune later; change it and the same settings give you a different song. Type a word of your own as the seed to make it yours.
Steer it with parameters instead of edits
Pick a style, key, scale, time signature and length. Raise the energy for a denser melody, move chord complexity and randomness to travel from plain triads to borrowed chords and tritone substitutions, and switch the melody algorithm to change the character of the whole piece.
Give it a shape
Choose a song form to split the bars into intro, verse, chorus and outro, then pick a tension arc and a rhythm feel. The arc is applied after the notes exist, so flipping between climax, wave and arch on the same tune changes the dynamics and nothing else.
Fix the two bars you dislike
Edit any part in the piano roll, drag note velocities to make phrases breathe, or re-roll just the bar range that is not working. Every edit is undoable, and re-rolling leaves the parts it did not touch exactly as they were.
Listen without waiting
Playback schedules notes a fraction ahead of the clock instead of rendering the piece first, so sound starts immediately while the samples stream in behind it. Use the five-strip mixer to balance the parts, and loop a range to audition one section.
Keep the recipe, not just the audio
MIDI if you want to keep working in a DAW, MusicXML if you want notation software to read it, WAV if you want to play it for someone, JSON or a share link if you want to rebuild it exactly as it was.
Traps worth knowing first
Every one of these comes from how the app really behaves rather than from a feature list. Knowing them saves a wasted afternoon.
The tension arc and the rhythm feel are deliberately left out of the seed: switch between climax, wave and arch on the same tune and you hear only the tension curve change, because the arc is applied after the notes exist. Change the style, tempo or a chord setting instead and you are composing something new.
MIDI export writes General MIDI programs, not the instrument you auditioned with: melody, harmony and chords all go out as acoustic grand piano and the bass as acoustic bass, while drums land on channel 10 where every DAW expects percussion. Treat the instrument picker as a playback choice and choose the sound again in your DAW.
Browsers refuse to make sound until you interact with the page. If a tune looks like it is playing but you hear nothing, click once inside the editor, which is what unlocks the audio, rather than reloading and losing the piece.
Not every instrument travels with the app. Five are served from this site and the rest arrive from a public soundfont library on first use, so if that request is blocked or you are offline the app falls back to a built-in synthesizer: the piece still plays, but the timbre changes. Drums are unaffected, because they are synthesised rather than sampled.
Re-rolling bars does not re-harmonise them around their neighbours: the replacement comes from a different complete generation, so the chord progression inside the re-rolled range moves with it. If the harmony has to stay put, edit the notes directly instead of re-rolling.
Gain, pan, mute, reverb and stereo width are listening preferences, not part of the piece. They are stored on your machine and never written into a share link or the exported JSON, so a link you send will open centred and dry for whoever receives it.
Frequently Asked Questions
What is Moss Music?
How does the randomness work?
How does the AI agent work? Do I need an API key?
Can I edit a piece after it is generated?
What can I export?
Can I import a MIDI file I already have?
What is a song form, and does it change the notes?
How do the drums work? Do they need samples?
Can I change the time signature and swing?
Where is my music stored? Is it private?
Does it work offline?
What exactly is a seed, and can I share one?
Will the exported MIDI sound like what I heard?
How is this different from an AI song generator?
Other MossGap tools
Three apps, one rule: everything runs in your browser, with no account and no upload.
- Moss PixelDescribe what you want and the AI agent paints it layer by layer — or edit every pixel by hand with a full multi-layer pixel editor.
- Moss BeadsCreate Perler / Hama / melty bead patterns with brand-accurate color palettes, turn photos into patterns, track your assembly progress, and export material lists and print-ready pattern sheets.
Ready to roll your own tune?
Open the composer and roll the dice for a five-part arrangement you can edit, export and share — no download, no sign-up, completely free.