mirror of
https://github.com/wader/fq.git
synced 2024-11-25 05:55:43 +03:00
9c7f7f961a
- Renamed 'tracks' section to 'content' (cf. https://github.com/wader/fq/pull/1004#discussion_r1746651234) - Removed 'validation only' errors (cf. https://github.com/wader/fq/pull/1004#issuecomment-2333464662) - Decoded MThd divisions field with SMPTE timecode
1.1 KiB
1.1 KiB
Notes
- Only supports the MIDI 1.0 MIDI file specification.
- Only supports MThd and MTrk chunks.
- 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")? | "\(.track_name)"' midi/twinkle.mid
- Extract the tempo changes from a MIDI file
fq -d midi '.. | select(.event=="tempo")?.tempo' midi/twinkle.mid
- Extract the key changes from a MIDI file
fq -d midi '.. | select(.event=="key_signature")?.key_signature' midi/twinkle.mid
- Extract NoteOn events:
fq -d midi 'grep_by(.event=="note_on") | [.time.tick, .note_on.note] | join(" ")' midi/twinkle.mid