mirror of
https://github.com/wader/fq.git
synced 2024-11-26 10:33:53 +03:00
849 B
849 B
Notes
- Only supports the MIDI 1.0 specification.
- Does only basic validation on the MIDI data.
Sample queries
- Extract the track names from a MIDI file
fq -d midi -d midi '.. | select(.event=="track name")? | "\(.name)"' twinkle.mid
- Extract the tempo changes from a MIDI file
fq -d midi '.. | select(.event=="tempo")?.tempo' twinkle.mid
- Extract the key changes from a MIDI file
fq -d midi '.. | select(.event=="key signature")?.key' key-signatures.mid
- Extract NoteOn and NoteOff events:
fq -d midi 'grep_by(.event=="note on" or .event=="note off") | "\(.event) \(.time.tick) \(.note)"' twinkle.mid