Melody Generator

Create melodies on a step-grid. Click cells to enable notes, set tempo, choose scale/instrument, then press Play.

120 BPM

Quick Summary

The Melody Generator is a step-sequencer style tool for sketching musical ideas quickly. It supports selectable scales and roots, tempo control, and multiple oscillator voices to audition melodies in real-time.

How it works

This is a browser-based sequencer using the Web Audio API. The grid represents 12 pitch rows (one octave by default) and 16 step columns. Each column is a time step โ€” when playback reaches a column, enabled notes in that column are sounded.

Playhead tempo = 60 รท BPM seconds per step (16 steps per bar by default)
Frequency formula (equal temperament):
  freq = 440 * 2^((midi - 69) / 12)
This tool maps rows to MIDI notes (configurable via root & scale).
              

Examples & Tips

  • Choose Major + root C for bright, happy melodies.
  • Choose Minor for moodier, cinematic ideas.
  • Use Pentatonic to avoid dissonance โ€” great for simple melodies.
  • Try different instruments (sine/saw/pluck) to find a sound that sits well in your track.

Use Cases

  • Sketch musical hooks quickly.
  • Create backing melodies for demos.
  • Generate MIDI ideas to export later (MIDI export planned).
  • Practice ear training by toggling between scales and roots.

Frequently Asked Questions

Modern browsers require a user gesture to start audio. Click Play to resume audio context and allow sound playback.

This version produces live audio in-browser. MIDI/WAV export is possible and can be added โ€” I can provide a version that generates downloadable MIDI or renders WAV client-side on request.

Use the Scale & Root selectors above the grid. The grid remaps pitches immediately, preserving which cells are active so you can quickly audition the same pattern in a new key.