WAV to PCM Converter [PPMCK] for your NSFs
BotB Academy Bulletins
 
 
49759
Level 30 Chipist
Savestate
 
 
 
post #49759 :: 2014.11.22 1:29am :: edit 2014.11.22 12:25pm
  
  9999HP and tothejazz liēkd this
Here's a little project I spent a couple of hours on while talking to Xyz_39808 about PCM and PPMCK.

== 23:35 <Xyz_39808>
== Ideally you'd just take a wave, downsample to 8bit,
== then round up every odd valued sample and divide by
== two (making it 7bit), then stream that after a
== bunch of y$4011,$__ commands

Using this information, I created a WAV to PCM encoder for your NSFs! Ever wanted to put high quality samples in your mmls?? ? ?? ? Well this is the solution!... given nothing else is playing (it will pretty much stall everything else in your nsf while it's playing hahah ^^; )

You can use WAV_PCM_2a03 to convert MONO, 8700hz SAMPLE RATE, 16BIT, WAVE files (under a second or two) to PPMCK direct write commands.

You can make a wave file 8700hz by setting the project rate in audacity.

Here's a few demos of it in action:
- http://mmlshare.com/tracks/view/1017
- http://mmlshare.com/tracks/view/1018
- http://mmlshare.com/tracks/view/1019

Project page: http://botb.club/~savestate/demos/pcm_encoder.html

You can view how to use it and stuff on the project page! :D :D :D
Also, the source code is a MESS. like HORRIBLE absolutely horrible hahaha im sorry.

Enjoy!~ (^:

update - Version 1.0.1 Adds a comment every 100 samples so you can find sample offsets, based on an idea by 9999HP
 
 
49767
Level 13 Mixist
9999HP
 
 
post #49767 :: 2014.11.22 7:35am
Cool stuff!

I am assuming that if you know the timing of your $4011 commands you could interleave normal channel commands to use both simultaneously, like the Skate or Die 2 theme?
 
 
49773
Level 30 Chipist
Savestate
 
 
 
post #49773 :: 2014.11.22 11:57am :: edit 2014.11.22 12:24pm
Hmm, what I could do is insert an mml comment every 100 samples or so, that way you could look up the sample offset in audacity of quiet parts, execute commands then, and then resume the pcm. It'd be a little tricky but it could probably work!

EDIT: Added sample offset comments!
http://botb.club/~savestate/demos/WAV_PCM_2a03_1.0.1.zip
 
 

LOGIN or REGISTER to add your own comments!