<commit_before>Frequency Tables
================================================================================
[References]
http://www.phy.mtu.edu/~suits/notefreqs.html
https://en.wikipedia.org/wiki/Piano_key_frequencies
https://en.wikipedia.org/wiki/Scientific_pitch_notation#Table_of_note_frequencies
================================================================================
[FM]
The algorithm for deriving a F-Number is as follows:

F-Number = (144 * fnote * 2^20 / M) / 2^B-1

 fnote: pronounciation frequency (in Hertz)
 M: master clock (8MHz = 8*10^6 = 8000000)
 B: block data

Note       | Hertz   -> F-Number           | Dec.    Hex
-----------+-------------------------------+---------------
C-4        | 261.63Hz -> 617.26261248 f    | 617    0x269
C#4/Db4	   | 277.18Hz -> 653.94966528 f    | 654    0x28E
D-4        | 293.66Hz -> 692.83086336 f    | 693    0x2B5
D#4/Eb4	   | 311.13Hz -> 734.04776448 f    | 734    0x2DE
E-4        | 329.63Hz -> 777.69474048 f    | 777    0x309
F-4        | 349.23Hz -> 823.93694208 f    | 824    0x338
F#4/Gb4	   | 369.99Hz -> 872.91592704 f    | 873    0x369
G-4        | 392.00Hz -> 924.844032 f      | 925    0x39D
G#4/Ab4	   | 415.30Hz -> 979.8156288 f     | 980    0x3D3
A-4        | 440.00Hz -> 1038.09024 f      | 1038   0x40E
A#4/Bb4	   | 466.16Hz -> 1099.80942336 f   | 1100   0x44B
B-4        | 493.88Hz -> 1165.20910848 f   | 1165   0x48D
================================================================================
[SSG Square]
Hz = (M/64TP)

See ssg_square_hertz.txt for the entire table, because it's pretty big.

The Important Values:

Value		Equation			Hertz				Closest Note/Octave
-----------------------------------------------------------------------
$FD2		(8000000/259200)	30.864198			B-0
-----------------------------------------------------------------------
$EEE		(8000000/244608)	32.705390			C-1
$E18		(8000000/230912)	34.645233			C#1/Db1
$D4D		(8000000/217920)	36.710720			D-1
$C8E		(8000000/205696)	38.892346			Eb1/D#1
$BD9		(8000000/194112)	41.213320			E-1
$B2F		(8000000/183232)	43.660496			F-1
$A8F		(8000000/172992)	46.244913			F#1/Gb1
$9F7		(8000000/163264)	49.000392			G-1
$968		(8000000/154112)	51.910299			Ab1/G#1
$8E0		(8000000/145408)	55.017606			A-1
$861		(8000000/137280)	58.275058			Bb1/A#1
$7E9		(8000000/129600)	61.728395			B-1
-----------------------------------------------------------------------
$777		(8000000/122304)	65.410780			C-2
$70C		(8000000/115456)	69.290466			C#2/Db2
$6A7		(8000000/108992)	73.399883			D-2
$647		(8000000/102848)	77.784692			Eb2/D#2
$5ED		(8000000/97088)		82.399473			E-2
$598		(8000000/91648)		87.290503			F-2
..... (the rest is yet to come)

================================================================================
[SSG Noise]
Hz = (M/64NP)

Value		Equation			Hertz
------------------------------------------
$00			(Divide by 0)		Invalid
$01			(8000000/64)		125000
$02			(8000000/128)		62500
$03			(8000000/192)		41666.66667
$04			(8000000/256)		31250
$05			(8000000/320)		25000
$06			(8000000/384)		20833.33333
$07			(8000000/448)		17857.142857142857
$08			(8000000/512)		15625
$09			(8000000/576)		13888.88889
$0A			(8000000/640)		12500
$0B			(8000000/704)		11363.636363
$0C			(8000000/768)		10416.66667<commit_msg>no sense in having duplicate ssg period tables<commit_after>Frequency Tables
================================================================================
[References]
http://www.phy.mtu.edu/~suits/notefreqs.html
https://en.wikipedia.org/wiki/Piano_key_frequencies
https://en.wikipedia.org/wiki/Scientific_pitch_notation#Table_of_note_frequencies
================================================================================
[FM]
The algorithm for deriving a F-Number is as follows:

F-Number = (144 * fnote * 2^20 / M) / 2^B-1

 fnote: pronounciation frequency (in Hertz)
 M: master clock (8MHz = 8*10^6 = 8000000)
 B: block data

Note       | Hertz   -> F-Number           | Dec.    Hex
-----------+-------------------------------+---------------
C-4        | 261.63Hz -> 617.26261248 f    | 617    0x269
C#4/Db4	   | 277.18Hz -> 653.94966528 f    | 654    0x28E
D-4        | 293.66Hz -> 692.83086336 f    | 693    0x2B5
D#4/Eb4	   | 311.13Hz -> 734.04776448 f    | 734    0x2DE
E-4        | 329.63Hz -> 777.69474048 f    | 777    0x309
F-4        | 349.23Hz -> 823.93694208 f    | 824    0x338
F#4/Gb4	   | 369.99Hz -> 872.91592704 f    | 873    0x369
G-4        | 392.00Hz -> 924.844032 f      | 925    0x39D
G#4/Ab4	   | 415.30Hz -> 979.8156288 f     | 980    0x3D3
A-4        | 440.00Hz -> 1038.09024 f      | 1038   0x40E
A#4/Bb4	   | 466.16Hz -> 1099.80942336 f   | 1100   0x44B
B-4        | 493.88Hz -> 1165.20910848 f   | 1165   0x48D
================================================================================
[SSG Square]
Hz = (M/64TP)

See ssg_square_hertz.txt for the table of valid values, because it's pretty big.

================================================================================
[SSG Noise]
Hz = (M/64NP)

Value		Equation			Hertz
------------------------------------------
$00			(Divide by 0)		Invalid
$01			(8000000/64)		125000
$02			(8000000/128)		62500
$03			(8000000/192)		41666.66667
$04			(8000000/256)		31250
$05			(8000000/320)		25000
$06			(8000000/384)		20833.33333
$07			(8000000/448)		17857.142857142857
$08			(8000000/512)		15625
$09			(8000000/576)		13888.88889
$0A			(8000000/640)		12500
$0B			(8000000/704)		11363.636363
$0C			(8000000/768)		10416.66667
{'fraction_non_alphanumeric': 0.2984283625730994, 'fraction_numerical': 0.2845394736842105, 'mean_word_length': 2.1949795680093405, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5196839', 'n_tokens_mistral': 3224, 'n_tokens_neox': 2179, 'n_words': 448}