Advertisement
atreyu187

Dreamcast Guides : DCRes ADX Downsampling/Looping Tutorial

Jan 6th, 2013
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.57 KB | None | 0 0
  1. ----------------------- Page 1-----------------------
  2.  
  3. Downsampling ADX files
  4.  
  5. by TuxTheWise
  6.  
  7.  
  8.  
  9. Why would I want to do that?
  10.  
  11. - Reduce size of your game, so it can fit on a CD-R.
  12.  
  13. - Reduce total data streaming.
  14.  
  15.  
  16.  
  17. 1. Introduction
  18.  
  19. If you followed "Extracting data from GD dump files" (included on this pack), you
  20.  
  21. could extract files of a GD dump with success. Then, you followed "Making GDI files
  22.  
  23. bootable on real Dreamcast with perfection" (also included on this pack) you are
  24.  
  25. able to make a perfect CD-R bootable version. But, when you tried it, you realized
  26.  
  27. that the game is too big and won't fit on a CD-R. Somehow, you need to reduce the
  28.  
  29. size of the game. If the game has .ADX files, then you can downsample it and get the
  30.  
  31. space you need.
  32.  
  33.  
  34.  
  35. ADX files are sound files. They're usually used with music, because they can have
  36.  
  37. loop markers, making the sound go back to a determined area when it reaches the
  38.  
  39. end. In this guide, you'll learn how to downsample these music and reconstruct loop
  40.  
  41. markers. I've seen some releases on internet where people didn't pay attention on
  42.  
  43. loop markers, and they were just removed on downsampling process. It made music
  44.  
  45. stop all of a sudden, what is pretty annoying.
  46.  
  47.  
  48.  
  49. Maybe you're wondering how much space you can make downsampling ADX files,
  50.  
  51. and how bad quality will be after the process. About the space, you can save a lot.
  52.  
  53. That's because ADX files have stereo channels encoded separately, not joint as
  54.  
  55. (most) MP3 files. So, if you make music mono, you'll reduce size to half. Another
  56.  
  57. point about space is that ADX files have constant bitrate, not variable. It means that
  58.  
  59. you can determine space reduction easily with enough precision. Here is a little
  60.  
  61. table with bitrates of most common ADX encoding:
  62.  
  63.  
  64.  
  65. 44khz, stereo: 396 kbits/s
  66.  
  67. 44khz, mono: 198 kbits/s
  68.  
  69. 22khz, stereo: 198 kbits/s
  70.  
  71. 22khz, mono: 99 kbits/s
  72.  
  73.  
  74.  
  75. Most ADX files are encoded in 44khz stereo, so 44khz mono is the best option when
  76.  
  77. downsampling then. You'll reduce size per half and quality loss will be very small.
  78.  
  79. Some people prefer to use 22khz stereo, the effect in size will be the same, so it's up
  80.  
  81.  
  82.  
  83. 1
  84.  
  85.  
  86. ----------------------- Page 2-----------------------
  87.  
  88. to you to choose an appropriated format. I personally think that 44khz mono is the
  89.  
  90. best option. Any lower quality will make sound quality too bad.
  91.  
  92.  
  93.  
  94. A game you may want to try is Jet Grind Radio. It's too big to fit on a CD-R, but if you
  95.  
  96. mono the ADX files (downsample to 44khz mono) it will fit easily.
  97.  
  98.  
  99.  
  100. There are cases where monoizing the ADX won't be enough to save the space you
  101.  
  102. need. Of course you can try lower quality, but as I said, quality will be too bad.
  103.  
  104. Instead of doing that, I recommend you try other strategies, like downsampling .SFD
  105.  
  106. movie files (there is another tutorial included on this pack). Downsampling movies
  107.  
  108. can save much more space than audio with less quality loss. A typical case where
  109.  
  110. monoizing the sound is not enough to make game fit on a CD-R is Sonic Adventure.
  111.  
  112.  
  113.  
  114. ADX is used mostly on Dreamcast games, but there are games of other consoles that
  115.  
  116. use them (usually Dreamcast ports). This method probably will work on them too,
  117.  
  118. but I haven't tested.
  119.  
  120.  
  121.  
  122. To finish, be aware that method explained here were learn after months of
  123.  
  124. experience. It will provide the best quality possible in downsampling process, and
  125.  
  126. it's the fastest way to do it.
  127.  
  128.  
  129.  
  130. So, it's time to start. Make a folder c:\adx and move all the ADX files you want to
  131.  
  132. downsample there.
  133.  
  134.  
  135.  
  136. 2. Decoding files
  137.  
  138. First step to downsample the files is converting them to WAV. It seems to be the
  139.  
  140. simplest part, but it's not. There are a lot of "adx2wav" converters, but some of
  141.  
  142. them are very bad. Some converters messes the volume of tracks, mainly on not
  143.  
  144. 44khz sounds. Others just output distorced sound. The best decoder I've ever found
  145.  
  146. was the one bundled on Foobar 2000. It works very good on any .ADX I've tested,
  147.  
  148. and doesn't mess with the volume, so let's use it.
  149.  
  150.  
  151.  
  152. Open Foobar. If it's not the first time you use it, delete any file that is on the playlist.
  153.  
  154. Go File, Add Files... and select all the ADX files of c:\adx, they will be added on the
  155.  
  156. playlist. Have all the songs of playlist selected. Right-click one of them, Convert,
  157.  
  158. Convert to Same Folder. On Encoding Preset, have WAV selected. All other options
  159.  
  160. must be disabled. Click "More Setting". In field Single tracks, replace the text there
  161.  
  162. for "%title%" (without quotes). It will make foobar2000 use the same name of input
  163.  
  164. for the converted file, instead of putting a number before it. Click Close. Then click
  165.  
  166. OK and foobar2000 will convert files to .wav, it will take a while.
  167.  
  168.  
  169.  
  170. 2
  171.  
  172.  
  173. ----------------------- Page 3-----------------------
  174.  
  175. Don't delete the original .ADX files yet, we still need them for loop markers data.
  176.  
  177.  
  178.  
  179. NOTE: I heard that the "ADX_Converter.exe" is a good decoder too, but I haven't
  180.  
  181. tested it too much. If you want to try it, don't forget to mark "0" on Fadeout field. I
  182.  
  183. personally think foobar2000 is better.
  184.  
  185.  
  186.  
  187. 3. Downsampling sounds
  188.  
  189. When we encode the sound in ADX again, the encoder will use source file as
  190.  
  191. information about encoding configurations. For example, if source file is mono, it
  192.  
  193. will encode a mono ADX, if it's 44khz, it will encode in 44 khz, and so on. We'll use
  194.  
  195. our just converted WAV as source, so any change we want to make in ADX we will
  196.  
  197. make in the WAV now. For that, we'll use GoldWave. There are a lot of programs
  198.  
  199. that can make it, so fell free to use your favorite. I like GoldWave because it has
  200.  
  201. Batch Conversion feature that let us encode everything at once.
  202.  
  203.  
  204.  
  205. Open GoldWave. Click File, Batch Processing. Then click Add Files and select all the
  206.  
  207. WAV that you converted before using foobar2000. At the Convert tab, keep
  208.  
  209. "Convert files to this format" marked. In "Save as type" select "Wave (*.wav)". In
  210.  
  211. Attributes, select "PCM signed 16 bit, mono" if you want to mono the sound (if
  212.  
  213. you're converting to 44 khz, you'll use that option) or "PCM signed 16 bit, stereo" if
  214.  
  215. you want to keep sound stereo. Your sound is probably 44 khz (check it opening an
  216.  
  217. ADX on foobar2000). If you want to downsample it to 22 khz (not recommended),
  218.  
  219. you can mark "Rate (Hz)" and select 22050. If you want to keep 44 khz (unchanged),
  220.  
  221. just let this box unmarked. In "Process" tab, be su re no effect is added. In Folder
  222.  
  223. tab, keep "Store all files in their original folders" marked and "Overwrite existing
  224.  
  225. files" too, so it will replace the original sound for your downsampled ones. Click
  226.  
  227. "Begin" and it will convert the files. It may take a while.
  228.  
  229.  
  230.  
  231. 4. Encoding the files
  232.  
  233. Darkfalz has made a very useful tool for batch encoding ADX files with loop, let's use
  234.  
  235. it. Open ADXLoopCalculator.exe (included somewhere else in this pack). Select the
  236.  
  237. directory c:\adx. You can keep "Delete ADX" marked, so it will automatically delete
  238.  
  239. ADX after using them to determine loop markers. Click Calculate. The program will
  240.  
  241. scan for loop markers in ADX files, and create a BAT file containing the correct
  242.  
  243. command line for encoding ADX with them. Don't worry, if the ADX file has no loop
  244.  
  245. markers, the correct command line will be used. After program is done, a file called
  246.  
  247. "encode.bat" will be created on c:\adx. Before executing it, move/copy the file
  248.  
  249. "adxencd.exe" to c:\adx. Now execute encode.bat and it will start encoding the files,
  250.  
  251. it may take a while. After done, your job is ready. The re-encoded ADX will be in c:
  252.  
  253.  
  254.  
  255. 3
  256.  
  257.  
  258. ----------------------- Page 4-----------------------
  259.  
  260. \adx, they will be smaller than original ones and you can use them instead in your
  261.  
  262. game.
  263.  
  264.  
  265.  
  266. 5. Final comments
  267.  
  268. Downsampled ADX files worked fine with me most of the times, except two times.
  269.  
  270. One was in Jet Grind Radio, when I tried to monoized some songs and let others
  271.  
  272. stereo. Original music worked fine of course, and when I monoized all the ADX it
  273.  
  274. worked fine too. But if I kept some stereo and some mono, in transition of the songs
  275.  
  276. (for example, when it was playing a stereo song and started a mono) game crashed.
  277.  
  278. Other problem I had was in Fatal Fury. Song was stereo, but after I monoized it,
  279.  
  280. music played only on right channel. Well, if something like that happened to you (I
  281.  
  282. doubt it will happen, but anyway...), look for alternatives. In my case, for example, I
  283.  
  284. kept all songs mono in Jet Grind Radio and used 22 khz stereo in Fatal Fury.
  285.  
  286.  
  287.  
  288. 6. Thanks
  289.  
  290. - The nice guys who created the programs used here.
  291.  
  292. - Darkfalz for the random information let in forums in the past.
  293.  
  294. - This wonderful site tutorials
  295.  
  296. http://www.dreamwell.pwp.blueyonder.co.uk/dcselfboot/index.htm) for my first
  297.  
  298. contact with downsampling process.
  299.  
  300. - All people that rip and distribute GDI.
  301.  
  302.  
  303.  
  304. 4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement