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

43 lines
1.1 KiB
Plaintext
Raw Normal View History

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.
* 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
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
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
fq -d midi '.. | select(.event=="key_signature")?.key_signature' midi/key-signatures.mid
2024-08-24 03:20:55 +03:00
* Extract NoteOn events:
2024-08-24 03:20:55 +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)
* The MIDI Specification (http://midi.teragonaudio.com/tech/midispec.htm)