audio 39 KB

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