"Fossies" - the Fresh Open Source Software Archive

Member "file-5.35/magic/Magdir/audio" (18 Oct 2018, 29217 Bytes) of package /linux/misc/file-5.35.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "audio": 5.34_vs_5.35.

    1 
    2 #------------------------------------------------------------------------------
    3 # $File: audio,v 1.93 2018/10/18 23:35:42 christos Exp $
    4 # audio:  file(1) magic for sound formats (see also "iff")
    5 #
    6 # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
    7 # and others
    8 #
    9 
   10 # Sun/NeXT audio data
   11 0	string		.snd		Sun/NeXT audio data:
   12 >12	belong		1		8-bit ISDN mu-law,
   13 !:mime	audio/basic
   14 >12	belong		2		8-bit linear PCM [REF-PCM],
   15 !:mime	audio/basic
   16 >12	belong		3		16-bit linear PCM,
   17 !:mime	audio/basic
   18 >12	belong		4		24-bit linear PCM,
   19 !:mime	audio/basic
   20 >12	belong		5		32-bit linear PCM,
   21 !:mime	audio/basic
   22 >12	belong		6		32-bit IEEE floating point,
   23 !:mime	audio/basic
   24 >12	belong		7		64-bit IEEE floating point,
   25 !:mime	audio/basic
   26 >12	belong		8		Fragmented sample data,
   27 >12	belong		10		DSP program,
   28 >12	belong		11		8-bit fixed point,
   29 >12	belong		12		16-bit fixed point,
   30 >12	belong		13		24-bit fixed point,
   31 >12	belong		14		32-bit fixed point,
   32 >12	belong		18		16-bit linear with emphasis,
   33 >12	belong		19		16-bit linear compressed,
   34 >12	belong		20		16-bit linear with emphasis and compression,
   35 >12	belong		21		Music kit DSP commands,
   36 >12	belong		23		8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
   37 !:mime  audio/x-adpcm
   38 >12	belong		24		compressed (8-bit CCITT G.722 ADPCM)
   39 >12	belong		25		compressed (3-bit CCITT G.723.3 ADPCM),
   40 >12	belong		26		compressed (5-bit CCITT G.723.5 ADPCM),
   41 >12	belong		27		8-bit A-law (CCITT G.711),
   42 >20	belong		1		mono,
   43 >20	belong		2		stereo,
   44 >20	belong		4		quad,
   45 >16	belong		>0		%d Hz
   46 
   47 # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
   48 # that uses little-endian encoding and has a different magic number
   49 0	lelong		0x0064732E	DEC audio data:
   50 >12	lelong		1		8-bit ISDN mu-law,
   51 !:mime	audio/x-dec-basic
   52 >12	lelong		2		8-bit linear PCM [REF-PCM],
   53 !:mime	audio/x-dec-basic
   54 >12	lelong		3		16-bit linear PCM,
   55 !:mime	audio/x-dec-basic
   56 >12	lelong		4		24-bit linear PCM,
   57 !:mime	audio/x-dec-basic
   58 >12	lelong		5		32-bit linear PCM,
   59 !:mime	audio/x-dec-basic
   60 >12	lelong		6		32-bit IEEE floating point,
   61 !:mime	audio/x-dec-basic
   62 >12	lelong		7		64-bit IEEE floating point,
   63 !:mime	audio/x-dec-basic
   64 >12	belong		8		Fragmented sample data,
   65 >12	belong		10		DSP program,
   66 >12	belong		11		8-bit fixed point,
   67 >12	belong		12		16-bit fixed point,
   68 >12	belong		13		24-bit fixed point,
   69 >12	belong		14		32-bit fixed point,
   70 >12	belong		18		16-bit linear with emphasis,
   71 >12	belong		19		16-bit linear compressed,
   72 >12	belong		20		16-bit linear with emphasis and compression,
   73 >12	belong		21		Music kit DSP commands,
   74 >12	lelong		23		8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
   75 !:mime	audio/x-dec-basic
   76 >12	belong		24		compressed (8-bit CCITT G.722 ADPCM)
   77 >12	belong		25		compressed (3-bit CCITT G.723.3 ADPCM),
   78 >12	belong		26		compressed (5-bit CCITT G.723.5 ADPCM),
   79 >12	belong		27		8-bit A-law (CCITT G.711),
   80 >20	lelong		1		mono,
   81 >20	lelong		2		stereo,
   82 >20	lelong		4		quad,
   83 >16	lelong		>0		%d Hz
   84 
   85 # Creative Labs AUDIO stuff
   86 0	string	MThd			Standard MIDI data
   87 !:mime	audio/midi
   88 >8 	beshort	x			(format %d)
   89 >10	beshort	x			using %d track
   90 >10	beshort		>1		\bs
   91 >12	beshort&0x7fff	x		at 1/%d
   92 >12	beshort&0x8000	>0		SMPTE
   93 
   94 0	string	CTMF			Creative Music (CMF) data
   95 !:mime	audio/x-unknown
   96 0	string	SBI			SoundBlaster instrument data
   97 !:mime	audio/x-unknown
   98 0	string	Creative\ Voice\ File	Creative Labs voice data
   99 !:mime	audio/x-unknown
  100 # is this next line right?  it came this way...
  101 >19	byte	0x1A
  102 >23	byte	>0			- version %d
  103 >22	byte	>0			\b.%d
  104 
  105 # first entry is also the string "NTRK"
  106 0	belong		0x4e54524b	MultiTrack sound data
  107 >4	belong		x		- version %d
  108 
  109 # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
  110 # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
  111 0	string		EMOD		Extended MOD sound data,
  112 >4	byte&0xf0	x		version %d
  113 >4	byte&0x0f	x		\b.%d,
  114 >45	byte		x		%d instruments
  115 >83	byte		0		(module)
  116 >83	byte		1		(song)
  117 
  118 # Real Audio (Magic .ra\0375)
  119 0	belong		0x2e7261fd	RealAudio sound file
  120 !:mime	audio/x-pn-realaudio
  121 0	string		.RMF\0\0\0	RealMedia file
  122 !:mime	application/vnd.rn-realmedia
  123 #video/x-pn-realvideo
  124 #video/vnd.rn-realvideo
  125 #application/vnd.rn-realmedia
  126 #	sigh, there are many mimes for that but the above are the most common.
  127 
  128 # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
  129 # Oct 31, 1995
  130 # fixed by <doj@cubic.org> 2003-06-24
  131 # Too short...
  132 #0	string		MTM		MultiTracker Module sound file
  133 #0	string		if		Composer 669 Module sound data
  134 #0	string		JN		Composer 669 Module sound data (extended format)
  135 0	string		MAS_U		ULT(imate) Module sound data
  136 
  137 #0	string		FAR		Module sound data
  138 #>4	string		>\15		Title: "%s"
  139 
  140 0x2c	string		SCRM		ScreamTracker III Module sound data
  141 >0	string		>\0		Title: "%s"
  142 
  143 # Gravis UltraSound patches
  144 # From <ache@nagual.ru>
  145 
  146 0	string		GF1PATCH110\0ID#000002\0	GUS patch
  147 0	string		GF1PATCH100\0ID#000002\0	Old GUS	patch
  148 
  149 # mime types according to http://www.geocities.com/nevilo/mod.htm:
  150 #	audio/it	.it
  151 #	audio/x-zipped-it	.itz
  152 #	audio/xm	fasttracker modules
  153 #	audio/x-s3m	screamtracker modules
  154 #	audio/s3m	screamtracker modules
  155 #	audio/x-zipped-mod	mdz
  156 #	audio/mod	mod
  157 #	audio/x-mod	All modules (mod, s3m, 669, mtm, med, xm, it, mdz, stm, itz, xmz, s3z)
  158 
  159 #
  160 # Taken from loader code from mikmod version 2.14
  161 # by Steve McIntyre (stevem@chiark.greenend.org.uk)
  162 # <doj@cubic.org> added title printing on 2003-06-24
  163 0	string	MAS_UTrack_V00
  164 >14	string	>/0		ultratracker V1.%.1s module sound data
  165 !:mime	audio/x-mod
  166 #audio/x-tracker-module
  167 
  168 0	string	UN05		MikMod UNI format module sound data
  169 
  170 0	string	Extended\ Module: Fasttracker II module sound data
  171 !:mime	audio/x-mod
  172 #audio/x-tracker-module
  173 >17	string	>\0		Title: "%s"
  174 
  175 21	string/c	=!SCREAM!	Screamtracker 2 module sound data
  176 !:mime	audio/x-mod
  177 #audio/x-screamtracker-module
  178 21	string	BMOD2STM	Screamtracker 2 module sound data
  179 !:mime	audio/x-mod
  180 #audio/x-screamtracker-module
  181 1080	string	M.K.		4-channel Protracker module sound data
  182 !:mime	audio/x-mod
  183 #audio/x-protracker-module
  184 >0	string	>\0		Title: "%s"
  185 1080	string	M!K!		4-channel Protracker module sound data
  186 !:mime	audio/x-mod
  187 #audio/x-protracker-module
  188 >0	string	>\0		Title: "%s"
  189 1080	string	FLT4		4-channel Startracker module sound data
  190 !:mime	audio/x-mod
  191 #audio/x-startracker-module
  192 >0	string	>\0		Title: "%s"
  193 1080	string	FLT8		8-channel Startracker module sound data
  194 !:mime	audio/x-mod
  195 #audio/x-startracker-module
  196 >0	string	>\0		Title: "%s"
  197 1080	string	4CHN		4-channel Fasttracker module sound data
  198 !:mime	audio/x-mod
  199 #audio/x-fasttracker-module
  200 >0	string	>\0		Title: "%s"
  201 1080	string	6CHN		6-channel Fasttracker module sound data
  202 !:mime	audio/x-mod
  203 #audio/x-fasttracker-module
  204 >0	string	>\0		Title: "%s"
  205 1080	string	8CHN		8-channel Fasttracker module sound data
  206 !:mime	audio/x-mod
  207 #audio/x-fasttracker-module
  208 >0	string	>\0		Title: "%s"
  209 1080	string	CD81		8-channel Octalyser module sound data
  210 !:mime	audio/x-mod
  211 #audio/x-octalysertracker-module
  212 >0	string	>\0		Title: "%s"
  213 1080	string	OKTA		8-channel Octalyzer module sound data
  214 !:mime	audio/x-mod
  215 #audio/x-octalysertracker-module
  216 >0	string	>\0		Title: "%s"
  217 # Not good enough.
  218 #1082	string	CH
  219 #>1080	string	>/0		%.2s-channel Fasttracker "oktalyzer" module sound data
  220 1080	string	16CN		16-channel Taketracker module sound data
  221 !:mime	audio/x-mod
  222 #audio/x-taketracker-module
  223 >0	string	>\0		Title: "%s"
  224 1080	string	32CN		32-channel Taketracker module sound data
  225 !:mime	audio/x-mod
  226 #audio/x-taketracker-module
  227 >0	string	>\0		Title: "%s"
  228 
  229 # TOC sound files -Trevor Johnson <trevor@jpj.net>
  230 #
  231 0       string          TOC             TOC sound file
  232 
  233 # sidfiles <pooka@iki.fi>
  234 # added name,author,(c) and new RSID type by <doj@cubic.org> 2003-06-24
  235 0	string		SIDPLAY\ INFOFILE	Sidplay info file
  236 
  237 0	string		PSID			PlaySID v2.2+ (AMIGA) sidtune
  238 >4	beshort		>0			w/ header v%d,
  239 >14	beshort		=1			single song,
  240 >14	beshort		>1			%d songs,
  241 >16	beshort		>0			default song: %d
  242 >0x16	string		>\0			name: "%s"
  243 >0x36	string		>\0			author: "%s"
  244 >0x56	string		>\0			copyright: "%s"
  245 
  246 0	string		RSID			RSID sidtune PlaySID compatible
  247 >4	beshort		>0			w/ header v%d,
  248 >14	beshort		=1			single song,
  249 >14	beshort		>1			%d songs,
  250 >16	beshort		>0			default song: %d
  251 >0x16	string		>\0			name: "%s"
  252 >0x36	string		>\0			author: "%s"
  253 >0x56	string		>\0			copyright: "%s"
  254 
  255 # IRCAM sound files - Michael Pruett <michael@68k.org>
  256 # http://www-mmsp.ece.mcgill.ca/documents/AudioFormats/IRCAM/IRCAM.html
  257 0	belong		0x64a30100		IRCAM file (VAX little-endian)
  258 0	belong		0x0001a364		IRCAM file (VAX big-endian)
  259 0	belong		0x64a30200		IRCAM file (Sun big-endian)
  260 0	belong		0x0002a364		IRCAM file (Sun little-endian)
  261 0	belong		0x64a30300		IRCAM file (MIPS little-endian)
  262 0	belong		0x0003a364		IRCAM file (MIPS big-endian)
  263 0	belong		0x64a30400		IRCAM file (NeXT big-endian)
  264 0	belong		0x64a30400		IRCAM file (NeXT big-endian)
  265 0	belong		0x0004a364		IRCAM file (NeXT little-endian)
  266 
  267 # NIST SPHERE <mpruett@sgi.com>
  268 0	string		NIST_1A\n\ \ \ 1024\n	NIST SPHERE file
  269 
  270 # Sample Vision <mpruett@sgi.com>
  271 0	string		SOUND\ SAMPLE\ DATA\ 	Sample Vision file
  272 
  273 # Audio Visual Research <tonigonenstein@users.sourceforge.net>
  274 0	string		2BIT			Audio Visual Research file,
  275 >12	beshort		=0			mono,
  276 >12	beshort		=-1			stereo,
  277 >14	beshort		x			%d bits
  278 >16	beshort		=0			unsigned,
  279 >16	beshort		=-1			signed,
  280 >22	belong&0x00ffffff	x		%d Hz,
  281 >18	beshort		=0			no loop,
  282 >18	beshort		=-1			loop,
  283 >21	ubyte		<128			note %d,
  284 >22	byte		=0			replay 5.485 KHz
  285 >22	byte		=1			replay 8.084 KHz
  286 >22	byte		=2			replay 10.971 KHz
  287 >22	byte		=3			replay 16.168 KHz
  288 >22	byte		=4			replay 21.942 KHz
  289 >22	byte		=5			replay 32.336 KHz
  290 >22	byte		=6			replay 43.885 KHz
  291 >22	byte		=7			replay 47.261 KHz
  292 
  293 # SGI SoundTrack <mpruett@sgi.com>
  294 0	string		_SGI_SoundTrack		SGI SoundTrack project file
  295 # ID3 version 2 tags <waschk@informatik.uni-rostock.de>
  296 0	string		ID3	Audio file with ID3 version 2
  297 >3	byte		x	\b.%d
  298 >4	byte		x	\b.%d
  299 >>5	byte		&0x80	\b, unsynchronized frames
  300 >>5	byte		&0x40	\b, extended header
  301 >>5	byte		&0x20	\b, experimental
  302 >>5	byte		&0x10	\b, footer present
  303 >(6.I+10)	indirect	x	\b, contains:
  304 
  305 # NSF (NES sound file) magic
  306 0	string		NESM\x1a	NES Sound File
  307 >14	string		>\0		("%s" by
  308 >46	string		>\0		%s, copyright
  309 >78	string		>\0		%s),
  310 >5	byte		x		version %d,
  311 >6	byte		x		%d tracks,
  312 >122	byte&0x2	=1		dual PAL/NTSC
  313 >122	byte&0x1	=1		PAL
  314 >122	byte&0x1	=0		NTSC
  315 
  316 # NSFE (Extended NES sound file) magic
  317 # http://slickproductions.org/docs/NSF/nsfespec.txt
  318 # From: David Pflug <david@pflug.email>
  319 0	string		NSFE		Extended NES Sound File
  320 >48	search/0x1000	auth
  321 >>&0	string		>\0		("%s"
  322 >>>&1	string		>\0		by %s
  323 >>>>&1	string		>\0		\b, copyright %s
  324 >>>>>&1	string		>\0		\b, ripped by %s
  325 >20	byte		x		\b), %d tracks,
  326 >18	byte&0x2	=1		dual PAL/NTSC
  327 >18     byte&0x2	=0
  328 >>18	byte&0x1	=1		PAL
  329 >>18	byte&0x1	=0		NTSC
  330 
  331 # Type: SNES SPC700 sound files
  332 # From: Josh Triplett <josh@freedesktop.org>
  333 0	string	SNES-SPC700\ Sound\ File\ Data\ v	SNES SPC700 sound file
  334 >&0	string	0.30					\b, version %s
  335 >>0x23	byte	0x1B					\b, without ID666 tag
  336 >>0x23	byte	0x1A					\b, with ID666 tag
  337 >>>0x2E	string	>\0					\b, song "%.32s"
  338 >>>0x4E	string	>\0					\b, game "%.32s"
  339 
  340 # Impulse tracker module (audio/x-it)
  341 0	string		IMPM		Impulse Tracker module sound data -
  342 !:mime	audio/x-mod
  343 >4	string		>\0		"%s"
  344 >40	leshort		!0		compatible w/ITv%x
  345 >42	leshort		!0		created w/ITv%x
  346 
  347 # Imago Orpheus module (audio/x-imf)
  348 60	string		IM10		Imago Orpheus module sound data -
  349 >0	string		>\0		"%s"
  350 
  351 # From <collver1@attbi.com>
  352 # These are the /etc/magic entries to decode modules, instruments, and
  353 # samples in Impulse Tracker's native format.
  354 
  355 0	string		IMPS		Impulse Tracker Sample
  356 >18	byte		&2		16 bit
  357 >18	byte		^2		8 bit
  358 >18	byte		&4		stereo
  359 >18	byte		^4		mono
  360 0	string		IMPI		Impulse Tracker Instrument
  361 >28	leshort		!0		ITv%x
  362 >30	byte		!0		%d samples
  363 
  364 # Yamaha TX Wave:  file(1) magic for Yamaha TX Wave audio files
  365 # From <collver1@attbi.com>
  366 0	string		LM8953		Yamaha TX Wave
  367 >22	byte		0x49		looped
  368 >22	byte		0xC9		non-looped
  369 >23	byte		1		33kHz
  370 >23	byte		2		50kHz
  371 >23	byte		3		16kHz
  372 
  373 # scream tracker:  file(1) magic for Scream Tracker sample files
  374 #
  375 # From <collver1@attbi.com>
  376 76	string		SCRS		Scream Tracker Sample
  377 >0	byte		1		sample
  378 >0	byte		2		adlib melody
  379 >0	byte		>2		adlib drum
  380 >31	byte		&2		stereo
  381 >31	byte		^2		mono
  382 >31	byte		&4		16bit little endian
  383 >31	byte		^4		8bit
  384 >30	byte		0		unpacked
  385 >30	byte		1		packed
  386 
  387 # audio
  388 # From: Cory Dikkers <cdikkers@swbell.net>
  389 0	string		MMD0		MED music file, version 0
  390 0	string		MMD1		OctaMED Pro music file, version 1
  391 0	string		MMD3		OctaMED Soundstudio music file, version 3
  392 0	string		OctaMEDCmpr	OctaMED Soundstudio compressed file
  393 0	string		MED		MED_Song
  394 0	string		SymM		Symphonie SymMOD music file
  395 #
  396 # Track Length (TRL), Tracks (TRK), Samples (SMP), Subsongs (SS)
  397 # http://lclevy.free.fr/exotica/ahx/ahxformat.txt
  398 0	string		THX		AHX version
  399 >3	byte		=0		1 module data
  400 >3	byte		=1		2 module data
  401 >10	byte		x		TRL: %u
  402 >11	byte		x		TRK: %u
  403 >12	byte		x		SMP: %u
  404 >13	byte		x		SS: %u
  405 #
  406 0	string		OKTASONG	Oktalyzer module data
  407 #
  408 0	string		DIGI\ Booster\ module\0	%s
  409 >20	byte		>0		%c
  410 >>21	byte		>0		\b%c
  411 >>>22	byte		>0		\b%c
  412 >>>>23	byte		>0		\b%c
  413 >610	string		>\0		\b, "%s"
  414 #
  415 0	string		DBM0	   	DIGI Booster Pro Module
  416 >4	byte		>0		V%X.
  417 >>5	byte		x		\b%02X
  418 >16	string		>\0		\b, "%s"
  419 #
  420 0	string		FTMN		FaceTheMusic module
  421 >16	string		>\0d		\b, "%s"
  422 
  423 # From: <doj@cubic.org> 2003-06-24
  424 0	string		AMShdr\32	Velvet Studio AMS Module v2.2
  425 0	string		Extreme		Extreme Tracker AMS Module v1.3
  426 0	string		DDMF		Xtracker DMF Module
  427 >4	byte		x		v%i
  428 >0xD	string		>\0		Title: "%s"
  429 >0x2B	string		>\0		Composer: "%s"
  430 0	string		DSM\32		Dynamic Studio Module DSM
  431 0	string		SONG		DigiTrekker DTM Module
  432 0	string		DMDL		DigiTrakker MDL Module
  433 0	string		PSM\32		Protracker Studio PSM Module
  434 44	string		PTMF		Poly Tracker PTM Module
  435 >0	string		>\32		Title: "%s"
  436 0	string		MT20		MadTracker 2.0 Module MT2
  437 0	string		RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
  438 0	string		RTMM		RTM Module
  439 0x426	string		MaDoKaN96	XMS Adlib Module
  440 >0	string		>\0		Composer: "%s"
  441 0	string		AMF		AMF Module
  442 >4	string		>\0		Title: "%s"
  443 0	string		MODINFO1	Open Cubic Player Module Inforation MDZ
  444 0	string		Extended\40Instrument: Fast Tracker II Instrument
  445 
  446 # From: Takeshi Hamasaki <hma@syd.odn.ne.jp>
  447 # NOA Nancy Codec file
  448 0	string		\210NOA\015\012\032	NOA Nancy Codec Movie file
  449 # Yamaha SMAF format
  450 0	string		MMMD		Yamaha SMAF file
  451 # Sharp Jisaku Melody format for PDC
  452 0	string		\001Sharp\040JisakuMelody	SHARP Cell-Phone ringing Melody
  453 >20	string		Ver01.00	Ver. 1.00
  454 >>32	byte		x		, %d tracks
  455 
  456 # Free lossless audio codec <http://flac.sourceforge.net>
  457 # From: Przemyslaw Augustyniak <silvathraec@rpg.pl>
  458 0	string			fLaC		FLAC audio bitstream data
  459 !:mime	audio/flac
  460 >4	byte&0x7f		>0		\b, unknown version
  461 >4	byte&0x7f		0		\b
  462 # some common bits/sample values
  463 >>20	beshort&0x1f0		0x030		\b, 4 bit
  464 >>20	beshort&0x1f0		0x050		\b, 6 bit
  465 >>20	beshort&0x1f0		0x070		\b, 8 bit
  466 >>20	beshort&0x1f0		0x0b0		\b, 12 bit
  467 >>20	beshort&0x1f0		0x0f0		\b, 16 bit
  468 >>20	beshort&0x1f0		0x170		\b, 24 bit
  469 >>20	byte&0xe		0x0		\b, mono
  470 >>20	byte&0xe		0x2		\b, stereo
  471 >>20	byte&0xe		0x4		\b, 3 channels
  472 >>20	byte&0xe		0x6		\b, 4 channels
  473 >>20	byte&0xe		0x8		\b, 5 channels
  474 >>20	byte&0xe		0xa		\b, 6 channels
  475 >>20	byte&0xe		0xc		\b, 7 channels
  476 >>20	byte&0xe		0xe		\b, 8 channels
  477 # sample rates derived from known oscillator frequencies;
  478 # 24.576 MHz (video/fs=48kHz), 22.5792 (audio/fs=44.1kHz) and
  479 # 16.384 (other/fs=32kHz).
  480 >>17	belong&0xfffff0       	0x02b110	\b, 11.025 kHz
  481 >>17	belong&0xfffff0       	0x03e800	\b, 16 kHz
  482 >>17	belong&0xfffff0       	0x056220	\b, 22.05 kHz
  483 >>17	belong&0xfffff0       	0x05dc00	\b, 24 kHz
  484 >>17	belong&0xfffff0       	0x07d000	\b, 32 kHz
  485 >>17	belong&0xfffff0       	0x0ac440	\b, 44.1 kHz
  486 >>17	belong&0xfffff0       	0x0bb800	\b, 48 kHz
  487 >>17	belong&0xfffff0       	0x0fa000	\b, 64 kHz
  488 >>17	belong&0xfffff0       	0x158880	\b, 88.2 kHz
  489 >>17	belong&0xfffff0       	0x177000	\b, 96 kHz
  490 >>17	belong&0xfffff0       	0x1f4000	\b, 128 kHz
  491 >>17	belong&0xfffff0       	0x2b1100	\b, 176.4 kHz
  492 >>17	belong&0xfffff0       	0x2ee000	\b, 192 kHz
  493 >>17	belong&0xfffff0       	0x3e8000	\b, 256 kHz
  494 >>17	belong&0xfffff0       	0x562200	\b, 352.8 kHz
  495 >>17	belong&0xfffff0       	0x5dc000	\b, 384 kHz
  496 >>21	byte&0xf		>0		\b, >4G samples
  497 >>21	byte&0xf		0		\b
  498 >>>22	belong			>0		\b, %u samples
  499 >>>22	belong			0		\b, length unknown
  500 
  501 # (ISDN) VBOX voice message file (Wolfram Kleff)
  502 0       string          VBOX            VBOX voice message data
  503 
  504 # ReBorn Song Files (.rbs)
  505 # David J. Singer <doc@deadvirgins.org.uk>
  506 8       string          RB40             RBS Song file
  507 >29     string          ReBorn           created by ReBorn
  508 >37     string          Propellerhead    created by ReBirth
  509 
  510 # Synthesizer Generator and Kimwitu share their file format
  511 0	string		A#S#C#S#S#L#V#3	    Synthesizer Generator or Kimwitu data
  512 # Kimwitu++ uses a slightly different magic
  513 0	string		A#S#C#S#S#L#HUB	    Kimwitu++ data
  514 
  515 # From "Simon Hosie
  516 0       string  TFMX-SONG       TFMX module sound data
  517 
  518 # Monkey's Audio compressed audio format (.ape)
  519 # From danny.milo@gmx.net (Danny Milosavljevic)
  520 # New version from Abel Cheung <abel (@) oaka.org>
  521 0		string		MAC\040		Monkey's Audio compressed format
  522 !:mime audio/x-ape
  523 >4		uleshort	>0x0F8B		version %d
  524 >>(0x08.l)	uleshort	=1000		with fast compression
  525 >>(0x08.l)	uleshort	=2000		with normal compression
  526 >>(0x08.l)	uleshort	=3000		with high compression
  527 >>(0x08.l)	uleshort	=4000		with extra high compression
  528 >>(0x08.l)	uleshort	=5000		with insane compression
  529 >>(0x08.l+18)	uleshort	=1		\b, mono
  530 >>(0x08.l+18)	uleshort	=2		\b, stereo
  531 >>(0x08.l+20)	ulelong		x		\b, sample rate %d
  532 >4		uleshort	<0x0F8C		version %d
  533 >>6		uleshort	=1000		with fast compression
  534 >>6		uleshort	=2000		with normal compression
  535 >>6		uleshort	=3000		with high compression
  536 >>6		uleshort	=4000		with extra high compression
  537 >>6		uleshort	=5000		with insane compression
  538 >>10		uleshort	=1		\b, mono
  539 >>10		uleshort	=2		\b, stereo
  540 >>12		ulelong		x		\b, sample rate %d
  541 
  542 # adlib sound files
  543 # From: Alex Myczko <alex@aiei.ch>
  544 0    	string		RAWADATA	RdosPlay RAW
  545 
  546 1068	string		RoR		AMUSIC Adlib Tracker
  547 
  548 0	string		JCH		EdLib
  549 
  550 0	string		mpu401tr	MPU-401 Trakker
  551 
  552 0	string		SAdT		Surprise! Adlib Tracker
  553 >4	byte		x		Version %d
  554 
  555 0	string		XAD!		eXotic ADlib
  556 
  557 0	string		ofTAZ!		eXtra Simple Music
  558 
  559 0	string		FMK!		FM Kingtracker Song
  560 
  561 0	string		DFM		DFM Song
  562 
  563 0	string		\<CUD-FM-File\>	CFF Song
  564 
  565 0	string		_A2module	A2M Song
  566 
  567 # Spectrum 128 tunes (.ay files).
  568 # From: Emanuel Haupt <ehaupt@critical.ch>
  569 0	string		ZXAYEMUL	Spectrum 128 tune
  570 
  571 0	string		\0BONK		BONK,
  572 #>5	byte		x		version %d
  573 >14	byte		x		%d channel(s),
  574 >15	byte		=1		lossless,
  575 >15	byte		=0		lossy,
  576 >16	byte		x		mid-side
  577 
  578 384	string		LockStream	LockStream Embedded file (mostly MP3 on old Nokia phones)
  579 
  580 # format VQF (proprietary codec for sound)
  581 # some infos on the header file available at :
  582 # http://www.twinvq.org/english/technology_format.html
  583 0	string		TWIN97012000	VQF data
  584 >27	short		0		\b, Mono
  585 >27	short		1		\b, Stereo
  586 >31	short 		>0		\b, %d kbit/s
  587 >35	short 		>0		\b, %d kHz
  588 
  589 # Nelson A. de Oliveira (naoliv@gmail.com)
  590 # .eqf
  591 0	string	Winamp\ EQ\ library\ file	%s
  592 # it will match only versions like v<digit>.<digit>
  593 # Since I saw only eqf files with version v1.1 I think that it's OK
  594 >23	string	x	\b%.4s
  595 # .preset
  596 0	string	[Equalizer\ preset]	XMMS equalizer preset
  597 # .m3u
  598 0	search/1	#EXTM3U 	M3U playlist text
  599 # .pls
  600 0	search/1	[playlist]	PLS playlist text
  601 # licq.conf
  602 1	string	[licq]			LICQ configuration file
  603 
  604 # Atari ST audio files by Dirk Jagdmann <doj@cubic.org>
  605 0	string		ICE!		SNDH Atari ST music
  606 0	string		SC68\ Music-file\ /\ (c)\ (BeN)jami	sc68 Atari ST music
  607 
  608 # musepak support From: "Jiri Pejchal" <jiri.pejchal@gmail.com>
  609 0       string          MP+     Musepack audio (MP+)
  610 !:mime	audio/x-musepack
  611 >3      byte            255     \b, SV pre8
  612 >3      byte&0xF        0x6     \b, SV 6
  613 >3      byte&0xF        0x8     \b, SV 8
  614 >3      byte&0xF        0x7     \b, SV 7
  615 >>3     byte&0xF0       0x0     \b.0
  616 >>3     byte&0xF0       0x10    \b.1
  617 >>3     byte&0xF0       240     \b.15
  618 >>10    byte&0xF0       0x0     \b, no profile
  619 >>10    byte&0xF0       0x10    \b, profile 'Unstable/Experimental'
  620 >>10    byte&0xF0       0x50    \b, quality 0
  621 >>10    byte&0xF0       0x60    \b, quality 1
  622 >>10    byte&0xF0       0x70    \b, quality 2 (Telephone)
  623 >>10    byte&0xF0       0x80    \b, quality 3 (Thumb)
  624 >>10    byte&0xF0       0x90    \b, quality 4 (Radio)
  625 >>10    byte&0xF0       0xA0    \b, quality 5 (Standard)
  626 >>10    byte&0xF0       0xB0    \b, quality 6 (Xtreme)
  627 >>10    byte&0xF0       0xC0    \b, quality 7 (Insane)
  628 >>10    byte&0xF0       0xD0    \b, quality 8 (BrainDead)
  629 >>10    byte&0xF0       0xE0    \b, quality 9
  630 >>10    byte&0xF0       0xF0    \b, quality 10
  631 >>27    byte            0x0     \b, Buschmann 1.7.0-9, Klemm 0.90-1.05
  632 >>27    byte            102     \b, Beta 1.02
  633 >>27    byte            104     \b, Beta 1.04
  634 >>27    byte            105     \b, Alpha 1.05
  635 >>27    byte            106     \b, Beta 1.06
  636 >>27    byte            110     \b, Release 1.1
  637 >>27    byte            111     \b, Alpha 1.11
  638 >>27    byte            112     \b, Beta 1.12
  639 >>27    byte            113     \b, Alpha 1.13
  640 >>27    byte            114     \b, Beta 1.14
  641 >>27    byte            115     \b, Alpha 1.15
  642 
  643 0       string          MPCK    Musepack audio (MPCK)
  644 !:mime	audio/x-musepack
  645 
  646 # IMY
  647 # from http://filext.com/detaillist.php?extdetail=IMY
  648 # http://cellphones.about.com/od/cellularfaqs/f/rf_imelody.htm
  649 # http://download.ncl.ie/doc/api/ie/ncl/media/music/IMelody.html
  650 # http://www.wx800.com/msg/download/irda/iMelody.pdf
  651 0	string	BEGIN:IMELODY	iMelody Ringtone Format
  652 
  653 # From: "Mateus Caruccio" <mateus@caruccio.com>
  654 # guitar pro v3,4,5 from http://filext.com/file-extension/gp3
  655 0	string	\030FICHIER\ GUITAR\ PRO\ v3.	Guitar Pro Ver. 3 Tablature
  656 
  657 # From: "Leslie P. Polzer" <leslie.polzer@gmx.net>
  658 60	string	SONG		SoundFX Module sound file
  659 
  660 # Type: Adaptive Multi-Rate Codec
  661 # URL:  http://filext.com/detaillist.php?extdetail=AMR
  662 # From: Russell Coker <russell@coker.com.au>
  663 0	string	#!AMR		Adaptive Multi-Rate Codec (GSM telephony)
  664 !:mime	audio/amr
  665 !:ext  amr
  666 
  667 # Type: SuperCollider 3 Synth Definition File Format
  668 # From: Mario Lang <mlang@debian.org>
  669 0	string	SCgf	SuperCollider3 Synth Definition file,
  670 >4	belong	x	version %d
  671 
  672 # Type: True Audio Lossless Audio
  673 # URL:  http://wiki.multimedia.cx/index.php?title=True_Audio
  674 # From: Mike Melanson <mike@multimedia.cx>
  675 0	string	TTA1	True Audio Lossless Audio
  676 
  677 # Type: WavPack Lossless Audio
  678 # URL:  http://wiki.multimedia.cx/index.php?title=WavPack
  679 # From: Mike Melanson <mike@multimedia.cx>
  680 0	string	wvpk	WavPack Lossless Audio
  681 
  682 # From Fabio R. Schmidlin <frs@pop.com.br>
  683 # VGM music file
  684 0	string		Vgm\040
  685 >9	ubyte		>0	VGM Video Game Music dump v
  686 >>9	ubyte/16	>0	\b%d
  687 >>9	ubyte&0x0F	x	\b%d
  688 >>8	ubyte/16	x	\b.%d
  689 >>8	ubyte&0x0F	>0	\b%d
  690 #Get soundchips
  691 >>8	ubyte		x	\b, soundchip(s)=
  692 >>0x0C	ulelong		>0	SN76489,
  693 >>0x10	ulelong		>0	YM2413,
  694 >>0x2C	ulelong		>0	YM2612,
  695 >>0x30	ulelong		>0	YM2151,
  696 >>0x38	ulelong		>0	Sega PCM,
  697 >>0x34	ulelong		>0xC
  698 >>>0x40	ulelong		>0	RF5C68,
  699 >>0x34	ulelong		>0x10
  700 >>>0x44	ulelong		>0	YM2203,
  701 >>0x34	ulelong		>0x14
  702 >>>0x48	ulelong		>0	YM2608,
  703 >>0x34	ulelong		>0x18
  704 >>>0x4C	lelong		>0	YM2610,
  705 >>>0x4C	lelong		<0	YM2610B,
  706 >>0x34	ulelong		>0x1C
  707 >>>0x50	ulelong		>0	YM3812,
  708 >>0x34	ulelong		>0x20
  709 >>>0x54	ulelong		>0	YM3526,
  710 >>0x34	ulelong		>0x24
  711 >>>0x58	ulelong		>0	Y8950,
  712 >>0x34	ulelong		>0x28
  713 >>>0x5C	ulelong		>0	YMF262,
  714 >>0x34	ulelong		>0x2C
  715 >>>0x60	ulelong		>0	YMF278B,
  716 >>0x34	ulelong		>0x30
  717 >>>0x64	ulelong		>0	YMF271,
  718 >>0x34	ulelong		>0x34
  719 >>>0x68	ulelong		>0	YMZ280B,
  720 >>0x34	ulelong		>0x38
  721 >>>0x6C	ulelong		>0	RF5C164,
  722 >>0x34	ulelong		>0x3C
  723 >>>0x70	ulelong		>0	PWM,
  724 >>0x34	ulelong		>0x40
  725 >>>0x74	ulelong		>0
  726 >>>>0x78 ubyte		0x00	AY-3-8910,
  727 >>>>0x78 ubyte		0x01	AY-3-8912,
  728 >>>>0x78 ubyte		0x02	AY-3-8913,
  729 >>>>0x78 ubyte		0x03	AY-3-8930,
  730 >>>>0x78 ubyte		0x10	YM2149,
  731 >>>>0x78 ubyte		0x11	YM3439,
  732 
  733 # GVOX Encore file format
  734 # Since this is a proprietary file format and there is no publicly available
  735 # format specification, this is just based on induction
  736 #
  737 0	string	SCOW
  738 >4	byte	0xc4	GVOX Encore music, version 5.0 or above
  739 >4	byte	0xc2	GVOX Encore music, version < 5.0
  740 
  741 0	string	ZBOT
  742 >4	byte	0xc5	GVOX Encore music, version < 5.0
  743 
  744 # Summary:	Garmin Voice Processing Module (WAVE audios)
  745 # From:		Joerg Jenderek
  746 # URL:		http://www.garmin.com/
  747 # Reference:	http://turboccc.wikispaces.com/share/view/28622555
  748 # NOTE:		there exist 2 other Garmin VPM formats
  749 0		string	AUDIMG
  750 # skip text files starting with string "AUDIMG"
  751 >13		ubyte		<13	Garmin Voice Processing Module
  752 !:mime	audio/x-vpm-wav-garmin
  753 !:ext	vpm
  754 # 3 bytes indicating the voice version (200,220)
  755 >>6		string		x	\b, version %3.3s
  756 # day of release (01-31)
  757 >>12		ubyte		x	\b, %.2d
  758 # month of release (01-12)
  759 >>13		ubyte		x	\b.%.2d
  760 # year of release (like 2006, 2007, 2008)
  761 >>14		uleshort	x	\b.%.4d
  762 # hour of release (0-23)
  763 >>11		ubyte		x	%.2d
  764 # minute of release (0-59)
  765 >>10		ubyte		x	\b:%.2d
  766 # second of release (0-59)
  767 >>9		ubyte		x	\b:%.2d
  768 # if you select a language like german on your garmin device
  769 # you can only select voice modules with corresponding language byte ID like 1
  770 >>18		ubyte		x	\b, language ID %d
  771 # pointer to 1st audio WAV sample
  772 >>16		uleshort	>0
  773 >>>(16.s)	ulelong		>0	\b, at offset 0x%x
  774 # WAV length
  775 >>>>(16.s+4)	ulelong		>0	%d Bytes
  776 # look for magic
  777 >>>>>(&-8.l)	string		RIFF
  778 # determine type by ./riff
  779 >>>>>>&-4	indirect	x	\b
  780 # 2 - ~ 131 WAV samples following same way
  781 
  782 # From Martin Mueller Skarbiniks Pedersen
  783 0		string		GDM
  784 >0x3		byte		0xFE	General Digital Music.
  785 >0x4		string		>\0	title: "%s"
  786 >0x24		string		>\0	musician: "%s"
  787 >>0x44		beshort		0x0D0A
  788 >>>0x46		byte		0x1A
  789 >>>>0x47	string		GMFS	Version
  790 >>>>0x4B	byte		x	%d.
  791 >>>>0x4C	byte		x	\b%02d
  792 >>>>0x4D	beshort		0x000	(2GDM v
  793 >>>>0x4F	byte		x	\b%d.
  794 >>>>>0x50	byte		x	\b%d)
  795 
  796 0		string		MTM	Multitracker
  797 >0x3		byte/16		x	Version %d.
  798 >0x3		byte&0x0F	x	\b%02d
  799 >>0x4		string		>\0	title: "%s"
  800 
  801 0		string		HVL
  802 >3		byte		<2	Hively Tracker Song
  803 >3		byte		0	1 module data
  804 >3		byte		1	2 module data
  805 
  806 0		string		MO3
  807 >3		ubyte		<6	MOdule with MP3
  808 >>3		byte		0	Version	0	(With MP3 and lossless)
  809 >>3		byte		1	Version	1	(With ogg and lossless)
  810 >>3		byte		3	Version 2.2
  811 >>3		byte		4	(With no LAME header)
  812 >>3		byte		5	Version 2.4
  813 
  814 0		string		ADRVPACK	AProSys	module
  815 
  816 # ftp://ftp.modland.com/pub/documents/format_documentation/\
  817 # Art%20Of%20Noise%20(.aon).txt
  818 0		string		AON
  819 >4		string		"ArtOfNoise by Bastian Spiegel(twice/lego)"
  820 >0x2e		string		NAME	Art of Noise Tracker Song
  821 >3		string		<9
  822 >3		string		4	(4 voices)
  823 >3		string		8	(8 voices)
  824 >>0x36		string		>\0	Title: "%s"
  825 
  826 0		string		FAR
  827 >0x2c		byte		0x0d
  828 >0x2d		byte		0x0a
  829 >0x2e		byte		0x1a
  830 >>0x3		byte		0xFE	Farandole Tracker Song
  831 >>>0x31		byte/16		x	Version %d.
  832 >>>0x31		byte&0x0F	x	\b%02d
  833 >>>>0x4		string		>\0	\b, title: "%s"
  834 
  835 # magic for Klystrack, http://kometbomb.github.io/klystrack/
  836 # from Alex Myczko <alex@aiei.ch>
  837 0	string	cyd!song	Klystrack song
  838 >8	byte	>0		\b, version %u
  839 >8	byte	>26
  840 #>>9	byte	x		\b, channels %u
  841 #>>10	leshort	x		\b, time signature %u
  842 #>>12	leshort	x		\b, sequence step %u
  843 #>>14	byte	x		\b, instruments %u
  844 #>>15	leshort	x		\b, patterns %u
  845 #>>17	leshort	x		\b, sequences %u
  846 #>>19	leshort	x		\b, length %u
  847 #>>21	leshort	x		\b, loop point %u
  848 #>>23	byte	x		\b, master volume %u
  849 #>>24	byte	x		\b, song speed %u
  850 #>>25	byte	x		\b, song speed2 %u
  851 #>>26	byte	x		\b, song rate %u
  852 #>>27	belong	x		\b, flags %#x
  853 #>>31	byte	x		\b, multiplex period %u
  854 #>>32	byte	x		\b, pitch inaccuracy %u
  855 >>149	pstring	x		\b, title %s
  856 
  857 0	string	cyd!inst	Klystrack instrument
  858 
  859 # magic for WOPL instrument files, https://github.com/Wohlstand/OPL3BankEditor
  860 # see Specifications/WOPL-and-OPLI-Specification.txt
  861 
  862 0	string	WOPL3-INST\0	WOPL instrument
  863 >11	leshort	x	\b, version %u
  864 0	string	WOPL3-BANK\0	WOPL instrument bank
  865 >11	leshort	x	\b, version %u
  866 
  867 # AdLib/OPL instrument files. Format specifications on
  868 #  http://www.shikadi.net/moddingwiki
  869 0	string	Junglevision\ Patch\ File	Junglevision instrument data
  870 0	string	#OPL_II#	DMX OP2 instrument data
  871 0	string	IBK\x1a		IBK instrument data
  872 0	string	2OP\x1a		IBK instrument data, 2 operators
  873 0	string	4OP\x1a		IBK instrument data, 4 operators
  874 2	string	ADLIB-		AdLib instrument data
  875 >0	byte	x		\b, version %u
  876 >1	byte	x		\b.%u
  877 
  878 # CRI ADX ADPCM audio
  879 # Used by various Sega games.
  880 # https://en.wikipedia.org/wiki/ADX_(file_format)
  881 # https://wiki.multimedia.cx/index.php/CRI_ADX_file
  882 # Added by David Korth <gerbilsoft@gerbilsoft.com>
  883 0x00		beshort		0x8000
  884 >(2.S-2)	string		(c)CRI		CRI ADX ADPCM audio
  885 >>0x12		byte		x		v%u
  886 >>0x04		byte		0x02		\b, pre-set prediction coefficients
  887 >>0x04		byte		0x03		\b, standard ADX
  888 >>0x04		byte		0x04		\b, exponential scale
  889 >>0x04		byte		0x05		\b, AHX
  890 >>0x08		belong		x		\b, %u Hz
  891 >>0x12		byte		0x03
  892 >>>0x02		beshort		>0x2B
  893 >>>>0x18	belong		!0		\b, looping
  894 >>0x12		byte		0x04
  895 >>>0x02		beshort		>0x37
  896 >>>>0x24	belong		!0		\b, looping
  897 >>0x13		byte&0x08	0x08		\b, encrypted
  898 
  899 # Lossless audio (.la) (http://www.lossless-audio.com/)
  900 0	string	LA
  901 >2	string	03	Lossless audio version 0.3
  902 >2	string	04	Lossless audio version 0.4
  903 
  904 # Sony PlayStation Audio (.xa)
  905 0	leshort 0x4158	Sony PlayStation Audio
  906