[File] [PATCH] Magdir/riff for Microsoft/MIDI Instrument Definition File *.IDF
Jörg Jenderek
joerg.jen.der.ek at gmx.net
Mon Jul 18 20:24:51 UTC 2022
Hello,
some days ago i handled some RIFF based files. Some have file name
extension IDF. With Microsoft's IDFedit Program i was able to create
my own examples like My-idf1.idf and My-idf2.idf.
When i run file command version 5.42 on such RIFF based samples i get
a correct output like:
GENERAL.IDF: RIFF (little-endian) data
My-idf1.idf: RIFF (little-endian) data
My-idf2.idf: RIFF (little-endian) data
nvidia.idf: RIFF (little-endian) data
For all samples with --extension option only ??? is displayed.
Furthermore with option -i for samples only generic
application/octet-stream is shown.
For comparison reason i run the file format identification utility
TrID ( See https://mark0.net/soft-trid-e.html). This identifies also
all examples with low priority as "Generic RIFF container" by
riff.trid.xml. The examples are described with high rate as "MIDI
Instrument Definition File" by idf.trid.xml. This list the used file
name extension and often with -v option an related URL pointing to
information. (See appended trid-v-idf.txt.gz). With this information
i find a page about MIDI Instrument Definition File on file formats
archive team web site. Most information can be get from
C-header file GLOBALS.H of IFEDIT source which is part in Visual
Studio ( Directory SAMPLES/VC98). That informations are now
expressed by additional comment lines inside Magdir/riff like:
# URL: http://fileformats.archiveteam.org/
# wiki/MIDI_Instrument_Definition_File
# Reference: http://mark0.net/download/triddefs_xml.7z/
# defs/i/idf.trid.xml
# ftp://curscott.servebeer.com/
# Download/Apps/_Microsoft/
# Visual%20Studio%206.0%20Professional%20MSDN/
# SAMPLES/VC98/SDK/GRAPHICS/AUDIO/IDFEDIT/GLOBALS.H
The examples are recognized as "RIFF (little-endian) data"
by 4 bytes RIFF at the beginning inside Magdir/riff. But no sub class
identification is done by next chunk 4 byte name "IDF ". When doing
so this now becomes like:
0 string RIFF RIFF (little-endian) data
>8 string IDF\ LIST \b, MIDI Instrument Definition File
!:mime audio/x-idf
!:ext idf
Instead of very generic mime type application/octet-stream or RIFF
generic application/x-riff i display an user defined mime type used
by TrID. The file name extension is 3 byte sequence IDF. This is
obviously an abbreviation for Instrument Definition File.
After the first 5 chunk names comes a string which is apparently the
instrument name like "Universal-MIDI-Instrument" or "General MIDI".
This is shown by line like:
>>0x30 string x "%s"
Afterwards comes the inst TAG, which is followed by string which is
probably a manufacture name like "Unspecified Company" or "NVidia
Corporation". That information is shown by lines like:
>>0x31 search/256 inst by
>>>&0x24 string x "%s"
After applying the above mentioned modifications by patch
file-5.42-riff-idf.diff then all my inspected IDF MIDI examples
are now described with sub classification and more details. This now
looks like:
GENERAL.IDF: RIFF (little-endian) data,
MIDI Instrument Definition File
"Universal-MIDI-Instrument" by "Unbekannte Firma"
My-idf1.idf: RIFF (little-endian) data,
MIDI Instrument Definition File
"instrument name" by "Unspecified Company"
My-idf2.idf: RIFF (little-endian) data,
MIDI Instrument Definition File
"name2" by "Unspecified Company"
nvidia.idf: RIFF (little-endian) data,
MIDI Instrument Definition File
"General MIDI" by "NVidia Corporation"
I hope my diff file can be applied in future version of file
utility.
With best wishes,
Jörg Jenderek
--
Jörg Jenderek
-------------- next part --------------
--- file-5.42/magic/Magdir/riff.old 2022-05-22 00:50:17.000000000 +0200
+++ file-5.42/magic/Magdir/riff 2022-07-10 00:19:42.237558500 +0200
@@ -334,4 +334,25 @@
#>>>0 use corel-draw
>8 string NUNDROOT \b, Steinberg CuBase
+# From: Joerg Jenderek
+# URL: http://fileformats.archiveteam.org/wiki/MIDI_Instrument_Definition_File
+# Reference: http://mark0.net/download/triddefs_xml.7z/defs/i/idf.trid.xml
+# ftp://curscott.servebeer.com/Download/Apps/_Microsoft/
+# Visual%20Studio%206.0%20Professional%20MSDN/
+# SAMPLES/VC98/SDK/GRAPHICS/AUDIO/IDFEDIT/GLOBALS.H
+# Note: called "MIDI Instrument Definition File" by TrID
+>8 string IDF\ LIST \b, MIDI Instrument Definition File
+!:mime audio/x-idf
+!:ext idf
+# 3rd chunk size like: 254 284 286 670
+#>>0x10 ulelong x \b, 3th SIZE %u
+# for debugging purpose display next chunk like: MMAPhdr
+#>>0x14 string x \b, 4th "%-8.8s"
+#>>0x1C ulelong x \b, 4th SIZE 0x%x
+# probably MIDI instrument name like: "Universal-MIDI-Instrument" "instrument name" "General MIDI"
+>>0x30 string x "%s"
+# look for inst TAG
+>>0x31 search/256 inst by
+# probably manufacture name like: "Unspecified Company" "NVidia Corporation"
+>>>&0x24 string x "%s"
# AVI == Audio Video Interleave
# Reference: http://fileformats.archiveteam.org/wiki/AVI
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.42-riff-idf.diff.sig
Type: application/octet-stream
Size: 938 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220718/eff7e5f0/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trid-v-idf.txt.gz
Type: application/x-gzip
Size: 591 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220718/eff7e5f0/attachment.bin>
More information about the File
mailing list