SIne Curves, Frequency and Harmonies
Author: John Maharry
Date: 2/26/2007

Click on the applet to begin.
Select Notes on the Keyboard to Play by moving the Red Slider Up 
The bottom figure shows the overlapping sine curves.
The top figure shows the sum of the sines curves.
The better the curves "fit" the nicer the chord sounds.
Try some examples.

Overlapping Sine Waves of Selected Notes

Sum of Sine Waves of Selected Notes

A

B

C

D

E

F

G

A

aF = 0 (slider from 0 to 1, step 1)
fS = 0 (slider from 0 to 1, step 1)
eF = 0 (slider from 0 to 1, step 1)
cS = 0 (slider from 0 to 1, step 1)
g = 0 (slider from 0 to 1, step 1)
a2 = 0 (slider from 0 to 1, step 1)
f = 0 (slider from 0 to 1, step 1)
d = 0 (slider from 0 to 1, step 1)
c = 0 (slider from 0 to 1, step 1)
b = 0 (slider from 0 to 1, step 1)
a = 1 (slider from 0 to 1, step 1)
e = 1 (slider from 0 to 1, step 1)
bF = 0 (slider from 0 to 1, step 1)
A(x) = a sin(440 x)
C(x) = c sin(522 x)
D(x) = d sin(586 x)
EF(x) = eF sin(620 x)
B(x) = bF sin(493 x)
CS(x) = cS sin(554 x)
E(x) = e sin(658 x)
BF(x) = bF sin(466 x)
Total(x) = 3 / (a + a2 + aF + b + bF + c + cS + d + e + eF + f + fS + g + aF + a2) (a sin(440 x) + bF sin(466 x) + b sin(493 x) + c sin(522 x) + cS sin(554 x) + d sin(586 x) + eF sin(620 x) + e sin(658 x) + f sin(696 x) + fS sin(737 x) + g sin(780 x) + aF sin(826 x) + a2 sin(880 x)) + 8
F(x) = f sin(696 x)
FS(x) = fS sin(737 x)
G(x) = g sin(780 x)
AF(x) = aF sin(826 x)
A2(x) = a2 sin(880 x)
H = (0.08, 4)
I = (0.09, 4)
J = (0.09, 2)
K = (0.08, 2)
P, h, i, j, k = Polygon(H, I, J, K)
L = (0.1, 4)
M = (0.1, 2)
Q, i_1, l, m, j_1 = Polygon(I, L, M, J)
N = (0.08535074756606396, 4.9914703581363)
O = (0.0946953233657858, 4.9914703581363)
T = (0.0946953233657858, 3.3398709144645338)
U = (0.08491611613351877, 3.3398709144645338)
V, n, o, t, u = Polygon(N, O, T, U)
W = (0.11, 4)
Y = (0.11, 2)
Z, l_1, w, y, m_1 = Polygon(L, W, Y, M)
A_1 = (0.12, 4)
B_1 = (0.12, 2)
P_1, w_1, a_1, b_1, y_1 = Polygon(W, A_1, B_1, Y)
C_1 = (0.13, 4)
D_1 = (0.13, 2)
Q_1, a_2, c_1, d_1, b_2 = Polygon(A_1, C_1, D_1, B_1)
E_1 = (0.14, 4)
F_1 = (0.14, 2)
R_1, c_2, e_1, f_1, d_2 = Polygon(C_1, E_1, F_1, D_1)
G_1 = (0.15, 4)
H_1 = (0.15, 2)
S_1, e_2, g_1, h_1, f_2 = Polygon(E_1, G_1, H_1, F_1)
I_1 = (0.16, 4)
J_1 = (0.16, 2)
T_1, g_2, i_2, j_2, h_2 = Polygon(G_1, I_1, J_1, H_1)
K_1 = (0.10512647774687064, 4.9914703581363)
L_1 = (0.11512300069541029, 5.01320192976356)
M_1 = (0.11490568497913768, 3.361602486091794)
N_1 = (0.105, 3.367)
U_1, k_1, l_2, m_2, n_1 = Polygon(K_1, L_1, M_1, N_1)
O_1 = (0.12511952364394993, 4.9914703581363)
V_1 = (0.12468489221140472, 3.383334057719054)
W_1, l_3, o_1, v_1, m_3 = Polygon(L_1, O_1, V_1, M_1)
Y_1 = (0.13555067802503476, 5.05666507301808)
Z_1 = (0.13533336230876217, 3.4702603442280946)
A_2 = (0.14532988525730178, 3.4919919158553543)
B_2 = (0.1451125695410292, 4.9914703581363)
P_2, y_2, z_1, a_3, b_3 = Polygon(Y_1, Z_1, A_2, B_2)
C_2 = (0.15510909248956883, 5.01320192976356)
D_2 = (0.15467446105702362, 3.4702603442280946)
Q_2, b_4, c_3, d_3, a_4 = Polygon(B_2, C_2, D_2, A_2)
R = Point(k_1)
S = (0.115, 3.144)
p = Segment(R, S)
E_2 = (0.146, 5.165)
F_2 = (0.1455472009735744, 3.361602486091794)
q = Segment(E_2, F_2)
r = Segment(E_2, F_2)
G_2 = (0.07, 4)
H_2 = Intersect(h, k)
I_2 = Intersect(j, k)
J_2 = (0.07, 2)
R_2, g_3, h_3, i_3, j_3 = Polygon(G_2, H_2, I_2, J_2)
K_2 = (0.06, 4)
L_2 = (0.06, 2)
S_2, k_2, g_4, j_4, l_4 = Polygon(K_2, G_2, J_2, L_2)
M_2 = Intersect(g_2, i_2)
N_2 = (0.17, 4)
O_2 = (0.17, 2)
T_2 = Intersect(i_2, j_2)
U_2, m_4, n_2, o_2, t_2 = Polygon(M_2, N_2, O_2, T_2)
V_2 = (0.18, 4)
W_2 = (0.18, 2)
Y_2, n_3, v_2, w_2, o_3 = Polygon(N_2, V_2, W_2, O_2)
Z_2 = (0.07448496175243394, 4.9914703581363)
A_3 = (0.08339490611961056, 4.96973878650904)
B_3 = (0.08361222183588317, 3.361602486091794)
C_3 = (0.07448496175243394, 3.3398709144645338)
P_3, z_2, a_5, b_5, c_4 = Polygon(Z_2, A_3, B_3, C_3)
D_3 = (0.06383649165507649, 4.9914703581363)
E_3 = (0.07252912030598052, 4.9914703581363)
F_3 = (0.07274643602225313, 3.3398709144645338)
G_3 = (0.06383649165507649, 3.3398709144645338)
Q_3, d_4, e_3, f_3, g_5 = Polygon(D_3, E_3, F_3, G_3)
H_3 = (0.15684761821974963, 4.9914703581363)
I_3 = (0.16554024687065366, 5.01320192976356)
J_3 = (0.16554024687065366, 3.4919919158553543)
K_3 = (0.15641298678720444, 3.4919919158553543)
R_3, h_4, i_4, j_5, k_3 = Polygon(H_3, I_3, J_3, K_3)
L_3 = (0.19, 4)
M_3 = (0.19, 2)
S_3, v_3, l_5, m_5, w_3 = Polygon(V_2, L_3, M_3, W_2)
N_3 = (0.1753194541029207, 5.01320192976356)
O_3 = (0.18444671418636993, 5.01320192976356)
T_3 = (0.18401208275382475, 3.5354550591098746)
U_3 = (0.1748848226703755, 3.5137234874826144)
V_3, n_4, o_4, t_3, u_3 = Polygon(N_3, O_3, T_3, U_3)
W_3 = (0.19, 4)
Y_3 = (0.2, 4)
Z_3 = (0.2, 2)
P_4, y_3, z_3, m_6, l_6 = Polygon(Y_3, Z_3, M_3, L_3)
A_4 = (0.18575060848400554, 5.01320192976356)
B_4 = (0.19531249999999997, 5.01320192976356)
C_4 = (0.19531249999999997, 3.4702603442280946)
D_4 = (0.18575060848400554, 3.4919919158553543)
Q_4, a_6, b_6, c_5, d_5 = Polygon(A_4, B_4, C_4, D_4)