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

42 lines
1007 B
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
2024-08-26 06:46:42 +03:00
fq -d midi -d midi '.. | select(.event=="track name")? | "\(.name)"' twinkle.mid
2024-08-24 03:20:55 +03:00
* Extract the tempo changes from a MIDI file
2024-08-26 06:46:42 +03:00
fq -d midi '.. | select(.event=="tempo")?.tempo' twinkle.mid
2024-08-24 03:20:55 +03:00
* Extract the key changes from a MIDI file
2024-08-26 06:46:42 +03:00
fq -d midi '.. | select(.event=="key signature")?.key' key-signatures.mid
2024-08-24 03:20:55 +03:00
* Extract NoteOn and NoteOff events:
2024-08-26 06:46:42 +03:00
fq -d midi 'grep_by(.event=="note on" or .event=="note off") | "\(.event) \(.time.tick) \(.note)"' 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)