Skip to content

Instantly share code, notes, and snippets.

@iicaras
Last active February 10, 2025 11:49
Show Gist options
  • Select an option

  • Save iicaras/430ba2f6bd7b1f250fe8664a3cbef987 to your computer and use it in GitHub Desktop.

Select an option

Save iicaras/430ba2f6bd7b1f250fe8664a3cbef987 to your computer and use it in GitHub Desktop.

Note Frequencies

🡪 iicaras

For a concert pitch of $\textup{A}_4 = 440 \textup{ hz}$, frequencies for each pitch in 12-TET are calculated using the equation

$$f_x = 2^{\tfrac{x}{12 \textup{ st}}}f_{\textup{A}_4},$$

with $[x] = \textup{ st}$ (semitones) and $x \in \mathbb{Z}$ 1. The table below gives the frequency for each note between C0 and B10.

def get_note_frequencies():
    return {['A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#'][n % 12] + str(int((n - 3) / 12)) : 440 / (2 ** 5) * 2 ** (n / 12) for n in range(3, 111)}
Note Frequency [Hz] Semitones from A4 (st)
C0 16.351597831287414 -57
C#0 17.323914436054505 -56
D0 18.354047994837973 -55
D#0 19.445436482630058 -54
E0 20.60172230705437 -53
F0 21.826764464562743 -52
F#0 23.12465141947715 -51
G0 24.49971474885933 -50
G#0 25.95654359874657 -49
A0 27.5 -48
A#0 29.13523509488062 -47
B0 30.867706328507758 -46
C1 32.70319566257483 -45
C#1 34.64782887210901 -44
D1 36.70809598967595 -43
D#1 38.890872965260115 -42
E1 41.20344461410874 -41
F1 43.653528929125486 -40
F#1 46.2493028389543 -39
G1 48.99942949771866 -38
G#1 51.91308719749314 -37
A1 55 -36
A#1 58.27047018976124 -35
B1 61.7354126570155 -34
C2 65.40639132514966 -33
C#2 69.29565774421802 -32
D2 73.41619197935188 -31
D#2 77.78174593052023 -30
E2 82.4068892282175 -29
F2 87.30705785825097 -28
F#2 92.4986056779086 -27
G2 97.99885899543733 -26
G#2 103.82617439498628 -25
A2 110 -24
A#2 116.54094037952248 -23
B2 123.470825314031 -22
C3 130.8127826502993 -21
C#3 138.59131548843604 -20
D3 146.83238395870376 -19
D#3 155.56349186104046 -18
E3 164.813778456435 -17
F3 174.61411571650194 -16
F#3 184.9972113558172 -15
G3 195.99771799087466 -14
G#3 207.65234878997256 -13
A3 220 -12
A#3 233.0818807590449 -11
B3 246.94165062806212 -10
C4 261.6255653005986 -9
C#4 277.1826309768721 -8
D4 293.66476791740763 -7
D#4 311.1269837220809 -6
E4 329.62755691286986 -5
F4 349.22823143300394 -4
F#4 369.9944227116344 -3
G4 391.9954359817492 -2
G#4 415.3046975799452 -1
A4 440 0
A#4 466.1637615180898 1
B4 493.88330125612424 2
C5 523.2511306011972 3
C#5 554.3652619537442 4
D5 587.3295358348153 5
D#5 622.2539674441618 6
E5 659.2551138257397 7
F5 698.4564628660079 8
F#5 739.9888454232688 9
G5 783.9908719634984 10
G#5 830.6093951598904 11
A5 880 12
A#5 932.3275230361796 13
B5 987.7666025122485 14
C6 1046.5022612023945 15
C#6 1108.7305239074883 16
D6 1174.6590716696305 17
D#6 1244.5079348883237 18
E6 1318.5102276514795 19
F6 1396.9129257320158 20
F#6 1479.9776908465376 21
G6 1567.9817439269968 22
G#6 1661.2187903197807 23
A6 1760 24
A#6 1864.6550460723593 25
B6 1975.533205024497 26
C7 2093.004522404789 27
C#7 2217.4610478149766 28
D7 2349.318143339261 29
D#7 2489.0158697766474 30
E7 2637.020455302959 31
F7 2793.8258514640315 32
F#7 2959.955381693075 33
G7 3135.9634878539937 34
G#7 3322.4375806395615 35
A7 3520 36
A#7 3729.3100921447212 37
B7 3951.0664100489917 38
C8 4186.009044809578 39
C#8 4434.922095629955 40
D8 4698.636286678519 41
D#8 4978.031739553295 42
E8 5274.040910605921 43
F8 5587.65170292806 44
F#8 5919.91076338615 45
G8 6271.926975707992 46
G#8 6644.875161279119 47
A8 7040 48
A#8 7458.6201842894425 49
B8 7902.132820097983 50
C9 8372.018089619156 51
C#9 8869.84419125991 52
D9 9397.272573357039 53
D#9 9956.06347910659 54
E9 10548.081821211843 55
F9 11175.30340585612 56
F#9 11839.8215267723 57
G9 12543.853951415984 58
G#9 13289.750322558239 59
A9 14080 60
A#9 14917.240368578885 61
B9 15804.265640195967 62
C10 16744.036179238312 63
C#10 17739.68838251982 64
D10 18794.545146714077 65
D#10 19912.12695821318 66
E10 21096.163642423686 67
F10 22350.60681171224 68
F#10 23679.6430535446 69
G10 25087.707902831968 70
G#10 26579.500645116477 71
A10 28160 72
A#10 29834.48073715777 73
B10 31608.53128039193 74

Bibliography

Footnotes

  1. iicaras, ‘harmonics.md’, Gist. Accessed: Jan. 12, 2025. [Online]. Available: https://gist.github.com/iicaras/9acfe1b65d2f3555211deeb3eec95e1b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment