audio 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350
  1. #------------------------------------------------------------------------------
  2. # $File: audio,v 1.136 2026/01/23 17:02:27 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 0x0002a364 IRCAM file (Sun little-endian)
  245. 0 belong 0x64a30200 IRCAM file (Sun big-endian)
  246. 0 belong 0x64a30300 IRCAM file (MIPS little-endian)
  247. 0 belong 0x0003a364 IRCAM file (MIPS big-endian)
  248. 0 belong 0x0004a364 IRCAM file (NeXT little-endian)
  249. 0 belong 0x64a30400 IRCAM file (NeXT big-endian)
  250. # NIST SPHERE <mpruett@sgi.com>
  251. 0 string NIST_1A\n\ \ \ 1024\n NIST SPHERE file
  252. # Sample Vision <mpruett@sgi.com>
  253. 0 string SOUND\ SAMPLE\ DATA\ Sample Vision file
  254. # Audio Visual Research <tonigonenstein@users.sourceforge.net>
  255. 0 string 2BIT Audio Visual Research file,
  256. >12 beshort =0 mono,
  257. >12 beshort =-1 stereo,
  258. >14 beshort x %d bits
  259. >16 beshort =0 unsigned,
  260. >16 beshort =-1 signed,
  261. >22 belong&0x00ffffff x %d Hz,
  262. >18 beshort =0 no loop,
  263. >18 beshort =-1 loop,
  264. >21 ubyte <128 note %d,
  265. >22 byte =0 replay 5.485 KHz
  266. >22 byte =1 replay 8.084 KHz
  267. >22 byte =2 replay 10.971 KHz
  268. >22 byte =3 replay 16.168 KHz
  269. >22 byte =4 replay 21.942 KHz
  270. >22 byte =5 replay 32.336 KHz
  271. >22 byte =6 replay 43.885 KHz
  272. >22 byte =7 replay 47.261 KHz
  273. # SGI SoundTrack <mpruett@sgi.com>
  274. 0 string _SGI_SoundTrack SGI SoundTrack project file
  275. # ID3 version 2 tags <waschk@informatik.uni-rostock.de>
  276. 0 string ID3 Audio file with ID3 version 2
  277. >3 byte x \b.%d
  278. >4 byte x \b.%d
  279. >>5 byte &0x80 \b, unsynchronized frames
  280. >>5 byte &0x40 \b, extended header
  281. >>5 byte &0x20 \b, experimental
  282. >>5 byte &0x10 \b, footer present
  283. >(6.I+10) indirect x \b, contains:
  284. # NSF (NES sound file) magic
  285. 0 string NESM\x1a NES Sound File
  286. >14 string >\0 ("%s" by
  287. >46 string >\0 %s, copyright
  288. >78 string >\0 %s),
  289. >5 byte x version %d,
  290. >6 byte x %d tracks,
  291. >122 byte&0x2 =1 dual PAL/NTSC
  292. >122 byte&0x1 =1 PAL
  293. >122 byte&0x1 =0 NTSC
  294. # NSFE (Extended NES sound file) magic
  295. # http://slickproductions.org/docs/NSF/nsfespec.txt
  296. # From: David Pflug <david@pflug.email>
  297. 0 string NSFE Extended NES Sound File
  298. >48 search/0x1000 auth
  299. >>&0 string >\0 ("%s"
  300. >>>&1 string >\0 by %s
  301. >>>>&1 string >\0 \b, copyright %s
  302. >>>>>&1 string >\0 \b, ripped by %s
  303. >20 byte x \b), %d tracks,
  304. >18 byte&0x2 =1 dual PAL/NTSC
  305. >18 byte&0x2 =0
  306. >>18 byte&0x1 =1 PAL
  307. >>18 byte&0x1 =0 NTSC
  308. # Type: SNES SPC700 sound files
  309. # From: Josh Triplett <josh@freedesktop.org>
  310. 0 string SNES-SPC700\ Sound\ File\ Data\ v SNES SPC700 sound file
  311. >&0 string 0.30 \b, version %s
  312. >>0x23 byte 0x1B \b, without ID666 tag
  313. >>0x23 byte 0x1A \b, with ID666 tag
  314. >>>0x2E string >\0 \b, song "%.32s"
  315. >>>0x4E string >\0 \b, game "%.32s"
  316. # Impulse tracker module (audio/x-it)
  317. 0 string IMPM Impulse Tracker module sound data -
  318. !:mime audio/x-mod
  319. >4 string >\0 "%s"
  320. >40 leshort !0 compatible w/ITv%x
  321. >42 leshort !0 created w/ITv%x
  322. # Imago Orpheus module (audio/x-imf)
  323. 60 string IM10 Imago Orpheus module sound data -
  324. >0 string >\0 "%s"
  325. # From <collver1@attbi.com>
  326. # These are the /etc/magic entries to decode modules, instruments, and
  327. # samples in Impulse Tracker's native format.
  328. 0 string IMPS Impulse Tracker Sample
  329. >18 byte &2 16 bit
  330. >18 byte ^2 8 bit
  331. >18 byte &4 stereo
  332. >18 byte ^4 mono
  333. 0 string IMPI Impulse Tracker Instrument
  334. >28 leshort !0 ITv%x
  335. >30 byte !0 %d samples
  336. # Yamaha TX Wave: file(1) magic for Yamaha TX Wave audio files
  337. # From <collver1@attbi.com>
  338. 0 string LM8953 Yamaha TX Wave
  339. >22 byte 0x49 looped
  340. >22 byte 0xC9 non-looped
  341. >23 byte 1 33kHz
  342. >23 byte 2 50kHz
  343. >23 byte 3 16kHz
  344. # scream tracker: file(1) magic for Scream Tracker sample files
  345. #
  346. # From <collver1@attbi.com>
  347. 76 string SCRS Scream Tracker Sample
  348. >0 byte 1 sample
  349. >0 byte 2 adlib melody
  350. >0 byte >2 adlib drum
  351. >31 byte &2 stereo
  352. >31 byte ^2 mono
  353. >31 byte &4 16bit little endian
  354. >31 byte ^4 8bit
  355. >30 byte 0 unpacked
  356. >30 byte 1 packed
  357. # audio
  358. # From: Cory Dikkers <cdikkers@swbell.net>
  359. 0 string MMD0 MED music file, version 0
  360. 0 string MMD1 OctaMED Pro music file, version 1
  361. 0 string MMD3 OctaMED Soundstudio music file, version 3
  362. 0 string OctaMEDCmpr OctaMED Soundstudio compressed file
  363. 0 string MED MED_Song
  364. 0 string SymM Symphonie SymMOD music file
  365. #
  366. # Track Length (TRL), Tracks (TRK), Samples (SMP), Subsongs (SS)
  367. # http://lclevy.free.fr/exotica/ahx/ahxformat.txt
  368. 0 string THX AHX version
  369. >3 byte =0 1 module data
  370. >3 byte =1 2 module data
  371. >11 ubyte x TRK: %u
  372. >10 ubyte x TRL: %u
  373. >12 ubyte x SMP: %u
  374. >13 ubyte x SS: %u
  375. >(4.H) string x Title: "%.128s"
  376. # header is mostly AHX format
  377. 0 string HVL
  378. >3 byte <2 Hively Tracker Song
  379. >3 byte =0 v1 module data
  380. >3 byte =1 v2 module data
  381. >11 ubyte x TRK: %u
  382. >10 ubyte x TRL: %u
  383. >12 ubyte x SMP: %u
  384. >13 ubyte x SS: %u
  385. >8 ubyte/4 =0 CHN: 4
  386. >8 ubyte/4 >0 CHN: 4+%u
  387. #>-0 offset <0xffff
  388. >(4.H) string x Title: "%.128s"
  389. #
  390. 0 string OKTASONG Oktalyzer module data
  391. #
  392. 0 string DIGI\ Booster\ module\0 %s
  393. >20 byte >0 %c
  394. >>21 byte >0 \b%c
  395. >>>22 byte >0 \b%c
  396. >>>>23 byte >0 \b%c
  397. >610 string >\0 \b, "%s"
  398. #
  399. 0 string DBM0 DIGI Booster Pro Module
  400. >4 byte >0 V%X.
  401. >>5 byte x \b%02X
  402. >16 string >\0 \b, "%s"
  403. #
  404. 0 string FTMN FaceTheMusic module
  405. >16 string >\0d \b, "%s"
  406. # From: <doj@cubic.org> 2003-06-24
  407. 0 string AMShdr\32 Velvet Studio AMS Module v2.2
  408. 0 string Extreme Extreme Tracker AMS Module v1.3
  409. 0 string DDMF Xtracker DMF Module
  410. >4 byte x v%i
  411. >0xD string >\0 Title: "%s"
  412. >0x2B string >\0 Composer: "%s"
  413. 0 string DSM\32 Dynamic Studio Module DSM
  414. 0 string SONG DigiTrekker DTM Module
  415. 0 string DMDL DigiTrakker MDL Module
  416. 0 string PSM\32 Protracker Studio PSM Module
  417. 44 string PTMF Poly Tracker PTM Module
  418. >0 string >\32 Title: "%s"
  419. 0 string MT20 MadTracker 2.0 Module MT2
  420. 0 string RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
  421. 0 string RTMM RTM Module
  422. 0x426 string MaDoKaN96 XMS Adlib Module
  423. >0 string >\0 Composer: "%s"
  424. 0 string AMF AMF Module
  425. >4 string >\0 Title: "%s"
  426. 0 string MODINFO1 Open Cubic Player Module Information MDZ
  427. 0 string Extended\40Instrument: Fast Tracker II Instrument
  428. # From: Takeshi Hamasaki <hma@syd.odn.ne.jp>
  429. # NOA Nancy Codec file
  430. 0 string \210NOA\015\012\032 NOA Nancy Codec Movie file
  431. # Yamaha SMAF format
  432. 0 string MMMD Yamaha SMAF file
  433. # Sharp Jisaku Melody format for PDC
  434. 0 string \001Sharp\040JisakuMelody SHARP Cell-Phone ringing Melody
  435. >20 string Ver01.00 Ver. 1.00
  436. >>32 byte x \b, %d tracks
  437. # Free lossless audio codec <http://flac.sourceforge.net>
  438. # From: Przemyslaw Augustyniak <silvathraec@rpg.pl>
  439. 0 string fLaC FLAC audio bitstream data
  440. !:mime audio/flac
  441. >4 byte&0x7f >0 \b, unknown version
  442. >4 byte&0x7f 0 \b
  443. # some common bits/sample values
  444. >>20 beshort&0x1f0 0x030 \b, 4 bit
  445. >>20 beshort&0x1f0 0x050 \b, 6 bit
  446. >>20 beshort&0x1f0 0x070 \b, 8 bit
  447. >>20 beshort&0x1f0 0x0b0 \b, 12 bit
  448. >>20 beshort&0x1f0 0x0f0 \b, 16 bit
  449. >>20 beshort&0x1f0 0x170 \b, 24 bit
  450. >>20 byte&0xe 0x0 \b, mono
  451. >>20 byte&0xe 0x2 \b, stereo
  452. >>20 byte&0xe 0x4 \b, 3 channels
  453. >>20 byte&0xe 0x6 \b, 4 channels
  454. >>20 byte&0xe 0x8 \b, 5 channels
  455. >>20 byte&0xe 0xa \b, 6 channels
  456. >>20 byte&0xe 0xc \b, 7 channels
  457. >>20 byte&0xe 0xe \b, 8 channels
  458. # sample rates derived from known oscillator frequencies;
  459. # 24.576 MHz (video/fs=48kHz), 22.5792 (audio/fs=44.1kHz) and
  460. # 16.384 (other/fs=32kHz).
  461. >>17 belong&0xfffff0 0x02b110 \b, 11.025 kHz
  462. >>17 belong&0xfffff0 0x03e800 \b, 16 kHz
  463. >>17 belong&0xfffff0 0x056220 \b, 22.05 kHz
  464. >>17 belong&0xfffff0 0x05dc00 \b, 24 kHz
  465. >>17 belong&0xfffff0 0x07d000 \b, 32 kHz
  466. >>17 belong&0xfffff0 0x0ac440 \b, 44.1 kHz
  467. >>17 belong&0xfffff0 0x0bb800 \b, 48 kHz
  468. >>17 belong&0xfffff0 0x0fa000 \b, 64 kHz
  469. >>17 belong&0xfffff0 0x158880 \b, 88.2 kHz
  470. >>17 belong&0xfffff0 0x177000 \b, 96 kHz
  471. >>17 belong&0xfffff0 0x1f4000 \b, 128 kHz
  472. >>17 belong&0xfffff0 0x2b1100 \b, 176.4 kHz
  473. >>17 belong&0xfffff0 0x2ee000 \b, 192 kHz
  474. >>17 belong&0xfffff0 0x3e8000 \b, 256 kHz
  475. >>17 belong&0xfffff0 0x562200 \b, 352.8 kHz
  476. >>17 belong&0xfffff0 0x5dc000 \b, 384 kHz
  477. >>21 byte&0xf >0 \b, >4G samples
  478. >>21 byte&0xf 0 \b
  479. >>>22 belong >0 \b, %u samples
  480. >>>22 belong 0 \b, length unknown
  481. # (ISDN) VBOX voice message file (Wolfram Kleff)
  482. 0 string VBOX VBOX voice message data
  483. # ReBorn Song Files (.rbs)
  484. # David J. Singer <doc@deadvirgins.org.uk>
  485. 8 string RB40 RBS Song file
  486. >29 string ReBorn created by ReBorn
  487. >37 string Propellerhead created by ReBirth
  488. # Synthesizer Generator and Kimwitu share their file format
  489. 0 string A#S#C#S#S#L#V#3 Synthesizer Generator or Kimwitu data
  490. # Kimwitu++ uses a slightly different magic
  491. 0 string A#S#C#S#S#L#HUB Kimwitu++ data
  492. # From "Simon Hosie
  493. 0 string TFMX-SONG TFMX module sound data
  494. # Monkey's Audio compressed audio format (.ape)
  495. # From danny.milo@gmx.net (Danny Milosavljevic)
  496. # New version from Abel Cheung <abel (@) oaka.org>
  497. 0 string MAC\040 Monkey's Audio compressed format
  498. !:mime audio/x-ape
  499. >4 uleshort >0x0F8B version %d
  500. >>(0x08.l) uleshort =1000 with fast compression
  501. >>(0x08.l) uleshort =2000 with normal compression
  502. >>(0x08.l) uleshort =3000 with high compression
  503. >>(0x08.l) uleshort =4000 with extra high compression
  504. >>(0x08.l) uleshort =5000 with insane compression
  505. >>(0x08.l+18) uleshort =1 \b, mono
  506. >>(0x08.l+18) uleshort =2 \b, stereo
  507. >>(0x08.l+20) ulelong x \b, sample rate %d
  508. >4 uleshort <0x0F8C version %d
  509. >>6 uleshort =1000 with fast compression
  510. >>6 uleshort =2000 with normal compression
  511. >>6 uleshort =3000 with high compression
  512. >>6 uleshort =4000 with extra high compression
  513. >>6 uleshort =5000 with insane compression
  514. >>10 uleshort =1 \b, mono
  515. >>10 uleshort =2 \b, stereo
  516. >>12 ulelong x \b, sample rate %d
  517. # adlib sound files
  518. # From: Alex Myczko <alex@aiei.ch>
  519. # https://github.com/rerrahkr/BambooTracker
  520. 0 string BambooTracker BambooTracker
  521. >13 string Mod Module
  522. >13 string Ist Instrument
  523. >13 string Bnk Bank
  524. >22 byte x \b, version %u
  525. >21 byte x \b.%u
  526. >20 byte x \b.%u
  527. 0 string CC2x CheeseCutter 2 song
  528. 0 string RAWADATA RdosPlay RAW
  529. 1068 string RoR AMUSIC Adlib Tracker
  530. 0 string JCH EdLib
  531. 0 string mpu401tr MPU-401 Trakker
  532. 0 string SAdT Surprise! Adlib Tracker
  533. >4 byte x Version %d
  534. 0 string XAD! eXotic ADlib
  535. 0 string ofTAZ! eXtra Simple Music
  536. 0 string FMK! FM Kingtracker Song
  537. 0 string DFM DFM Song
  538. 0 string \<CUD-FM-File\> CFF Song
  539. 0 string _A2module A2M Song
  540. # Spectrum 128 tunes (.ay files).
  541. # From: Emanuel Haupt <ehaupt@critical.ch>
  542. 0 string ZXAYEMUL Spectrum 128 tune
  543. 0 string \0BONK BONK,
  544. #>5 byte x version %d
  545. >14 byte x %d channel(s),
  546. >15 byte =1 lossless,
  547. >15 byte =0 lossy,
  548. >16 byte x mid-side
  549. 384 string LockStream LockStream Embedded file (mostly MP3 on old Nokia phones)
  550. # format VQF (proprietary codec for sound)
  551. # some infos on the header file available at :
  552. # http://www.twinvq.org/english/technology_format.html
  553. 0 string TWIN97012000 VQF data
  554. >27 short 0 \b, Mono
  555. >27 short 1 \b, Stereo
  556. >31 short >0 \b, %d kbit/s
  557. >35 short >0 \b, %d kHz
  558. # Nelson A. de Oliveira (naoliv@gmail.com)
  559. # .eqf
  560. 0 string Winamp\ EQ\ library\ file %s
  561. # it will match only versions like v<digit>.<digit>
  562. # Since I saw only eqf files with version v1.1 I think that it's OK
  563. >23 string x \b%.4s
  564. # .preset
  565. 0 string [Equalizer\ preset] XMMS equalizer preset
  566. # .m3u
  567. 0 search/1 #EXTM3U M3U playlist text
  568. !:mime audio/x-mpegurl
  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. # http://fileformats.archiveteam.org/wiki/Adaptive_Multi-Rate_Audio
  632. # Reference: https://datatracker.ietf.org/doc/html/rfc4867
  633. # http://mark0.net/download/triddefs_xml.7z/defs/a/audio-amr.trid.xml
  634. # Update: Joerg Jenderek
  635. # From: Russell Coker <russell@coker.com.au>
  636. # Note: called "AMR (Adaptive Multi Rate) encoded audio" by TrID and
  637. # "Adaptive Multi-Rate Audio" by DROID via PUID fmt/356 and
  638. # "AMR" "AMR audio" or "Adaptive Multi-Rate" by shared MIME-info database from freedesktop.org
  639. 0 string #!AMR Adaptive Multi-Rate Codec
  640. # Adaptive Multi-Rate Codec (strength=80) before wrong "a AMR script executable (binary data)" (strength=20=60/3) by ./varied.script
  641. #!:strength +0
  642. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/a/audio-awb.trid.xml
  643. # Note: called "Adaptive Multi-Rate Wideband ACELP codec" by TrID and
  644. # "Adaptive Multi-Rate Wideband Audio" bY DROID via PUID fmt/954 and
  645. # "AMR-WB" "AMR-WB audio" or "Adaptive Multi-Rate Wideband" by shared MIME-info database from freedesktop.org
  646. >5 string -WB (Wideband)
  647. # https://www.iana.org/assignments/media-types/audio/AMR-WB
  648. !:mime audio/AMR-WB
  649. #!:mime audio/amr-wb-encrypted
  650. !:apple ????amrw
  651. !:ext awb
  652. # variant without Wideband
  653. >5 default x (GSM telephony)
  654. # https://www.iana.org/assignments/media-types/audio/AMR
  655. !:mime audio/AMR
  656. # last character in type code is space
  657. !:apple ????amr
  658. !:ext amr
  659. # GRR: maybe also 3ga suffix? https://telparia.com/fileFormatSamples/audio/amr/example.3ga
  660. #!:ext amr/3ga
  661. # Type: SuperCollider 3 Synth Definition File Format
  662. # From: Mario Lang <mlang@debian.org>
  663. 0 string SCgf SuperCollider3 Synth Definition file,
  664. >4 belong x version %d
  665. # Type: True Audio Lossless Audio
  666. # URL: https://wiki.multimedia.cx/index.php?title=True_Audio
  667. # From: Mike Melanson <mike@multimedia.cx>
  668. 0 string TTA1 True Audio Lossless Audio
  669. # Type: WavPack Lossless Audio
  670. # URL: https://wiki.multimedia.cx/index.php?title=WavPack
  671. # From: Mike Melanson <mike@multimedia.cx>
  672. 0 string wvpk WavPack Lossless Audio
  673. # From Fabio R. Schmidlin <frs@pop.com.br>
  674. # VGM music file
  675. 0 string Vgm\040
  676. >9 ubyte >0 VGM Video Game Music dump v
  677. !:mime audio/x-vgm
  678. !:ext vgm
  679. >>9 ubyte/16 >0 \b%d
  680. >>9 ubyte&0x0F x \b%d
  681. >>8 ubyte/16 x \b.%d
  682. >>8 ubyte&0x0F >0 \b%d
  683. #Get soundchips
  684. >>8 ubyte x \b, soundchip(s)=
  685. >>0x0C ulelong >0 SN76489 (PSG),
  686. >>0x10 ulelong >0 YM2413 (OPLL),
  687. >>0x2C ulelong >0 YM2612 (OPN2),
  688. >>0x30 ulelong >0 YM2151 (OPM),
  689. >>0x38 ulelong >0 Sega PCM,
  690. >>0x34 ulelong >0xC
  691. >>>0x40 ulelong >0 RF5C68 (PCM),
  692. >>0x34 ulelong >0x10
  693. >>>0x44 ulelong >0 YM2203 (OPN),
  694. >>0x34 ulelong >0x14
  695. >>>0x48 ulelong >0 YM2608 (OPNA),
  696. >>0x34 ulelong >0x18
  697. >>>0x4C lelong >0 YM2610 (OPNB),
  698. >>>0x4C lelong <0 YM2610B (OPNB+2FM),
  699. >>0x34 ulelong >0x1C
  700. >>>0x50 ulelong >0 YM3812 (OPL2),
  701. >>0x34 ulelong >0x20
  702. >>>0x54 ulelong >0 YM3526 (OPL),
  703. >>0x34 ulelong >0x24
  704. >>>0x58 ulelong >0 Y8950 (MSX-Audio),
  705. >>0x34 ulelong >0x28
  706. >>>0x5C ulelong >0 YMF262 (OPL3),
  707. >>0x34 ulelong >0x2C
  708. >>>0x60 ulelong >0 YMF278B (OPL4),
  709. >>0x34 ulelong >0x30
  710. >>>0x64 ulelong >0 YMF271 (OPX),
  711. >>0x34 ulelong >0x34
  712. >>>0x68 ulelong >0 YMZ280B (PCMD8),
  713. >>0x34 ulelong >0x38
  714. >>>0x6C ulelong >0 RF5C164 (PCM),
  715. >>0x34 ulelong >0x3C
  716. >>>0x70 ulelong >0 PWM,
  717. >>0x34 ulelong >0x40
  718. >>>0x74 ulelong >0
  719. >>>>0x78 ubyte 0x00 AY-3-8910,
  720. >>>>0x78 ubyte 0x01 AY-3-8912,
  721. >>>>0x78 ubyte 0x02 AY-3-8913,
  722. >>>>0x78 ubyte 0x03 AY-3-8930,
  723. >>>>0x78 ubyte 0x10 YM2149,
  724. >>>>0x78 ubyte 0x11 YM3439,
  725. >>>>0x78 ubyte 0x12 YMZ284,
  726. >>>>0x78 ubyte 0x13 YMZ294,
  727. # VGM 1.61
  728. >>0x34 ulelong >0x4C
  729. >>>0x80 ulelong >0 DMG,
  730. >>0x34 ulelong >0x50
  731. >>>0x84 lelong >0 NES APU,
  732. >>>0x84 lelong <0 NES APU with FDS,
  733. >>0x34 ulelong >0x54
  734. >>>0x88 ulelong >0 MultiPCM,
  735. >>0x34 ulelong >0x58
  736. >>>0x8C ulelong >0 uPD7759 (ADPCM Speech),
  737. >>0x34 ulelong >0x5C
  738. >>>0x90 ulelong >0 OKIM6258 (ADPCM Speech),
  739. >>0x34 ulelong >0x64
  740. >>>0x98 ulelong >0 OKIM6295 (ADPCM),
  741. >>0x34 ulelong >0x68
  742. >>>0x9C ulelong >0 K051649,
  743. >>0x34 ulelong >0x6C
  744. >>>0xA0 ulelong >0 K054539,
  745. >>0x34 ulelong >0x70
  746. >>>0xA4 ulelong >0 HuC6280,
  747. >>0x34 ulelong >0x74
  748. >>>0xA8 ulelong >0 C140,
  749. >>0x34 ulelong >0x78
  750. >>>0xAC ulelong >0 K053260,
  751. >>0x34 ulelong >0x7C
  752. >>>0xB0 ulelong >0 Pokey,
  753. >>0x34 ulelong >0x80
  754. >>>0xB4 ulelong >0 QSound,
  755. # VGM 1.71
  756. >>0x34 ulelong >0x84
  757. >>>0xB8 ulelong >0 SCSP,
  758. >>0x34 ulelong >0x8C
  759. >>>0xC0 ulelong >0 WonderSwan,
  760. >>0x34 ulelong >0x90
  761. >>>0xC4 ulelong >0 VSU,
  762. >>0x34 ulelong >0x94
  763. >>>0xC8 ulelong >0 SAA1099,
  764. >>0x34 ulelong >0x98
  765. >>>0xCC ulelong >0 ES5503 (DOC),
  766. >>0x34 ulelong >0x9C
  767. >>>0xD0 lelong >0 ES5505 (OTIS),
  768. >>>0xD0 lelong <0 ES5506 (OTTO),
  769. >>0x34 ulelong >0xA4
  770. >>>0xD8 ulelong >0 X1-010,
  771. >>0x34 ulelong >0xA8
  772. >>>0xDC ulelong >0 C352,
  773. >>0x34 ulelong >0xAC
  774. >>>0xE0 ulelong >0 GA20,
  775. # GVOX Encore file format
  776. # Since this is a proprietary file format and there is no publicly available
  777. # format specification, this is just based on induction
  778. #
  779. 0 string SCOW
  780. >4 byte 0xc4 GVOX Encore music, version 5.0 or above
  781. >4 byte 0xc2 GVOX Encore music, version < 5.0
  782. 0 string ZBOT
  783. >4 byte 0xc5 GVOX Encore music, version < 5.0
  784. # Summary: Garmin Voice Processing Module (WAVE audios)
  785. # From: Joerg Jenderek
  786. # URL: https://www.garmin.com/
  787. # Reference: http://www.poi-factory.com/node/19580
  788. # NOTE: there exist 2 other Garmin VPM formats
  789. 0 string AUDIMG
  790. # skip text files starting with string "AUDIMG"
  791. >13 ubyte <13 Garmin Voice Processing Module
  792. !:mime audio/x-vpm-wav-garmin
  793. !:ext vpm
  794. # 3 bytes indicating the voice version (200,220)
  795. >>6 string x \b, version %3.3s
  796. # day of release (01-31)
  797. >>12 ubyte x \b, %.2d
  798. # month of release (01-12)
  799. >>13 ubyte x \b.%.2d
  800. # year of release (like 2006, 2007, 2008)
  801. >>14 uleshort x \b.%.4d
  802. # hour of release (0-23)
  803. >>11 ubyte x %.2d
  804. # minute of release (0-59)
  805. >>10 ubyte x \b:%.2d
  806. # second of release (0-59)
  807. >>9 ubyte x \b:%.2d
  808. # if you select a language like german on your garmin device
  809. # you can only select voice modules with corresponding language byte ID like 1
  810. >>18 ubyte x \b, language ID %d
  811. # structure for phrases/sentences?
  812. # number of voice sample in the 1st phrase?
  813. #>>19 uleshort x \b, %#x samples
  814. #>>>21 uleshort >0 \b, at %#4.4x
  815. #>>>(21.s) ubequad x %#llx
  816. # 2nd phrase?
  817. #>>23 uleshort x \b, %#x samples
  818. #>>>25 uleshort >0 \b, at %#4.4x
  819. #>>>(25.s) ubequad x %#llx
  820. # pointer to 1st audio WAV sample
  821. >>16 uleshort >0
  822. >>>(16.s) ulelong >0 \b, at %#x
  823. # WAV length
  824. # 1 space char after "bytes" to get phrase "bytes RIFF"
  825. >>>>(16.s+4) ulelong >0 %u bytes
  826. # look for magic
  827. >>>>>(&-8.l) string RIFF
  828. # determine type by ./riff
  829. >>>>>>&-4 indirect x
  830. # 2 - ~ 131 WAV samples following same way
  831. #
  832. # Summary: encrypted Garmin Voice Processing Module
  833. # From: Joerg Jenderek
  834. # URL: https://www.garmin.com/us/products/ontheroad/voicestudio
  835. # NOTE: Encrypted variant used in voices like DrNightmare, Elfred, Yeti.
  836. # There exist 2 other Garmin VPM formats
  837. 0 ubequad 0xa141190fecc8ced6 Garmin Voice Processing Module (encrypted)
  838. !:mime audio/x-vpm-garmin
  839. !:ext vpm
  840. # From Martin Mueller Skarbiniks Pedersen
  841. 0 string GDM
  842. >0x3 byte 0xFE General Digital Music.
  843. >>0x4 string >\0 title: "%s"
  844. >>0x24 string >\0 musician: "%s"
  845. >>>0x44 beshort 0x0D0A
  846. >>>>0x46 byte 0x1A
  847. >>>>>0x47 string GMFS Version
  848. >>>>>0x4B byte x %d.
  849. >>>>>0x4C byte x \b%02d
  850. >>>>>0x4D beshort 0x000 (2GDM v
  851. >>>>>0x4F byte x \b%d.
  852. >>>>>>0x50 byte x \b%d)
  853. 0 string MTM Multitracker
  854. >0x3 byte/16 x Version %d.
  855. >0x3 byte&0x0F x \b%02d
  856. >>0x4 string >\0 title: "%s"
  857. 0 string MO3
  858. >3 ubyte <6 MOdule with MP3
  859. >>3 byte 0 Version 0 (With MP3 and lossless)
  860. >>3 byte 1 Version 1 (With ogg and lossless)
  861. >>3 byte 3 Version 2.2
  862. >>3 byte 4 (With no LAME header)
  863. >>3 byte 5 Version 2.4
  864. 0 string ADRVPACK AProSys module
  865. # ftp://ftp.modland.com/pub/documents/format_documentation/\
  866. # Art%20Of%20Noise%20(.aon).txt
  867. 0 string AON
  868. >4 string "ArtOfNoise by Bastian Spiegel(twice/lego)"
  869. >0x2e string NAME Art of Noise Tracker Song
  870. >3 string <9
  871. >>3 string 4 (4 voices)
  872. >>3 string 8 (8 voices)
  873. >>0x36 string >\0 Title: "%s"
  874. 0 string FAR
  875. >0x2c byte 0x0d
  876. >>0x2d byte 0x0a
  877. >>>0x2e byte 0x1a
  878. >>>>0x3 byte 0xFE Farandole Tracker Song
  879. >>>>>0x31 byte/16 x Version %d.
  880. >>>>>0x31 byte&0x0F x \b%02d
  881. >>>>>0x4 string >\0 \b, title: "%s"
  882. # magic for Klystrack, https://kometbomb.github.io/klystrack/
  883. # from Alex Myczko <alex@aiei.ch>
  884. 0 string cyd!song Klystrack song
  885. >8 byte >0 \b, version %u
  886. >8 byte >26
  887. #>>9 byte x \b, channels %u
  888. #>>10 leshort x \b, time signature %u
  889. #>>12 leshort x \b, sequence step %u
  890. #>>14 byte x \b, instruments %u
  891. #>>15 leshort x \b, patterns %u
  892. #>>17 leshort x \b, sequences %u
  893. #>>19 leshort x \b, length %u
  894. #>>21 leshort x \b, loop point %u
  895. #>>23 byte x \b, master volume %u
  896. #>>24 byte x \b, song speed %u
  897. #>>25 byte x \b, song speed2 %u
  898. #>>26 byte x \b, song rate %u
  899. #>>27 belong x \b, flags %#x
  900. #>>31 byte x \b, multiplex period %u
  901. #>>32 byte x \b, pitch inaccuracy %u
  902. >>149 pstring x \b, title %s
  903. 0 string cyd!inst Klystrack instrument
  904. # magic for WOPL instrument files, https://github.com/Wohlstand/OPL3BankEditor
  905. # see Specifications/WOPL-and-OPLI-Specification.txt
  906. 0 string WOPL3-INST\0 WOPL instrument
  907. >11 leshort x \b, version %u
  908. 0 string WOPL3-BANK\0 WOPL instrument bank
  909. >11 leshort x \b, version %u
  910. # AdLib/OPL instrument files. Format specifications on
  911. # http://www.shikadi.net/moddingwiki
  912. 0 string Junglevision\ Patch\ File Junglevision instrument data
  913. 0 string #OPL_II# DMX OP2 instrument data
  914. 0 string IBK\x1a IBK instrument data
  915. 0 string 2OP\x1a IBK instrument data, 2 operators
  916. 0 string 4OP\x1a IBK instrument data, 4 operators
  917. 2 string ADLIB- AdLib instrument data
  918. >0 byte x \b, version %u
  919. >1 byte x \b.%u
  920. # CRI ADX ADPCM audio
  921. # Used by various Sega games.
  922. # https://en.wikipedia.org/wiki/ADX_(file_format)
  923. # https://wiki.multimedia.cx/index.php/CRI_ADX_file
  924. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  925. 0x00 beshort 0x8000
  926. >(2.S-2) string (c)CRI CRI ADX ADPCM audio
  927. !:ext adx
  928. !:mime audio/x-adx
  929. !:strength +50
  930. >>0x12 byte x v%u
  931. >>0x04 byte 0x02 \b, pre-set prediction coefficients
  932. >>0x04 byte 0x03 \b, standard ADX
  933. >>0x04 byte 0x04 \b, exponential scale
  934. >>0x04 byte 0x10 \b, AHX (Dreamcast)
  935. >>0x04 byte 0x11 \b, AHX
  936. >>0x08 belong x \b, %u Hz
  937. >>0x12 byte 0x03
  938. >>>0x02 beshort >0x2B
  939. >>>>0x18 belong !0 \b, looping
  940. >>0x12 byte 0x04
  941. >>>0x02 beshort >0x37
  942. >>>>0x24 belong !0 \b, looping
  943. >>0x13 byte&0x08 0x08 \b, encrypted
  944. # Lossless audio (.la) (http://www.lossless-audio.com/)
  945. 0 string LA
  946. >2 string 03 Lossless audio version 0.3
  947. >2 string 04 Lossless audio version 0.4
  948. # Sony PlayStation Audio (.xa)
  949. 0 leshort 0x4158 Sony PlayStation Audio
  950. # Portable Sound Format
  951. # Used for audio rips for various consoles.
  952. # http://fileformats.archiveteam.org/wiki/Portable_Sound_Format
  953. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  954. 0 string PSF
  955. >3 byte 0x01
  956. >>0 use portable_sound_format
  957. >3 byte 0x02
  958. >>0 use portable_sound_format
  959. >3 byte 0x11
  960. >>0 use portable_sound_format
  961. >3 byte 0x12
  962. >>0 use portable_sound_format
  963. >3 byte 0x13
  964. >>0 use portable_sound_format
  965. >3 byte 0x21
  966. >>0 use portable_sound_format
  967. >3 byte 0x22
  968. >>0 use portable_sound_format
  969. >3 byte 0x23
  970. >>0 use portable_sound_format
  971. >3 byte 0x41
  972. >>0 use portable_sound_format
  973. 0 name portable_sound_format
  974. >0 string PSF Portable Sound Format
  975. !:mime audio/x-psf
  976. >>3 byte 0x01 (Sony PlayStation)
  977. >>3 byte 0x02 (Sony PlayStation 2)
  978. >>3 byte 0x11 (Sega Saturn)
  979. >>3 byte 0x12 (Sega Dreamcast)
  980. >>3 byte 0x13 (Sega Mega Drive)
  981. >>3 byte 0x21 (Nintendo 64)
  982. >>3 byte 0x22 (Game Boy Advance)
  983. >>3 byte 0x23 (Super NES)
  984. >>3 byte 0x41 (Capcom QSound)
  985. # Atari 8-bit SAP audio format
  986. # http://asap.sourceforge.net/sap-format.html
  987. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  988. 0 string SAP\r\n Atari 8-bit SAP audio file
  989. !:mime audio/x-sap
  990. !:ext sap
  991. >5 search/1024 NAME
  992. >>&1 string x \b: %s
  993. >>5 search/1024 AUTHOR
  994. >>>&1 string x by %s
  995. # Nintendo Wii BRSTM audio format (fields)
  996. # NOTE: Assuming HEAD starts at 0x40.
  997. # FIXME: Replace 0x48 with HEAD offset plus 8.
  998. 0 name nintendo-wii-brstm-fields
  999. >(0x10.L) string HEAD \b:
  1000. >>(0x10.L+0x0C) belong x
  1001. >>>(&-4.L+0x48) belong x
  1002. >>>>&-4 byte 0 PCM, signed 8-bit,
  1003. >>>>&-4 byte 1 PCM, signed 16-bit,
  1004. >>>>&-4 byte 2 THP ADPCM,
  1005. >>>>&-3 byte !0 looping,
  1006. >>>>&-2 byte 1 mono
  1007. >>>>&-2 byte 2 stereo
  1008. >>>>&-2 byte 3 3 channels
  1009. >>>>&-2 byte 4 quad
  1010. >>>>&-2 byte >4 %u channels
  1011. >>>>&0 beshort !0 %u Hz
  1012. # Nintendo Wii BRSTM audio format
  1013. # https://wiibrew.org/wiki/BRSTM_file
  1014. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  1015. 0 string RSTM Nintendo Wii BRSTM audio file
  1016. !:mime audio/x-brstm
  1017. !:ext brstm
  1018. # Wii is big-endian, so default to BE.
  1019. >4 beshort 0xFEFF
  1020. >>0 use nintendo-wii-brstm-fields
  1021. >4 leshort 0xFEFF
  1022. >>0 use \^nintendo-wii-brstm-fields
  1023. # Nintendo 3DS BCSTM audio format (fields)
  1024. 0 name nintendo-3ds-bcstm-fields
  1025. >(0x18.l) string INFO \b:
  1026. # INFO block: Stream information starts at 0x20 (minus 4 for the 'INFO' magic)
  1027. >>&0x1C byte 0 PCM, signed 8-bit,
  1028. >>&0x1C byte 1 PCM, signed 16-bit,
  1029. >>&0x1C byte 2 DSP ADPCM,
  1030. >>&0x1C byte 3 IMA ADPCM,
  1031. >>&0x1D byte !0 looping,
  1032. >>&0x1E byte 1 mono
  1033. >>&0x1E byte 2 stereo
  1034. >>&0x1E byte 3 3 channels
  1035. >>&0x1E byte 4 quad
  1036. >>&0x1E byte >4 %u channels
  1037. >>&0x20 lelong !0 %u Hz
  1038. # Nintendo 3DS BCSTM audio format
  1039. # https://www.3dbrew.org/wiki/BCSTM
  1040. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  1041. 0 string CSTM Nintendo 3DS BCSTM audio file
  1042. !:mime audio/x-bcstm
  1043. !:ext bcstm
  1044. # 3DS is little-endian, so default to LE.
  1045. >4 leshort 0xFEFF
  1046. >>0 use nintendo-3ds-bcstm-fields
  1047. >4 beshort 0xFEFF
  1048. >>0 use \^nintendo-3ds-bcstm-fields
  1049. # Nintendo Wii U BFSTM audio format
  1050. # http://mk8.tockdom.com/wiki/BFSTM_(File_Format)
  1051. # NOTE: This format is very similar to BCSTM.
  1052. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  1053. 0 string FSTM Nintendo Wii U BFSTM audio file
  1054. !:mime audio/x-bfstm
  1055. !:ext bfstm
  1056. # BFSTM is used on both Wii U (BE) and Switch (LE),
  1057. # so default to LE.
  1058. >4 leshort 0xFEFF
  1059. >>0 use nintendo-3ds-bcstm-fields
  1060. >4 beshort 0xFEFF
  1061. >>0 use \^nintendo-3ds-bcstm-fields
  1062. # Nintendo 3DS BCSTM audio format (fields)
  1063. 0 name nintendo-3ds-bcwav-fields
  1064. >(0x18.l) string INFO \b:
  1065. # INFO block (minus 4 for INFO magic)
  1066. >>&0x4 byte 0 PCM, signed 8-bit,
  1067. >>&0x4 byte 1 PCM, signed 16-bit,
  1068. >>&0x4 byte 2 DSP ADPCM,
  1069. >>&0x4 byte 3 IMA ADPCM,
  1070. >>&0x5 byte !0 looping,
  1071. >>&0x8 lelong x stereo
  1072. >>&0x8 lelong !0 %u Hz
  1073. # Nintendo 3DS BCWAV audio format
  1074. # https://www.3dbrew.org/wiki/BCWAV
  1075. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  1076. 0 string CWAV Nintendo 3DS BCWAV audio file
  1077. !:mime audio/x-bcwav
  1078. !:ext bcwav
  1079. # 3DS is little-endian, so default to LE.
  1080. >4 leshort 0xFEFF
  1081. >>0 use nintendo-3ds-bcwav-fields
  1082. >4 beshort 0xFEFF
  1083. >>0 use \^nintendo-3ds-bcwav-fields
  1084. # QOA Quite Okay Audio format
  1085. # https://qoaformat.org/qoa-specification.pdf
  1086. # added by alex myczko <tar@debian.org>
  1087. 0 string qoaf QOA audio data
  1088. >4 belong x \b, %d samples per channel
  1089. # Philips DSDIFF audio format (Direct Stream Digital Interchange File Format)
  1090. # Used for DSD audio recordings and Super Audio CD (SACD) mastering annotations
  1091. # https://dsd-guide.com/sites/default/files/white-papers/DSDIFF_1.5_Spec.pdf
  1092. # From: Toni Ruottu <toni.ruottu@iki.fi>
  1093. 0 string FRM8
  1094. 12 string DSD\x20 DSDIFF audio bitstream data
  1095. !:mime audio/x-dff
  1096. !:ext dff
  1097. # format version chunk
  1098. >&0 string FVER
  1099. # version 1
  1100. >>&8 byte 1
  1101. # v1 / sampling resolution ( 1 bit PDM only )
  1102. >>>&0 string x \b, 1 bit
  1103. # v1 / sound property chunk
  1104. >>>&0 search/0xff PROP
  1105. >>>>&8 string SND
  1106. # v1 / sound property chunk / channel configuration chunk
  1107. >>>>>&0 search/0xff CHNL
  1108. >>>>>>&8 ubeshort 1 \b, mono
  1109. >>>>>>&8 ubeshort 2
  1110. >>>>>>>&0 string SLFTSRGT \b, stereo
  1111. >>>>>>>&0 default x \b, 2 channels
  1112. >>>>>>&8 ubeshort 3
  1113. >>>>>>>&0 string SLFTSRGTLFE\x20 \b, 2.1 stereo
  1114. >>>>>>>&0 string SLFTSRGTC\x20\x20\x20 \b, 3.0 stereo
  1115. >>>>>>>&0 default x \b, 3 channels
  1116. >>>>>>&8 ubeshort 4
  1117. >>>>>>>&0 string MLFTMRGTLS\x20\x20RS\x20\x20 \b, 4.0 surround
  1118. >>>>>>>&0 string SLFTSRGTC\x20\x20\x20LFE\x20 \b, 3.1 stereo
  1119. >>>>>>>&0 default x \b, 4 channels
  1120. >>>>>>&8 ubeshort 5
  1121. >>>>>>>&0 string MLFTMRGTC\x20\x20\x20LS\x20\x20RS\x20\x20 \b, 5.0 surround
  1122. >>>>>>>&0 string MLFTMRGTLFE\x20LS\x20\x20RS\x20\x20 \b, 4.1 surround
  1123. >>>>>>>&0 default x \b, 5 channels
  1124. >>>>>>&8 ubeshort 6
  1125. >>>>>>>&0 string MLFTMRGTC\x20\x20\x20LFE\x20LS\x20\x20RS\x20\x20 \b, 5.1 surround
  1126. >>>>>>>&0 default x \b, 6 channels
  1127. >>>>>>&8 ubeshort >6 \b, %u channels
  1128. # v1 / sound property chunk / sample rate chunk
  1129. >>>>>&0 search/0xff FS\x20\x20
  1130. >>>>>>&0 string x \b,
  1131. >>>>>>&8 ubelong%44100 0
  1132. >>>>>>>&-4 ubelong/44100 x "DSD %u"
  1133. >>>>>>>&-4 ubelong x %u Hz
  1134. # v1 / sound property chunk / compression type chunk
  1135. >>>>>&0 search/0xff CMPR
  1136. >>>>>>&8 string DSD\x20 \b, no compression
  1137. >>>>>>&8 string DST\x20 \b, DST compression
  1138. >>>>>>&8 default x \b, unknown compression
  1139. # v1 / quest for metadata
  1140. >>>&0 string x
  1141. # v1 / quest for metadata / edited master information chunk
  1142. >>>>&0 search DIIN
  1143. >>>>>&0 ubequad >0 \b, "edited master" metadata
  1144. # v1 / quest for metadata / ID3 chunk ( defacto standard )
  1145. >>>>&0 search ID3\x20
  1146. >>>>>&8 string ID3 \b, ID3 version 2
  1147. >>>>>&0 byte x \b.%u
  1148. >>>>>&1 byte x \b.%u
  1149. # v1 / quest for metadata / failure ( possibly due to -P bytes=... being too low )
  1150. >>>>&0 default x \b, ID3 missing (or unreachable)
  1151. # version > 1 or 0
  1152. >>&0 default x \b, unknown version
  1153. # Sony DSF audio format (Direct Stream Digital Stream File)
  1154. # Used for lossless digital storage of songs produced as DSD audio
  1155. # Portable analog of a track stored on a Super Audio CD (SACD)
  1156. # https://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf
  1157. # From: Toni Ruottu <toni.ruottu@iki.fi>
  1158. 0 string DSD\x20 DSF audio bitstream data
  1159. !:mime audio/x-dsf
  1160. !:ext dsf
  1161. # format chunk
  1162. >28 string fmt\x20
  1163. # version 1
  1164. >>&8 ulelong 1
  1165. # v1 / sampling resolution ( 1 bit PDM only )
  1166. # NOTE: the spec incorrectly uses "bits per sample" instead of "bits per byte"
  1167. >>>&0 string x \b, 1 bit
  1168. # v1 / channel configuration
  1169. >>>>&4 ulelong 1 \b, mono
  1170. >>>>&4 ulelong 2 \b, stereo
  1171. >>>>&4 ulelong 3 \b, 3.0 stereo
  1172. >>>>&4 ulelong 4 \b, 4.0 surround
  1173. >>>>&4 ulelong 5 \b, 3.1 stereo
  1174. >>>>&4 ulelong 6 \b, 5.0 surround
  1175. >>>>&4 ulelong 7 \b, 5.1 surround
  1176. >>>>&0 default x
  1177. >>>>>&4 ulelong x \b, %u channels
  1178. # v1 / sample rate chunk
  1179. >>>>&0 string x \b,
  1180. >>>>&12 ulelong%44100 0
  1181. >>>>>&-4 ulelong/44100 x "DSD %u"
  1182. >>>>&12 ulelong x %u Hz
  1183. # v1 / compression
  1184. >>>>&0 string x
  1185. >>>>>&0 ulelong 0 \b, no compression
  1186. >>>>>&0 default x \b, unknown compression
  1187. # v1 / embedded ID3v2 metadata
  1188. >>>0 string x \b, ID3
  1189. >>>>20 ulequad !0
  1190. >>>>>(20.q) string ID3 version 2
  1191. >>>>>>&0 byte x \b.%u
  1192. >>>>>>&1 byte x \b.%u
  1193. # unable to verify ID3 ( possibly due to -P bytes=... being too low )
  1194. >>>>>&0 default x unreachable
  1195. >>>>&0 default x missing
  1196. # version > 1 or 0
  1197. >>&0 default x \b, unknown version
  1198. # https://moddingwiki.shikadi.net/wiki/ROL_Format
  1199. 4 string \\roll\\default AdLib Visual Composer ROL file
  1200. >0 leshort x \b, version %d.
  1201. >2 leshort x \b%d
  1202. >44 leshort x \b, tickBeat %d
  1203. >46 leshort x \b, beatMeasure %d
  1204. >48 leshort x \b, scaleY %d
  1205. >50 leshort x \b, scaleX %d
  1206. >52 byte 0 \b, percussive
  1207. >52 byte 1 \b, melodic
  1208. # https://pbat.ch/proj/protrekkr/
  1209. 0 string PROTREKT Protrekkr Module