aboutsummaryrefslogtreecommitdiff
path: root/contrib/file/magic/Magdir/audio
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/file/magic/Magdir/audio')
-rw-r--r--contrib/file/magic/Magdir/audio253
1 files changed, 203 insertions, 50 deletions
diff --git a/contrib/file/magic/Magdir/audio b/contrib/file/magic/Magdir/audio
index 448f000a38bc..55c5cd0ad20e 100644
--- a/contrib/file/magic/Magdir/audio
+++ b/contrib/file/magic/Magdir/audio
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: audio,v 1.118 2019/11/19 05:30:07 christos Exp $
+# $File: audio,v 1.127 2023/03/05 20:15:49 christos Exp $
# audio: file(1) magic for sound formats (see also "iff")
#
# Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
@@ -183,42 +183,57 @@
21 string BMOD2STM Screamtracker 2 module sound data
!:mime audio/x-mod
#audio/x-screamtracker-module
+
+1080 string \!PM! 4-channel Protracker module sound data
+!:mime audio/x-mod
+#audio/x-protracker-module
+>0 string >\0 Title: "%s"
+
1080 string M.K. 4-channel Protracker module sound data
!:mime audio/x-mod
#audio/x-protracker-module
>0 string >\0 Title: "%s"
+
1080 string M!K! 4-channel Protracker module sound data
!:mime audio/x-mod
#audio/x-protracker-module
>0 string >\0 Title: "%s"
+
1080 string FLT4 4-channel Startracker module sound data
!:mime audio/x-mod
#audio/x-startracker-module
>0 string >\0 Title: "%s"
+
1080 string FLT8 8-channel Startracker module sound data
!:mime audio/x-mod
#audio/x-startracker-module
>0 string >\0 Title: "%s"
+
1080 string 4CHN 4-channel Fasttracker module sound data
!:mime audio/x-mod
#audio/x-fasttracker-module
>0 string >\0 Title: "%s"
+
1080 string 6CHN 6-channel Fasttracker module sound data
!:mime audio/x-mod
#audio/x-fasttracker-module
>0 string >\0 Title: "%s"
+
1080 string 8CHN 8-channel Fasttracker module sound data
!:mime audio/x-mod
#audio/x-fasttracker-module
>0 string >\0 Title: "%s"
+
1080 string CD81 8-channel Octalyser module sound data
!:mime audio/x-mod
#audio/x-octalysertracker-module
>0 string >\0 Title: "%s"
+
1080 string OKTA 8-channel Octalyzer module sound data
!:mime audio/x-mod
#audio/x-octalysertracker-module
>0 string >\0 Title: "%s"
+
# Not good enough.
#1082 string CH
#>1080 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data
@@ -403,10 +418,26 @@
0 string THX AHX version
>3 byte =0 1 module data
>3 byte =1 2 module data
->10 byte x TRL: %u
->11 byte x TRK: %u
->12 byte x SMP: %u
->13 byte x SS: %u
+>11 ubyte x TRK: %u
+>10 ubyte x TRL: %u
+>12 ubyte x SMP: %u
+>13 ubyte x SS: %u
+>(4.H) string x Title: "%.128s"
+
+# header is mostly AHX format
+0 string HVL
+>3 byte <2 Hively Tracker Song
+>3 byte =0 v1 module data
+>3 byte =1 v2 module data
+>11 ubyte x TRK: %u
+>10 ubyte x TRL: %u
+>12 ubyte x SMP: %u
+>13 ubyte x SS: %u
+>8 ubyte/4 =0 CHN: 4
+>8 ubyte/4 >0 CHN: 4+%u
+#>-0 offset <0xffff
+>(4.H) string x Title: "%.128s"
+
#
0 string OKTASONG Oktalyzer module data
#
@@ -445,7 +476,7 @@
>0 string >\0 Composer: "%s"
0 string AMF AMF Module
>4 string >\0 Title: "%s"
-0 string MODINFO1 Open Cubic Player Module Inforation MDZ
+0 string MODINFO1 Open Cubic Player Module Information MDZ
0 string Extended\40Instrument: Fast Tracker II Instrument
# From: Takeshi Hamasaki <hma@syd.odn.ne.jp>
@@ -548,15 +579,13 @@
# From: Alex Myczko <alex@aiei.ch>
# https://github.com/rerrahkr/BambooTracker
-0 string BambooTrackerMod BambooTracker module
->22 byte x \b, version %u
->21 byte x \b.%u
->20 byte x \b.%u
-
-0 string BambooTrackerIst BambooTracker instrument
->22 byte x \b, version %u
->21 byte x \b.%u
->20 byte x \b.%u
+0 string BambooTracker BambooTracker
+>13 string Mod Module
+>13 string Ist Instrument
+>13 string Bnk Bank
+>22 byte x \b, version %u
+>21 byte x \b.%u
+>20 byte x \b.%u
0 string CC2x CheeseCutter 2 song
@@ -716,36 +745,36 @@
>>8 ubyte&0x0F >0 \b%d
#Get soundchips
>>8 ubyte x \b, soundchip(s)=
->>0x0C ulelong >0 SN76489,
->>0x10 ulelong >0 YM2413,
->>0x2C ulelong >0 YM2612,
->>0x30 ulelong >0 YM2151,
+>>0x0C ulelong >0 SN76489 (PSG),
+>>0x10 ulelong >0 YM2413 (OPLL),
+>>0x2C ulelong >0 YM2612 (OPN2),
+>>0x30 ulelong >0 YM2151 (OPM),
>>0x38 ulelong >0 Sega PCM,
>>0x34 ulelong >0xC
->>>0x40 ulelong >0 RF5C68,
+>>>0x40 ulelong >0 RF5C68 (PCM),
>>0x34 ulelong >0x10
->>>0x44 ulelong >0 YM2203,
+>>>0x44 ulelong >0 YM2203 (OPN),
>>0x34 ulelong >0x14
->>>0x48 ulelong >0 YM2608,
+>>>0x48 ulelong >0 YM2608 (OPNA),
>>0x34 ulelong >0x18
->>>0x4C lelong >0 YM2610,
->>>0x4C lelong <0 YM2610B,
+>>>0x4C lelong >0 YM2610 (OPNB),
+>>>0x4C lelong <0 YM2610B (OPNB+2FM),
>>0x34 ulelong >0x1C
->>>0x50 ulelong >0 YM3812,
+>>>0x50 ulelong >0 YM3812 (OPL2),
>>0x34 ulelong >0x20
->>>0x54 ulelong >0 YM3526,
+>>>0x54 ulelong >0 YM3526 (OPL),
>>0x34 ulelong >0x24
->>>0x58 ulelong >0 Y8950,
+>>>0x58 ulelong >0 Y8950 (MSX-Audio),
>>0x34 ulelong >0x28
->>>0x5C ulelong >0 YMF262,
+>>>0x5C ulelong >0 YMF262 (OPL3),
>>0x34 ulelong >0x2C
->>>0x60 ulelong >0 YMF278B,
+>>>0x60 ulelong >0 YMF278B (OPL4),
>>0x34 ulelong >0x30
->>>0x64 ulelong >0 YMF271,
+>>>0x64 ulelong >0 YMF271 (OPX),
>>0x34 ulelong >0x34
->>>0x68 ulelong >0 YMZ280B,
+>>>0x68 ulelong >0 YMZ280B (PCMD8),
>>0x34 ulelong >0x38
->>>0x6C ulelong >0 RF5C164,
+>>>0x6C ulelong >0 RF5C164 (PCM),
>>0x34 ulelong >0x3C
>>>0x70 ulelong >0 PWM,
>>0x34 ulelong >0x40
@@ -767,11 +796,11 @@
>>0x34 ulelong >0x54
>>>0x88 ulelong >0 MultiPCM,
>>0x34 ulelong >0x58
->>>0x8C ulelong >0 uPD7759,
+>>>0x8C ulelong >0 uPD7759 (ADPCM Speech),
>>0x34 ulelong >0x5C
->>>0x90 ulelong >0 OKIM6258,
+>>>0x90 ulelong >0 OKIM6258 (ADPCM Speech),
>>0x34 ulelong >0x64
->>>0x98 ulelong >0 OKIM6295,
+>>>0x98 ulelong >0 OKIM6295 (ADPCM),
>>0x34 ulelong >0x68
>>>0x9C ulelong >0 K051649,
>>0x34 ulelong >0x6C
@@ -796,10 +825,10 @@
>>0x34 ulelong >0x94
>>>0xC8 ulelong >0 SAA1099,
>>0x34 ulelong >0x98
->>>0xCC ulelong >0 ES5503,
+>>>0xCC ulelong >0 ES5503 (DOC),
>>0x34 ulelong >0x9C
->>>0xD0 lelong >0 ES5505,
->>>0xD0 lelong <0 ES5506,
+>>>0xD0 lelong >0 ES5505 (OTIS),
+>>>0xD0 lelong <0 ES5506 (OTTO),
>>0x34 ulelong >0xA4
>>>0xD8 ulelong >0 X1-010,
>>0x34 ulelong >0xA8
@@ -847,16 +876,16 @@
>>18 ubyte x \b, language ID %d
# structure for phrases/sentences?
# number of voice sample in the 1st phrase?
-#>>19 uleshort x \b, 0x%x samples
-#>>>21 uleshort >0 \b, at 0x%4.4x
-#>>>(21.s) ubequad x 0x%llx
+#>>19 uleshort x \b, %#x samples
+#>>>21 uleshort >0 \b, at %#4.4x
+#>>>(21.s) ubequad x %#llx
# 2nd phrase?
-#>>23 uleshort x \b, 0x%x samples
-#>>>25 uleshort >0 \b, at 0x%4.4x
-#>>>(25.s) ubequad x 0x%llx
+#>>23 uleshort x \b, %#x samples
+#>>>25 uleshort >0 \b, at %#4.4x
+#>>>(25.s) ubequad x %#llx
# pointer to 1st audio WAV sample
>>16 uleshort >0
->>>(16.s) ulelong >0 \b, at 0x%x
+>>>(16.s) ulelong >0 \b, at %#x
# WAV length
# 1 space char after "bytes" to get phrase "bytes RIFF"
>>>>(16.s+4) ulelong >0 %u bytes
@@ -894,11 +923,6 @@
>0x3 byte&0x0F x \b%02d
>>0x4 string >\0 title: "%s"
-0 string HVL
->3 byte <2 Hively Tracker Song
->3 byte 0 1 module data
->3 byte 1 2 module data
-
0 string MO3
>3 ubyte <6 MOdule with MP3
>>3 byte 0 Version 0 (With MP3 and lossless)
@@ -1136,3 +1160,132 @@
>>0 use nintendo-3ds-bcwav-fields
>4 beshort 0xFEFF
>>0 use \^nintendo-3ds-bcwav-fields
+
+# Philips DSDIFF audio format (Direct Stream Digital Interchange File Format)
+# Used for DSD audio recordings and Super Audio CD (SACD) mastering annotations
+# https://dsd-guide.com/sites/default/files/white-papers/DSDIFF_1.5_Spec.pdf
+# From: Toni Ruottu <toni.ruottu@iki.fi>
+0 string FRM8
+12 string DSD\x20 DSDIFF audio bitstream data
+!:mime audio/x-dff
+!:ext dff
+
+# format version chunk
+>&0 string FVER
+# version 1
+>>&8 byte 1
+
+# v1 / sampling resolution ( 1 bit PDM only )
+>>>&0 string x \b, 1 bit
+
+# v1 / sound property chunk
+>>>&0 search/0xff PROP
+>>>>&8 string SND
+
+# v1 / sound property chunk / channel configuration chunk
+>>>>>&0 search/0xff CHNL
+>>>>>>&8 ubeshort 1 \b, mono
+>>>>>>&8 ubeshort 2
+>>>>>>>&0 string SLFTSRGT \b, stereo
+>>>>>>>&0 default x \b, 2 channels
+>>>>>>&8 ubeshort 3
+>>>>>>>&0 string SLFTSRGTLFE\x20 \b, 2.1 stereo
+>>>>>>>&0 string SLFTSRGTC\x20\x20\x20 \b, 3.0 stereo
+>>>>>>>&0 default x \b, 3 channels
+>>>>>>&8 ubeshort 4
+>>>>>>>&0 string MLFTMRGTLS\x20\x20RS\x20\x20 \b, 4.0 surround
+>>>>>>>&0 string SLFTSRGTC\x20\x20\x20LFE\x20 \b, 3.1 stereo
+>>>>>>>&0 default x \b, 4 channels
+>>>>>>&8 ubeshort 5
+>>>>>>>&0 string MLFTMRGTC\x20\x20\x20LS\x20\x20RS\x20\x20 \b, 5.0 surround
+>>>>>>>&0 string MLFTMRGTLFE\x20LS\x20\x20RS\x20\x20 \b, 4.1 surround
+>>>>>>>&0 default x \b, 5 channels
+>>>>>>&8 ubeshort 6
+>>>>>>>&0 string MLFTMRGTC\x20\x20\x20LFE\x20LS\x20\x20RS\x20\x20 \b, 5.1 surround
+>>>>>>>&0 default x \b, 6 channels
+>>>>>>&8 ubeshort >6 \b, %u channels
+
+# v1 / sound property chunk / sample rate chunk
+>>>>>&0 search/0xff FS\x20\x20
+>>>>>>&0 string x \b,
+>>>>>>&8 ubelong%44100 0
+>>>>>>>&-4 ubelong/44100 x "DSD %u"
+>>>>>>>&-4 ubelong x %u Hz
+
+# v1 / sound property chunk / compression type chunk
+>>>>>&0 search/0xff CMPR
+>>>>>>&8 string DSD\x20 \b, no compression
+>>>>>>&8 string DST\x20 \b, DST compression
+>>>>>>&8 default x \b, unknown compression
+
+# v1 / quest for metadata
+>>>&0 string x
+
+# v1 / quest for metadata / edited master information chunk
+>>>>&0 search DIIN
+>>>>>&0 ubequad >0 \b, "edited master" metadata
+
+# v1 / quest for metadata / ID3 chunk ( defacto standard )
+>>>>&0 search ID3\x20
+>>>>>&8 string ID3 \b, ID3 version 2
+>>>>>&0 byte x \b.%u
+>>>>>&1 byte x \b.%u
+
+# v1 / quest for metadata / failure ( possibly due to -P bytes=... being too low )
+>>>>&0 default x \b, ID3 missing (or unreachable)
+
+# version > 1 or 0
+>>&0 default x \b, unknown version
+
+# Sony DSF audio format (Direct Stream Digital Stream File)
+# Used for lossless digital storage of songs produced as DSD audio
+# Portable analog of a track stored on a Super Audio CD (SACD)
+# https://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf
+# From: Toni Ruottu <toni.ruottu@iki.fi>
+0 string DSD\x20 DSF audio bitstream data
+!:mime audio/x-dsf
+!:ext dsf
+
+# format chunk
+>28 string fmt\x20
+# version 1
+>>&8 ulelong 1
+
+# v1 / sampling resolution ( 1 bit PDM only )
+# NOTE: the spec incorrectly uses "bits per sample" instead of "bits per byte"
+>>>&0 string x \b, 1 bit
+
+# v1 / channel configuration
+>>>>&4 ulelong 1 \b, mono
+>>>>&4 ulelong 2 \b, stereo
+>>>>&4 ulelong 3 \b, 3.0 stereo
+>>>>&4 ulelong 4 \b, 4.0 surround
+>>>>&4 ulelong 5 \b, 3.1 stereo
+>>>>&4 ulelong 6 \b, 5.0 surround
+>>>>&4 ulelong 7 \b, 5.1 surround
+>>>>&0 default x
+>>>>>&4 ulelong x \b, %u channels
+
+# v1 / sample rate chunk
+>>>>&0 string x \b,
+>>>>&12 ulelong%44100 0
+>>>>>&-4 ulelong/44100 x "DSD %u"
+>>>>&12 ulelong x %u Hz
+
+# v1 / compression
+>>>>&0 string x
+>>>>>&0 ulelong 0 \b, no compression
+>>>>>&0 default x \b, unknown compression
+
+# v1 / embedded ID3v2 metadata
+>>>0 string x \b, ID3
+>>>>20 ulequad !0
+>>>>>(20.q) string ID3 version 2
+>>>>>>&0 byte x \b.%u
+>>>>>>&1 byte x \b.%u
+# unable to verify ID3 ( possibly due to -P bytes=... being too low )
+>>>>>&0 default x unreachable
+>>>>&0 default x missing
+
+# version > 1 or 0
+>>&0 default x \b, unknown version