Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29
I'm someone who's somewhat familiar with Famitracker; I know how to put notes and effects in decently. Lately I've been using the ImportNSF program to examine many chiptunes closer and I saw a reoccurring duo of effects such as "P7F" and "P81".
For the longest time I was confused on the Pxx effect, due to me not knowing exactly what it means. I've always been confused on whether it refereed to cents or what. Seeing that the instrument editor's pitch editor goes from -127 to 127, I was wondering if it even meant cents at all.
I looked more into the subject, I think I've only confused myself alot more. I ran into Rainwarrior's Pitch Table and I admit, I was really lost as it seemed to speak more about Hz than anything and I'm very unfamiliar with Hz.
The pitch macro and the Pxx effect modify the set register values that are associated with all the notes. If you don't know what a "register" is, you should look it up. It's basically what the CPU uses to communicate with other devices connected, like the sound hardware in this case. By sending the right values to these registers, it basically changes the settings of the sound channels every 1/60th a second (on NTSC) such as frequency, duty cycle, volume, whether to use the built-in pitch modifier (Hardware Sweep), etc.
Actually, the lower the frequency register, the higher your note is.
The note C-3 means the register value of $1AB (or 427 in decimal) for example. D-3 is $17C (380)
BUT, C-6 is $34 (52) and D-6 is $2F (47)
And what Pxx does, is basically adding or substracting from these values. It doesn't mean a cent, because as you go higher in frequency, the larger the gaps will be between each frequency register value (so vibrato effects also become more sensitive)
When you use Pxx it will remain in effect until the next Pxx on that channel. Use P80 to reset the pitch. P7F is -1, P81 is +1, I think you can figure it out from there.
The actual scale of the number used in Pxx is relative to the pitch. It's not in a pitch-linear space like XM/IT, it's a period-linear space (i.e. Pxx makes increases the length of the period in even increments). For reference, frequeny = 1/period, pitch-linear is something like log(1/period).
If anything "cents" are difficult to understand because it's like a 1-100 percantage, but logarithmically, since an A4 would be 440 hz, and A5 would be 880hz, however, the tritone D#5 isn't halfway at 660hz, but rather 622.2.
A cents difference SOUNDS like percentage in-tune to our ears, but accoustically, it's according to a logarithmic scale.
But yeah, Pxx changes the divisor for the frequency.
It should be noted that ImportNSF only uses the Pxx command a lot for two reasons: it can't detect vibrato or pitch slides, so it has to represent intermediate pitches that way, and because not all games use quite the same musical scale as FamiTracker. Basically, ImportNSF only sees frequencies (well, it sees register writes, but those map to frequencies), then it comes up with the closest notes and adds pitch adjustments with the Pxx command to make it match the original frequency.
Pxx isn't used very much by FT composers; mostly just for chorus effects or funky phase cancellation. It can also be useful to add a slight chorus to a delay (echo) channel to make the echo more distinct (or to prevent phase problems).
Apologies for the late reply everyone. And thank everyone for the info. I think I generally understand the pitch table now... sort of. I think I can atleast see the correlation between the PXX effect and the pitch editor in famitracker.
Though I would suppose that I'd need to learn about hz a tab more in the future when working with famitracker. But for now, I think I get the general idea of how to use pitches.