| 1 |
writeInfoLine: "CPPS" |
| 2 |
sound = Create Sound as tone complex: "toneComplex", 0, 1, 44100, "cosine", 100, 0, 0, 0 |
| 3 |
ceps = noprogress To PowerCepstrogram: 60, 0.0020001, 5000, 50 |
| 4 |
cpps = Get CPPS: "yes", 0.02, 0.0005, 60, 330, 0.05, "Parabolic", 0.001, 0, "Exponential decay", "Robust" |
| 5 |
appendInfoLine: "cpps = ", cpps, " dB" |
| 6 |
if fixed$ (cpps, 5) <> "29.06952" |
| 7 |
appendInfoLine: "WARNING: should have been 29.06952 dB" |
| 8 |
endif |
| 9 |
removeObject: sound, ceps |
| 10 |
|
| 11 |
for i to 10 |
| 12 |
sound = Create Sound from formula: "sineWithNoise", 1, 0, 1, 44100, "1/2 * sin(2*pi*377*x) + randomGauss(0,0.1)" |
| 13 |
ceps = noprogress To PowerCepstrogram: 60, 0.0020001, 5000, 50 |
| 14 |
cpps = Get CPPS: "yes", 0.02, 0.0005, 60, 330, 0.05, "Parabolic", 0.001, 0, "Exponential decay", "Robust" |
| 15 |
appendInfoLine: cpps |
| 16 |
if not (3.6 < cpps and cpps < 4.6) |
| 17 |
appendInfoLine: "WARNING: should have been between 4.0 and 4.9 dB" |
| 18 |
endif |
| 19 |
removeObject: sound, ceps |
| 20 |
endfor |
| 21 |
appendInfoLine: "CPPS OK" |