Fréquence du son (en Hz)

Points de l'échantillon

Segments de l'échantillon

Courbe échantillon

Fonction

Points quantifiés

Courbe quantifiée

barres

fs = 440 (slider from 50 to 1000, step 5)
f(x) = sin((((fs * 2) * π) * x))
lt: {}
n = 42 (slider from 0 to 300, step 1)
b = 0.01 (slider from -5 to 5)
l1 = Sequence((i * b / n), i, 0, n)
f_1(x) = If[0 ≤ x ≤ 0.01, f(x)]
lcourbe: (l1, f_1(l1))
l3 = Sequence((x(lcourbe(i) + b / ((2 * n))), y(lcourbe(i))), i, 1, n)
l2 = Sequence((x(lcourbe(i) - b / ((2 * n))), y(lcourbe(i))), i, 2, n + 1)
l4 = Sequence(Append[Append[lt, l3(i)], l2(i)], i, 1, n)
l5 = Flatten(l4)
l6 = Insert(lcourbe(1), l5, 1)
l7 = Append(l6, lcourbe(n + 1))
labs: (l1, 0)
lsegm = Sequence(Segment[labs(i), lcourbe(i)], i, 1, n + 1)
cb = PolyLine(l7)
g = PolyLine(lcourbe)
l8 = Sequence(Segment[l2(i - 1), l3(i)], i, 2, n)
l9 = Append(l8, Segment[lcourbe(1), l3(1)])
segech = Append(l9, Segment[l2(n), lcourbe(n + 1)])
a = true
c = false
d = false
e = true
p = 2 (slider from 2 to 4, step 1)
q: 2^(p)
vq = Sequence(-1 + (1 + (2 * i)) / q, i, 0, q - 1)
m1 = Sequence(Sequence[abs(y(lcourbe(i)) - vq(j)), j, 1, q], i, 1, n + 1)
l10 = Sequence(IndexOf[Min[m1(i)], m1(i)], i, 1, n + 1)
lquant = Sequence((x(lcourbe(i)), vq(l10(i))), i, 1, n + 1)
l11 = Sequence((x(lquant(i)) - b / ((2 * n)), y(lquant(i))), i, 2, n + 1)
l12 = Sequence((x(lquant(i)) + b / ((2 * n)), y(lquant(i))), i, 1, n)
l13 = Sequence(Append[Append[lt, l12(i)], l11(i)], i, 1, n)
l14 = Flatten(l13)
l15 = Insert(lquant(1), l14, 1)
l16 = Append(l15, lquant(-1))
l17 = Sequence(Segment[l16(i - 1), l16(i)], i, 2, (2 * n) + 2)
h = false
i = false
A = (0.011019446640316202, 1.7007185254607933)
B = (0.015996837944664024, 1.6938456732271163)
C = (0.01601249011857707, -1.295845048422368)
D = (0.011003794466403156, -1.302717900656045)
q1, a_1, b_1, c_1, d_1 = Polygon(A, B, C, D)
j = false