1
1
mirror of https://github.com/wader/fq.git synced 2024-12-01 19:12:34 +03:00
fq/format/midi/testdata/help_midi.fqtest
2024-08-25 20:46:42 -07:00

42 lines
1007 B
Plaintext

$ fq -h midi
midi: Standard MIDI file decoder
Decode examples
===============
# Decode file as midi
$ fq -d midi . file
# Decode value as midi
... | midi
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
Authors
=======
- transcriptaze.development@gmail.com
References
==========
* The Complete MIDI 1.0 Detailed Specification (https://www.midi.org/specifications/item/the-midi-1-0-specification)