MIDI / Notation Writer

Write a piece on a piano-roll grid and read it back as real staff notation — clefs, key signature, beams, chords and dynamics — across up to four instrument tracks. Generate ideas with a motif-based composer, play it back, and export a real multi-track .mid file.

Last updated

Piece — tempo, timing, length

Tracks — up to 4, each with its own instrument, playing together

Active track settings

Generate — write an idea into the active track

Regenerate one phrase

No generated piece yet — the phrase list and accompaniment regeneration fill in once you generate a melody.

Place notes manually — pick a length, then click the grid or the staff

View — piano roll, staff notation, or both

Click an empty cell to place a note of the selected length — it stops short of the next note in that row, so notes never overlap in a row. Clicking a second pitch at a step that is already busy adds a chord tone rather than replacing anything. Click a note to remove it, or shift-click it to cycle its dynamic.

Staff notation of every track, read straight from the same notes as the grid. Click a spot on a staff to add a note there with the selected length, or click a notehead to remove it — the grid updates instantly, and so does this view when you edit the grid.

How to write music and export MIDI

  1. Click squares on the piano roll to add notes, or click the staff; set the tempo, time signature and instrument.
  2. Add tracks for other instruments, or click Generate melody for ideas.
  3. Click Play to hear it, then Export .mid or Save notation PNG.

About this tool

Two editors show the same music at the same time. The piano roll is a step grid — each row is a pitch, each column a sixteenth-note step — and the staff view underneath it is real notation drawn from those same notes: treble or bass clef per track, a key signature taken from the scale you generated in, a time signature, barlines, proper noteheads and stems, beamed eighths and sixteenths, ledger lines, accidentals, rests, ties, stacked chord noteheads, and p / mf / f dynamic marks. Editing either one updates the other immediately: click a staff to add a note, click a notehead to delete it, and the grid redraws in the same frame. The notation is drawn by a small purpose-built SVG renderer in the page, so there is nothing to download and it prints and exports as a PNG.

Pick a note length from the row above the editors — sixteenth up to a whole bar, dotted values included — then click an empty cell to place a note of exactly that length. Each note's length is set individually as you place it. The chord tool places a stack instead of a single note: a diatonic triad from the current key, a bare fifth, or an octave. Chords also happen naturally — clicking a second pitch at a step that already has a note adds to it rather than replacing it, because notes only have to avoid overlapping within one pitch row. Every note carries a dynamic (soft, medium or loud) which changes both how loud it plays and the velocity byte written into the exported MIDI file; shift-clicking a note cycles it. The pitch range now runs as wide as C1 to C7, chosen per track, so a bass part and a flute part can each sit where they belong; the grid scrolls vertically inside its own box rather than stretching the page.

Up to four instrument tracks play together on the same timeline, each with its own notes, instrument, range, volume, pan and mute/solo state — Piano, Flute, Chip Lead, Synth Lead, Electric Bass, Bell, Strings, or Marimba. These are built from oscillator waveforms and shaped envelopes rather than sampled recordings, so they're distinct from each other but not meant to sound fully realistic. A swing control delays every other step for a shuffled, less mechanical feel, and the piece can be in 4/4 or 3/4.

Generate melody is a small rule-based composer rather than a random walk. It starts by writing a motif — a few notes with a specific rhythm and a specific shape — and then develops that motif the way a composer would, rather than inventing new material every bar: it restates it, sequences it (the same interval pattern started on a different scale degree), inverts it (the contour flipped around its first note), plays it in retrograde, and stretches or compresses its rhythm (augmentation and diminution). Those transformations are placed deliberately: a statement, a sequenced repeat, a contrasting middle section that is written from a deliberately different rhythmic density, and a final restatement that cadences. Pieces are laid out as antecedent/consequent phrase pairs — the first phrase is a question that ends open, on the dominant, and the second answers it and resolves to the tonic — growing into an AABA-style four-part shape for longer pieces, so there are audible phrase endings partway through and not only at the very last bar.

Harmony drives pitch choice through voice leading rather than random leaps: at a chord change the melody moves to the closest chord tone by scale-degree distance, so lines connect smoothly instead of jumping. The chord progression itself is chosen per mood — a rock-flavoured I–♭VII–IV for Energetic, a I–vi–ii–V for Mellow — and it is then coloured with occasional secondary dominants (a V of the chord that follows) and borrowed chords from the parallel mode, so the harmony varies between generations instead of cycling four fixed shapes. Seven scales/modes are available (Major, Minor, Dorian, Mixolydian, both pentatonics, and Blues); chords are always built from the matching seven-note parent scale so a pentatonic tune still gets sensible harmony. Nine mood/style presets adjust rhythm, register, harmonic colour, accompaniment pattern and tempo together — the five original moods plus Waltz, March, Lullaby and Fanfare, two of which also switch the piece to 3/4.

Add accompaniment writes a genuinely complementary second part rather than one root note per bar. It measures how busy the melody is in each bar and reacts: where the melody is dense it sustains a held chord underneath, where the melody rests or holds it fills the gap with an arpeggio or walking figure built from that bar's chord tones, and in between it plays a simple root-and-fifth pattern shaped by the chosen style (a waltz bass, a march's alternating roots, a fanfare's stacked chords). Regenerate accompaniment only keeps the melody exactly as it is and rewrites just that part against it, and Regenerate phrase rewrites a single labelled phrase of the melody — "Bars 3–4 · sequence", say — leaving the rest of the piece intact. It's a starting point or a source of ideas, not a finished composition; regenerate as many times as you like, or hand-edit whatever it comes up with.

Export .mid writes a real Standard MIDI File built directly in your browser — no library or server involved. Each track gets its own channel, a General MIDI program-change event matching the instrument, volume and pan controllers, and per-note velocities from the dynamics you set; chords come out as simultaneous note-on events, so opening the file in a DAW or notation program carries the whole arrangement across. Share / Copy link encodes the whole piece — every track, note, chord, dynamic, mix setting and the generated plan — into the URL itself, so sending someone the link reproduces it exactly; nothing is uploaded anywhere. Pieces saved by older versions of this tool still load correctly.

A few honest limits: the staff view reads the grid as sixteenth-note steps regardless of the "Step size" playback setting, it shows one voice per track (notes starting at the same step are drawn as one chord using the shortest of their lengths), and it draws triplets as their nearest straight-grid equivalent because the underlying grid is straight. This works the same way on a phone, but a two-editor score view with several instrument tracks is inherently a lot to navigate through touch and a narrow screen — it's built with a desktop-first layout in mind, where a mouse and a wider window make placing and reviewing notes much easier.

Questions about the MIDI editor

Can I open the MIDI file in other music software?

Yes. The .mid file opens in GarageBand, Logic, FL Studio, Ableton, MuseScore and most other music programs, with each track kept separate.

Does it show real sheet music?

Yes. The staff shows clefs, key signature, beams, rests, ties, chords and dynamics, and updates as you edit.

How many instruments can I use?

Up to four tracks, each with its own instrument, volume and pan, with mute and solo.

Can it write a melody for me?

Yes. Choose a scale, key and mood and click Generate melody; it can add an accompaniment too.

☕ Support toolcrate