2024-08-11 04:25:14 +03:00
|
|
|
$ fq -h midi
|
|
|
|
midi: Standard MIDI file decoder
|
|
|
|
|
|
|
|
Decode examples
|
|
|
|
===============
|
|
|
|
|
2024-08-15 06:14:23 +03:00
|
|
|
# Decode file as midi
|
2024-08-11 04:25:14 +03:00
|
|
|
$ fq -d midi . file
|
2024-08-15 06:14:23 +03:00
|
|
|
# Decode value as midi
|
|
|
|
... | midi
|
2024-08-11 04:25:14 +03:00
|
|
|
|
2024-08-15 06:14:23 +03:00
|
|
|
Notes
|
|
|
|
=====
|
|
|
|
* Only supports the MIDI 1.0 specification.
|
2024-08-16 05:47:47 +03:00
|
|
|
* Does only basic validation on the MIDI data.
|
2024-08-11 04:25:14 +03:00
|
|
|
|
2024-08-24 03:20:55 +03:00
|
|
|
Sample queries
|
|
|
|
==============
|
|
|
|
* Extract the track names from a MIDI file
|
|
|
|
|
2024-08-30 06:27:51 +03:00
|
|
|
fq -d midi -d midi '.. | select(.event=="track_name")? | "\(.track_name)"' midi/twinkle.mid
|
2024-08-24 03:20:55 +03:00
|
|
|
|
|
|
|
* Extract the tempo changes from a MIDI file
|
|
|
|
|
2024-08-30 06:27:51 +03:00
|
|
|
fq -d midi '.. | select(.event=="tempo")?.tempo' midi/twinkle.mid
|
2024-08-24 03:20:55 +03:00
|
|
|
|
|
|
|
* Extract the key changes from a MIDI file
|
|
|
|
|
2024-08-30 06:27:51 +03:00
|
|
|
fq -d midi '.. | select(.event=="key_signature")?.key_signature' midi/key-signatures.mid
|
2024-08-24 03:20:55 +03:00
|
|
|
|
2024-09-01 01:21:28 +03:00
|
|
|
* Extract NoteOn events:
|
2024-08-24 03:20:55 +03:00
|
|
|
|
2024-09-01 01:21:28 +03:00
|
|
|
fq -d midi 'grep_by(.event=="note_on") | [.time.tick, .note_on.note] | join(" ")' midi/twinkle.mid
|
2024-08-24 03:20:55 +03:00
|
|
|
|
2024-08-11 04:25:14 +03:00
|
|
|
Authors
|
|
|
|
=======
|
2024-08-15 06:14:23 +03:00
|
|
|
- transcriptaze.development@gmail.com
|
2024-08-11 04:25:14 +03:00
|
|
|
|
|
|
|
References
|
|
|
|
==========
|
2024-08-15 06:14:23 +03:00
|
|
|
* The Complete MIDI 1.0 Detailed Specification (https://www.midi.org/specifications/item/the-midi-1-0-specification)
|
2024-08-30 06:27:51 +03:00
|
|
|
* The MIDI Specification (http://midi.teragonaudio.com/tech/midispec.htm)
|