|
82 | 82 | |`macho_fat` |Fat Mach-O macOS executable (multi-architecture) |<sub>`macho`</sub>| |
83 | 83 | |[`markdown`](#markdown) |Markdown |<sub></sub>| |
84 | 84 | |[`matroska`](#matroska) |Matroska file |<sub>`aac_frame` `av1_ccr` `av1_frame` `avc_au` `avc_dcr` `flac_frame` `flac_metadatablocks` `hevc_au` `hevc_dcr` `image` `mp3_frame` `mpeg_asc` `mpeg_pes_packet` `mpeg_spu` `opus_packet` `vorbis_packet` `vp8_frame` `vp9_cfm` `vp9_frame`</sub>| |
| 85 | +|[`midi`](#midi) |Standard MIDI file |<sub></sub>| |
85 | 86 | |[`moc3`](#moc3) |MOC3 file |<sub></sub>| |
86 | 87 | |[`mp3`](#mp3) |MP3 file |<sub>`id3v2` `id3v1` `id3v11` `apev2` `mp3_frame`</sub>| |
87 | 88 | |`mp3_frame` |MPEG audio layer 3 frame |<sub>`mp3_frame_tags`</sub>| |
@@ -867,6 +868,43 @@ $ fq 'grep_by(.id == "Tracks") | matroska_path' file.mkv |
867 | 868 | - https://www.matroska.org/technical/codec_specs.html |
868 | 869 | - https://wiki.xiph.org/MatroskaOpus |
869 | 870 |
|
| 871 | +## midi |
| 872 | +Standard MIDI file. |
| 873 | + |
| 874 | +### Notes |
| 875 | + |
| 876 | +1. Only supports the MIDI 1.0 specification. |
| 877 | +2. Does only basic validation on the MIDI data. |
| 878 | + |
| 879 | +### Sample queries |
| 880 | + |
| 881 | +1. Extract the track names from a MIDI file |
| 882 | +``` |
| 883 | +fq -d midi -d midi '.. | select(.event=="Track Name")? | "\(.name)"' twinkle.mid |
| 884 | +``` |
| 885 | + |
| 886 | +2. Extract the tempo changes from a MIDI file |
| 887 | +``` |
| 888 | +fq -d midi '.. | select(.event=="Tempo")?.tempo' twinkle.mid |
| 889 | +``` |
| 890 | + |
| 891 | +3. Extract the key changes from a MIDI file |
| 892 | +``` |
| 893 | +fq -d midi '.. | select(.event=="Key Signature")?.key' key-signatures.mid |
| 894 | +``` |
| 895 | + |
| 896 | +4. Extract NoteOn and NoteOff events: |
| 897 | +``` |
| 898 | +fq -d midi 'grep_by(.event=="Note On" or .event=="Note Off") | "\(.event) \(.time.tick) \(.note)"' twinkle.mid |
| 899 | +``` |
| 900 | + |
| 901 | +### Authors |
| 902 | +- transcriptaze.development@gmail.com |
| 903 | + |
| 904 | +### References |
| 905 | + |
| 906 | +1. [The Complete MIDI 1.0 Detailed Specification](https://www.midi.org/specifications/item/the-midi-1-0-specification) |
| 907 | + |
870 | 908 | ## moc3 |
871 | 909 | MOC3 file. |
872 | 910 |
|
|
0 commit comments