Advanced piano skill that generates MIDI files with multiple instruments, pitch bend, velocity control, and multi-track support.
Create professional MIDI files with full instrument support, pitch control, and expression.
pip install midiutil pygame
/advanced-piano <song_file.json> [tempo] [output.mid]
/advanced-piano clair_de_lune.json
/advanced-piano moonlight_sonata.json 60
python .opencode/skills/advanced-piano/advanced_piano.py <song_file.json> [tempo] [output.mid]
{
"title": "Song Name",
"composer": "Composer Name",
"tempo": 72,
"tracks": [
{
"name": "Piano Right Hand",
"instrument": "piano",
"notes": [
"C4:1:80",
"E4:0.5:90:+2",
"G4:2:100"
]
},
{
"name": "Strings",
"instrument": "string_ensemble_1",
"notes": [
"C3:4:70",
"G3:4:70"
]
}
]
}
NOTE:DURATION:VELOCITY:PITCH_BEND
w = whole note (4 beats)h = half note (2 beats)q = quarter note (1 beat)e = eighth note (0.5 beats)s = sixteenth note (0.25 beats)0.5, 1.5, etc.| Category | Instruments |
|---|---|
| Piano | piano, bright_piano, electric_piano_1, electric_piano_2, harpsichord |
| Strings | strings, violin, viola, cello, contrabass, synth_strings_1 |
| Guitar | acoustic_guitar_nylon, acoustic_guitar_steel, electric_guitar_clean |
| Bass | acoustic_bass, electric_bass_finger, electric_bass_pick |
| Organ | organ, church_organ, accordion |
| Wind | flute, pan_flute, recorder |
| Voice | choir_aahs, voice_oohs, synth_voice |
{
"title": "Simple Melody",
"tempo": 120,
"tracks": [{
"name": "Piano",
"instrument": "piano",
"notes": ["C4:1:80", "D4:1:80", "E4:1:80", "F4:1:80", "G4:2:90"]
}]
}
{
"title": "Duet",
"tempo": 90,
"tracks": [
{
"name": "Piano",
"instrument": "piano",
"notes": ["C4:1:80", "E4:1:80", "G4:1:80"]
},
{
"name": "Strings",
"instrument": "strings",
"notes": ["C3:3:70", "G3:3:70"]
}
]
}
{
"title": "Expressive",
"tempo": 72,
"tracks": [{
"name": "Lead",
"instrument": "electric_piano_1",
"notes": [
"C4:1:80:+3",
"D4:0.5:90:-2",
"E4:2:100"
]
}]
}