| 1 |
sound = Create Sound from formula: "sineWithNoise", 1, 0, 1, 44100, ~ 1/2 * sin(2*pi*377*x) + randomGauss(0,0.1) |
| 2 |
pitch = noprogress To Pitch: 0.0, 75.0, 600.0 |
| 3 |
View & Edit |
| 4 |
editor: pitch |
| 5 |
info$ = Editor info |
| 6 |
assert index (info$, "Editor type: PitchEditor" + newline$) |
| 7 |
assert index (info$, "Editor name: ") |
| 8 |
assert index (info$, ". Pitch sineWithNoise" + newline$) |
| 9 |
assert index (info$, "Editor end: 1 seconds" + newline$) |
| 10 |
assert index (info$, "Selection start: 0.5 seconds" + newline$) ; if this editor is the only open editor |
| 11 |
assert index (info$, "Selection end: 0.5 seconds" + newline$) |
| 12 |
info$ = Pitch info |
| 13 |
assert index (info$, "Object type: Pitch" + newline$) |
| 14 |
assert index (info$, "Object name: sineWithNoise" + newline$) |
| 15 |
assert index (info$, "Time domain:" + newline$) |
| 16 |
assert index (info$, " Start time: 0 seconds" + newline$) |
| 17 |
assert index (info$, " End time: 1 seconds" + newline$) |
| 18 |
assert index (info$, " Number of frames: 97 (97 voiced)" + newline$) or index (info$, " Number of frames: 96 (96 voiced)" + newline$) |
| 19 |
assert index (info$, "Ceiling at: 600 Hz") |
| 20 |
assert index (info$, "Estimated quantiles:" + newline$) |
| 21 |
assert index (info$, "Minimum 3") |
| 22 |
assert index (info$, "Standard deviation: ") |
| 23 |
assert index (info$, "Mean absolute slope: ") |
| 24 |
assert index (info$, "Average: 37") |
| 25 |
|
| 26 |
# |
| 27 |
# FunctionEditor properties. |
| 28 |
# |
| 29 |
a = Get start of selection |
| 30 |
assert a = 0.5 |
| 31 |
Move cursor to: 0.567 |
| 32 |
a = Get cursor |
| 33 |
assert a = 0.567 |
| 34 |
|
| 35 |
# |
| 36 |
# Pitch properties. |
| 37 |
# |
| 38 |
Select: 0.3, 0.7 |
| 39 |
f0 = Get pitch |
| 40 |
assert f0 > 375 ; 'f0' |
| 41 |
assert f0 < 379 ; 'f0' |
| 42 |
|
| 43 |
Close |
| 44 |
endeditor |
| 45 |
plusObject: sound |
| 46 |
Remove |