pedipanol

PMD ADPCM Tutorial

Feb 23rd, 2018
751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.51 KB | None | 0 0
  1. PMD ADPCM tutorial by pedipanol
  2.  
  3. This tutorial will require that you have a set up NekoPoject II, as well as a PC98 HD image with DOS and EditDisk. I'll also assume you're familiar with using commandline programs.
  4. EditDisk: https://hp.vector.co.jp/authors/VA013937/editdisk/index_e.html
  5. Neko Project II: https://www.shrinemaiden.org/forum/index.php?topic=11117.0
  6. Formatted PC98 HD file suggestion: https://nfggames.com/forum2/index.php?topic=5463.0
  7. (if you wanna use this one, you gotta convert it to .nhd, so open the folder you extracted it to in CMD.EXE, then type nhdgen /auto /merge PC98-542MB.ima PC98-542MB.nhd )
  8.  
  9. Ok, first you gotta get your samples to the right format: it's gotta be .WAV, mono, 8-bit unsigned and 16000hz. You can use other rates, but this is the best to make sure the output will be the same as the sample file. I recommend that you use Audacity to do this conversion, because it'll be useful later on if you wanna loop the samples and etc. Also, if you have a sample with a high frequency, such as hihats and crashes, I recommend you add a low pass filter on them, or else there's a high chance that you'll get a noise sound. The converter seems to dislike those for some reason.
  10.  
  11. Once you've done getting the samples, download this file https://dl.dropboxusercontent.com/s/vu67gncu3xzy6ix/PMDPCM.zip and extract it.
  12. Open EditDisk and then open the PC98 HD Image on it, then create a folder and drag'n drop all the files from extracted from PMDPCM.zip into that folder, do the same for all your wav samples.
  13. After this, close EditDisk and load the PC98 HD image on Neko Project II and check if you folder is in there (if you used the HD image I sent, use Filmtn file manager)
  14.  
  15. If everything is alright then you're ready to do the conversion. First we gotta convert all of them into .SPB, so in that folder, run "pcmconv /v <filename>.wav /a <filename>.spb" (you can either do this by pressing R on the file manager or quitting to DOS, then going to the folder). Do this for all the samples, afther this you should have all of them in the .SPB format. By the way, ADPCM doesn't support more than 256kb of samples, so make sure that in total they aren't over this size after converting them to SPB.
  16.  
  17. Make sure Neko Project II is set to Speak board by going to Device -> Sound, if it wasn't, change it and reset the emulator. Run PMDB2.COM on the folder to enable the PMD driver, and after that, run "pmdpcm /c".
  18.  
  19. You you gotta assign all the .SPB files you created to slots, which will be the instrument number when you use them on PMD. You don't need to put the slots in order and you can leave any slot open. So type "pmdpcm <slot number> <filename.spb>" for all the files.
  20.  
  21. example:
  22. pmdpcm 2 snare.spb
  23. pmdpcm 1 kick.spb
  24. pmdpcm 4 tom1.spb
  25. pmdpcm 10 bass.spb
  26. and etc...
  27.  
  28. It's good to take note of the samples and the slot number they're associated.
  29.  
  30. Once you've done it for all your samples, run "pmdpcm /s <filename>.PPC". This will create the final PCM file that will be used. After all of this is done, close Neko Project, load the HD file into EditDisk and pull out the PPC file you just created.
  31.  
  32. This is the process to get the file ready to use. Now to use it...
  33.  
  34. Add "#ADPCM on" and "#PPCFile <filename>.PPC", this will make PMD automatically load the PPC file when you play the song (as long as it is on the same folder), you can also choose not add those and load the PPC file manually.
  35.  
  36. We're gonna use the J channel for the ADPCM. As mentioned before, the instrument command @ will use the slots you assigned the sample to as the instrument.
  37. If the sample is looped, you gotta add the loop information right after the instrument number. Search for the loop points in audacity, then click on the Audio Position time on the bottom, and set it to Samples, and take notes of the number in the loop start and the loop end. You can also take note of the release point if you wanna have that as well.
  38.  
  39. Then on the @ command you gotta do @<num>,(<loopstart>,[<loopend>,{<release>}])
  40. If <loopstart> is omitted, the sample will not loop
  41. If <loopend> is omitted, the sample will use the end of the sample as the loop end
  42. If <release> is omitted, the sample will just loop on the release
  43.  
  44. Example: @10,3222,4502
  45. This is the instrument setting of the bass.spb I put on the example earlier. 3222 s the loop start and 4502 is the loop end. I didn't need a release sound so I omitted it.
  46.  
  47. Additional Notes:
  48. - You'll have to do some testing with the sample until you find the right pitch for it, the Detune and Transpose commands will be useful for this.
  49. - You can set up an envelope on the sample using the E command, that works exactly as the one used on the SSG.
  50. - It's recommended to use macros for the samples, both because they don't always end up on the same pitch, making you need to play them on different notes/octaves, and because they don't always end up with the same volume. Using macros can be a good way to avoiding getting super messy with the MML. Example:
  51.  
  52. !b V30@0_-4\vh8\h
  53. !s V50@1_-3
  54. !h V30@2\vh8\h
  55. !B V50@3_-12\h
  56. !S V50@3_-12\h
  57. !hl V10@2\vh4\h
  58. J !Bc!hc!hc!hc !hc!hc!hc!hc [!bc!hc!hc!bc !bc!hc!hc!bc :!bc!hc!hc!bc !bc!hc!hc!hc]8 !bc1r2 !sc!hc16!bV20c16!sc16sV30c16<f>
  59.  
  60. In here the macros set the instrument, transpose, volume and Rhythm Sound Source settings, and the c I add after them on the MML will play them.
  61.  
  62. Hope this tutorial helps!
  63. Feel free to message me if you have any questions or something wasn't clear.
  64. You can find me on Twitter, Youtube and Soundcloud by the nick @pedipanol, but you can also mail me at pdpano@yahoo.com
Add Comment
Please, Sign In to add comment