|
96 | 96 | |`mpeg_spu` |Sub Picture Unit (DVD subtitle) |<sub></sub>| |
97 | 97 | |`mpeg_ts` |MPEG Transport Stream |<sub></sub>| |
98 | 98 | |[`msgpack`](#msgpack) |MessagePack |<sub></sub>| |
| 99 | +|[`negentropy`](#negentropy) |Negentropy message |<sub></sub>| |
99 | 100 | |[`nes`](#nes) |iNES/NES 2.0 cartridge ROM format |<sub></sub>| |
100 | 101 | |`ogg` |OGG file |<sub>`ogg_page` `vorbis_packet` `opus_packet` `flac_metadatablock` `flac_frame`</sub>| |
101 | 102 | |`ogg_page` |OGG page |<sub></sub>| |
|
140 | 141 | |`ip_packet` |Group |<sub>`icmp` `icmpv6` `tcp_segment` `udp_datagram`</sub>| |
141 | 142 | |`link_frame` |Group |<sub>`bsd_loopback_frame` `ether8023_frame` `ipv4_packet` `ipv6_packet` `sll2_packet` `sll_packet`</sub>| |
142 | 143 | |`mp3_frame_tags` |Group |<sub>`mp3_frame_vbri` `mp3_frame_xing`</sub>| |
143 | | -|`probe` |Group |<sub>`adts` `aiff` `apple_bookmark` `ar` `avi` `avro_ocf` `bitcoin_blkdat` `bplist` `bzip2` `caff` `elf` `fit` `flac` `gif` `gzip` `html` `jp2c` `jpeg` `json` `jsonl` `leveldb_table` `luajit` `macho` `macho_fat` `matroska` `moc3` `mp3` `mp4` `mpeg_ts` `nes` `ogg` `opentimestamps` `pcap` `pcapng` `png` `tar` `tiff` `toml` `tzif` `tzx` `wasm` `wav` `webp` `xml` `yaml` `zip`</sub>| |
| 144 | +|`probe` |Group |<sub>`adts` `aiff` `apple_bookmark` `ar` `avi` `avro_ocf` `bitcoin_blkdat` `bplist` `bzip2` `caff` `elf` `fit` `flac` `gif` `gzip` `html` `jp2c` `jpeg` `json` `jsonl` `leveldb_table` `luajit` `macho` `macho_fat` `matroska` `midi` `moc3` `mp3` `mp4` `mpeg_ts` `nes` `ogg` `opentimestamps` `pcap` `pcapng` `png` `tar` `tiff` `toml` `tzif` `tzx` `wasm` `wav` `webp` `xml` `yaml` `zip`</sub>| |
144 | 145 | |`tcp_stream` |Group |<sub>`dns_tcp` `rtmp` `tls`</sub>| |
145 | 146 | |`udp_payload` |Group |<sub>`dns`</sub>| |
146 | 147 |
|
@@ -873,37 +874,41 @@ Standard MIDI file. |
873 | 874 |
|
874 | 875 | ### Notes |
875 | 876 |
|
876 | | -1. Only supports the MIDI 1.0 specification. |
877 | | -2. Does only basic validation on the MIDI data. |
| 877 | +1. Only supports the MIDI 1.0 MIDI file specification. |
| 878 | +2. Only supports _MThd_ and _MTrk_ chunks. |
| 879 | +3. Does only basic validation on the MIDI data. |
878 | 880 |
|
879 | 881 | ### Sample queries |
880 | 882 |
|
881 | 883 | 1. Extract the track names from a MIDI file |
882 | 884 | ``` |
883 | | -fq -d midi -d midi '.. | select(.event=="Track Name")? | "\(.name)"' twinkle.mid |
| 885 | +fq -d midi -d midi '.. | select(.event=="track_name")? | "\(.track_name)"' midi/twinkle.mid |
884 | 886 | ``` |
885 | 887 |
|
886 | 888 | 2. Extract the tempo changes from a MIDI file |
887 | 889 | ``` |
888 | | -fq -d midi '.. | select(.event=="Tempo")?.tempo' twinkle.mid |
| 890 | +fq -d midi '.. | select(.event=="tempo")?.tempo' midi/twinkle.mid |
889 | 891 | ``` |
890 | 892 |
|
891 | 893 | 3. Extract the key changes from a MIDI file |
892 | 894 | ``` |
893 | | -fq -d midi '.. | select(.event=="Key Signature")?.key' key-signatures.mid |
| 895 | +fq -d midi '.. | select(.event=="key_signature")?.key_signature' midi/twinkle.mid |
894 | 896 | ``` |
895 | 897 |
|
896 | | -4. Extract NoteOn and NoteOff events: |
| 898 | +4. Extract NoteOn events: |
897 | 899 | ``` |
898 | | -fq -d midi 'grep_by(.event=="Note On" or .event=="Note Off") | "\(.event) \(.time.tick) \(.note)"' twinkle.mid |
| 900 | +fq -d midi 'grep_by(.event=="note_on") | [.time.tick, .note_on.note] | join(" ")' midi/twinkle.mid |
899 | 901 | ``` |
900 | 902 |
|
901 | 903 | ### Authors |
902 | | -- transcriptaze.development@gmail.com |
| 904 | +- [transcriptaze](https://github.com/transcriptaze) |
903 | 905 |
|
904 | 906 | ### References |
905 | 907 |
|
906 | 908 | 1. [The Complete MIDI 1.0 Detailed Specification](https://www.midi.org/specifications/item/the-midi-1-0-specification) |
| 909 | +2. [Standard MIDI Files](https://midi.org/standard-midi-files) |
| 910 | +3. [Standard MIDI File (SMF) Format](http://midi.teragonaudio.com/tech/midifile.htm) |
| 911 | +4. [MIDI Files Specification](http://www.somascape.org/midi/tech/mfile.html) |
907 | 912 |
|
908 | 913 | ## moc3 |
909 | 914 | MOC3 file. |
@@ -1012,6 +1017,33 @@ $ fq -d msgpack torepr file.msgpack |
1012 | 1017 | ### References |
1013 | 1018 | - https://github.com/msgpack/msgpack/blob/master/spec.md |
1014 | 1019 |
|
| 1020 | +## negentropy |
| 1021 | +Negentropy message. |
| 1022 | + |
| 1023 | +### View a full Negentropy message |
| 1024 | + |
| 1025 | +``` |
| 1026 | +$ fq -d negentropy dd file |
| 1027 | +``` |
| 1028 | + |
| 1029 | +### Check how many ranges the message has and how many of those are of 'fingerprint' mode |
| 1030 | + |
| 1031 | +``` |
| 1032 | +$ fq -d negentropy '.bounds | length as $total | map(select(.mode == "fingerprint")) | length | {$total, fingerprint: .}' message |
| 1033 | +``` |
| 1034 | + |
| 1035 | +### Check get all ids in all idlists |
| 1036 | + |
| 1037 | +``` |
| 1038 | +$ fq -d negentropy '.bounds | map(select(.mode == "idlist") | .idlist | .ids) | flatten' message |
| 1039 | +``` |
| 1040 | + |
| 1041 | +### Authors |
| 1042 | +- fiatjaf, https://fiatjaf.com |
| 1043 | + |
| 1044 | +### References |
| 1045 | +- https://github.com/hoytech/negentropy |
| 1046 | + |
1015 | 1047 | ## nes |
1016 | 1048 | iNES/NES 2.0 cartridge ROM format. |
1017 | 1049 |
|
|
0 commit comments