Debian Codegraph @

docs/manual/Demo_window_5__Asynchronous_play.html

raw
1 <html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
2 <title>Demo window 5. Asynchronous play</title>
3 <style>
4 td { padding-left: 5pt; padding-right: 5pt; }
5 th { padding-left: 5pt; padding-right: 5pt; }
6 code { white-space: pre-wrap; }
7 dd { white-space: pre-wrap; }
8 </style>
9 </head><body bgcolor="#FFFFFF">
10
11 <table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b>
12 Demo window 5. Asynchronous play
13 </b></font></table></table>
14 <p>If you select a Sound and execute the command</p>
15 <code> <a href="Sound__Play.html">Play</a><br></code>
16 <p>Praat will play the whole sound before proceeding to the next line of your script. You will often instead want Praat to continue running your script while the sound is playing. To accomplish that, use the <a href="_asynchronous_.html"><b><code><font size=+1>asynchronous</font></code></b></a> directive:</p>
17 <code> <a href="Create_Sound_as_pure_tone___.html">Create Sound as pure tone:</a> “tone”, 1, 0, 0.2, 44100, 440, 0.2, 0.01, 0.01<br></code>
18 <code> <b><a href="_asynchronous_.html">asynchronous</a></b> <a href="Sound__Play.html">Play</a><br></code>
19 <code> <a href="Remove.html">Remove</a><br></code>
20 <p>The sound will continue to play, even after the Sound object has been removed.</p>
21 <p>Please note that a following Play command will interrupt the playing of the first:</p>
22 <code> while <a href="_demoWaitForInput_.html">demoWaitForInput</a> ()<br></code>
23 <code> if <a href="_demoClicked_.html">demoClicked</a> ()<br></code>
24 <code> <a href="Create_Sound_as_pure_tone___.html">Create Sound as pure tone:</a> “tone”, 1, 0, 3.0, 44100,<br></code>
25 <code> ... <a href="_randomGauss_.html">randomGauss</a> (440, 100), 0.2, 0.01, 0.01<br></code>
26 <code> <b><a href="_asynchronous_.html">asynchronous</a></b> <a href="Sound__Play.html">Play</a><br></code>
27 <code> <a href="Remove.html">Remove</a><br></code>
28 <code> endif<br></code>
29 <code> endwhile<br></code>
30 <p>The first sound will stop playing soon after the user clicks for the second time.</p>
31 <h3>Links to this page</h3>
32 <ul>
33 <li><a href="Demo_window.html">Demo window</a>
34 </ul>
35 <hr>
36 <address>
37 <p>© Paul Boersma 2009–2023</p>
38 </address>
39 </body>
40 </html>