Hey I am working to try and understand SPC programming. I'm working on an example taking a sample at one frequency and then using it to create a diatonic scale (ie "do re mi").
I understand all the .BRR playback stuff, but I am confused about the conversion of desired pitch in Hz to a 14-bit hex value.
The Snes Dev Manual http://www.romhacking.net/documents/226/ specifies this:
f = f0 * (P/2^12)
Where P pitch value for the SNES. f is "the frequency of the reproduced sound" and f0 is the "frequency of the original sound (sound at the time of recording)"
while the SPC700 reference http://wiki.superfamicom.org/snes/show/SPC700+Reference says this:
HZ = 32000 * (P/2^12)
My understanding from the SNES Dev Manual is that f0 is the actual frequency of the note (ie 440Hz for A), but the sfc wiki implies this is the sample rate.
I am at work so I can't test it out right now. Just curious if anyone knows offhand, and subsequently if the sfc wiki is incorrect.
I understand all the .BRR playback stuff, but I am confused about the conversion of desired pitch in Hz to a 14-bit hex value.
The Snes Dev Manual http://www.romhacking.net/documents/226/ specifies this:
f = f0 * (P/2^12)
Where P pitch value for the SNES. f is "the frequency of the reproduced sound" and f0 is the "frequency of the original sound (sound at the time of recording)"
while the SPC700 reference http://wiki.superfamicom.org/snes/show/SPC700+Reference says this:
HZ = 32000 * (P/2^12)
My understanding from the SNES Dev Manual is that f0 is the actual frequency of the note (ie 440Hz for A), but the sfc wiki implies this is the sample rate.
I am at work so I can't test it out right now. Just curious if anyone knows offhand, and subsequently if the sfc wiki is incorrect.