/[svn]/doc/docbase/instrument_scripts/nksp/reference/functions/nksp_wait_function.html
ViewVC logotype

Diff of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_wait_function.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2872 by schoenebeck, Sun Apr 10 18:42:55 2016 UTC revision 3601 by schoenebeck, Mon Sep 16 16:03:36 2019 UTC
# Line 7  Line 7 
7    <body>    <body>
8      <h1>wait()</h1>      <h1>wait()</h1>
9      <p>      <p>
10        Suspends / pauses the current event handler instance for the requested        Suspends / pauses execution of the current event handler instance for the requested
11        amount of microseconds.        amount of microseconds. The paused event handler instance can also be resumed before
12          the requested amount times elapsed by calling <code lang="nksp">stop_wait()</code> from another
13          event handler instance.
14      </p>      </p>
15            <p>
16          The <code>??duration-us??</code> argument must neither
17          be negative nor zero, otherwise script execution will be aborted, because this
18          is a common indication of bugs in scripts which could potentially lead to
19          real-time instability or worse scenarios otherwise.
20        </p>
21        <note>
22          If the event handler instance's built-in variable <code>$NKSP_IGNORE_WAIT</code>
23          reflects <code>1</code> then all calls to <code>wait()</code> will be ignored.
24          This might for example be the case when <code>stop_wait()</code> with
25          <code>1</code> being passed to the 2nd argument of that function.
26        </note>
27    
28      <h3>Function Prototype</h3>      <h3>Function Prototype</h3>
29      <p/>      <p/>
30      <code lang="nksp">      <code lang="nksp">
# Line 24  wait(??duration-us??) Line 38  wait(??duration-us??)
38        </tr>        </tr>
39        <tr>        <tr>
40          <td><code>??duration-us??</code></td>          <td><code>??duration-us??</code></td>
41          <td>Integer Number</td>          <td>Integer&nbsp;Number&nbsp;or<br>
42          <td>Amount of microseconds to pause execution.<br>              Real&nbsp;Number</td>
43            <td>Positive (non zero) amount of microseconds to pause execution.<br>
44              [required]</td>              [required]</td>
45        </tr>        </tr>
46      </table>      </table>
47        
48      <h3>Return Value</h3>      <h3>Return Value</h3>
49      <p>None.</p>      <p>None.</p>
50        
51        <h3>Remarks</h3>
52        <p>
53          This functions optionally accepts <code>s</code> as standard unit
54          for its argument <code>??duration-us??</code>.
55        </p>
56    
57      <h3>Examples</h3>      <h3>Examples</h3>
58      <p/>      <p>
59          The following example resembles a simple delay effect. For each note
60          being triggered by the musician, the script launches additional notes,
61          each one of such additional successive notes with a more and more reduced
62          volume.
63        </p>
64      <code>      <code>
65  on init  on init
66    { The amount of notes to play }    { The amount of notes to play }
# Line 86  end on Line 112  end on
112        miliseconds, no matter which function argument you provided.        miliseconds, no matter which function argument you provided.
113      </note>      </note>
114    
115        <h3>See also</h3>
116        <p><code>stop_wait()</code><p>
117    
118    </body>    </body>
119  </html>  </html>

Legend:
Removed from v.2872  
changed lines
  Added in v.3601

  ViewVC Help
Powered by ViewVC