sound quality is pretty damn good for a NES well, ok, pretty good for FCEUD. VirtuaNes and Nestopia had some additional high pitched white noise which i don't know is an artifact of the emulator or an attempt to emulate the proper sound of the nes. wish i had $150 to drop on a powerpak right now for some actual hardware testing
It seems the biggest issue for sound quality is making sure the files survive the conversion to 7bit without being totally crapped on. I'm still working on perfecting the process but i've gotten it down pretty well.
Right now the PCM playing code takes 35 clock cycles. Each sample needs to be played 40.52 clock cycles apart to get ~44.1kHz sample rate, so i added some dummy code to get the cycles to total 40. These 5 extra dummy cycles will also hopefully leave me room to define custom start and end points in addition to the rom bank for each sound. in between each sound there is a bit more processing being done but it's not really noticeable.
the sounds in the rom are 16k but in this recording only the first 8k of each sample is playing. using 16k for a hihat seems like a waste so i'm hoping to use the variable start and end times to store more than 1 sound in some banks.
do you get interference if you use the RCA output from the NES (as opposed to the TV coax cable converter thing)? Now that i've got basic functionality down it would be cool to display stuff to the screen... but if it's going to cause noise on the output obviously it's not desirable. Will even showing a single image without changing it cause interference? this stuff doesn't even matter as long as i'm using an emulator but i don't want to work on something I can't use in the real hardwareIt's worth noting that having the screen on causes a bit of interference with the audio (maybe annoying if you're recording or something).
edit:
added variable sound start and end locations at a resolution of 256 samples
using this i should probably be able to do some simple wavetable synthesis stuff though i'm not sure how good it's going to sound since there's going to be a slight time different each time a sample loads
I also figured out if I push the program code to the very end of the ROM I can include silence at the beginning of the 2nd bank.. so each sound bank will be 16k but there will be an additional 12k of silence after each sample.. this can be used to easily decrease the tempo or just add silence
now i have to learn the actual display and controller stuff so I could program the sampler without building a new ROM every time.. maybe even learn the battery backup stuff to save beats