| 1 |
# test_Sound_paint_where.praat |
| 2 |
# djmw 20110524 |
| 3 |
|
| 4 |
Erase all |
| 5 |
|
| 6 |
s1 = Create Sound from formula... s Mono 0 1 10000 0.5*sin (2*pi*5*x) |
| 7 |
s2 = Create Sound from formula... 1odx Mono 0 20 100 1/x |
| 8 |
s3 = Create Sound from formula... line Mono 0 1 10000 x/2 |
| 9 |
|
| 10 |
Select outer viewport... 0 6 0 3 |
| 11 |
select s1 |
| 12 |
Paint where... Red 0 0 -1 1 -1 y 1 |
| 13 |
Paint where... Green 0 0 -1 1 1 n 1 |
| 14 |
Text top... n Paint where: green above, red below the sin of 5 Hz |
| 15 |
|
| 16 |
Select outer viewport... 0 6 3 6 |
| 17 |
Paint where... Red 0 0 -1 1 0 n self>0 |
| 18 |
Paint where... Green 0 0 -1 1 0 y self<0 |
| 19 |
Text top... n Paint where: green is positive area , red is negative area of sin of 5 Hz |
| 20 |
|
| 21 |
select s2 |
| 22 |
Select outer viewport... 0 6 6 9 |
| 23 |
Draw... 0 20 0 1.5 y Curve |
| 24 |
Paint where... Grey 0 20 0 1.5 0 y (x>=1 and x<2) or (x>=4 and x<8) |
| 25 |
One mark bottom... 1 y y n |
| 26 |
One mark bottom... 2 y y n |
| 27 |
One mark bottom... 4 y y n |
| 28 |
One mark bottom... 8 y y n |
| 29 |
Text top... n Paint where: grey intervals (1,2) and (4,8) |
| 30 |
Remove |
| 31 |
|
| 32 |
select s3 |
| 33 |
plus s1 |
| 34 |
Select outer viewport... 0 6 9 12 |
| 35 |
Paint enclosed... Grey 0 0 -1 1 yes |
| 36 |
Text top... n Paint enclosed: between sine and straight line |
| 37 |
removeObject: s1, s3 |
| 38 |
|