Terminal melody maker. Written in Rust.
Compose a single piano line on a piano-roll, then export a clean WAV to use as the basis for a fuller track (DAW, sampler, AI music tool, whatever you like). Play freely, record what you play (quantized to a grid, against a metronome), then tweak each note's pitch, length and strength. Built on crust. Part of the Fe₂O₃ Rust terminal suite.
No audio crate: notes are synthesised to PCM and streamed to a system player (aplay, play/sox, or paplay), so the sound device only wakes when something actually plays. WAV is written by hand.
cargo build --releaseSound needs one of aplay (alsa-utils), play (sox) or paplay on the PATH. WAV export works without any of them.
- EDIT (the piano-roll): move, lengthen, shorten, restrengthen or delete each note.
- PLAY (
Tab): jam freely on the keyboard piano; nothing is captured. - REC (
r): play along to the metronome; keystrokes are captured and quantized to the grid. A one-bar count-in plays first when the metronome is on.Esc/Enterstops and drops you back in EDIT to tweak the take.
| Key | Action |
|---|---|
h j k l / arrows |
move cursor (time / pitch) |
Enter |
add a note at the cursor (or audition the note under it) |
H / L |
move selected note earlier / later |
K / J |
move selected note up / down a semitone |
+ / - |
lengthen / shorten selected note (down to one tick) |
1–9 |
note strength, soft→loud (also sets its colour) |
x / Del |
delete selected note |
Space |
play / stop the melody (a playhead follows along) |
r |
record · Tab jam · m metronome on/off |
g |
cycle grid (1/4, 1/8, 1/16) |
, / . |
tempo −/+ 5 BPM |
w / o |
save / open a .mel file |
e |
export WAV |
? |
keybinding help · n new · q quit |
| Key | Note |
|---|---|
z s x d c v g b h n j m , |
C C# D D# E F F# G G# A A# B C |
[ / ] |
octave down / up |
Each note's colour shows its strength (cool = soft, hot = loud). While the melody plays, a cyan playhead marks the current position and the view scrolls to follow it; press any key to stop.
melody --render song.mel song.wavPlain text, one directive per line:
melody 1
bpm 120
sig 4 4
tpb 4
step 2
note 60 0 2 0.80 # pitch(MIDI) start(ticks) length(ticks) strength(0..1)
Unlicense (public domain).