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
- Take the current period register
- Add the first number of the MML string to the register (so negative means minus)
- For the next frame add the next number of the MML string until all values are added
- If the | is present, then the next number of the last number will be the one right after the |
16ms is based on the clock period, set to 60Hz by default. The one you see is in fact ( 1000 ÷ 60 )ms multiplies by the envelope size and then floored. Even the clock speed is different through [Tracker] --> [Engine Speed] --> [Custom] it will still use ( 1000 ÷ 60 )ms for the calculation.
Also note that 16ms instead of ( 1000 ÷ 60 )ms was used in early versions of FamiTracker.
About | 8 and | -8: | 8 constantly adds the period register until it reaches the highest 7FF when the frequency is about 55Hz; | -8 means that the register will go all the way to 0, and that means the frequency will be 111860 ÷ 0 = infinity/meaningless, and so no sound will be made.
[quote=nicetas_c]
About | 8 and | -8: | 8 constantly adds the period register until it reaches the highest 7FF when the frequency is about 55Hz; | -8 means that the register will go all the way to 0, and that means the frequency will be 111860 ÷ 0 = infinity/meaningless, and so no sound will be made.[/quote]
You've lost me there but I've probably made some wrong assumptions
Is 7FF hexadecimal? If so then it equates to 2047 indicating there are 2048 values for the period.
If frequency is the reciprocal of period then 1 / 2047 doesn't equal 55 Hz. How did you calculate 55Hz from the period register?
7FF is in base 16, so that means 2047. The formula between the period register and the actual frequency is HP=111860 where P and H are the register and the frequency respectively.
Can you please tell me your source of information for the chip? In other words where did you learn of the H to P ratio, or did you just get the value from the maximum possible value?