/[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 3239 by schoenebeck, Sun May 28 16:50:11 2017 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 even 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 25  wait(??duration-us??) Line 39  wait(??duration-us??)
39        <tr>        <tr>
40          <td><code>??duration-us??</code></td>          <td><code>??duration-us??</code></td>
41          <td>Integer Number</td>          <td>Integer Number</td>
42          <td>Amount of microseconds to pause execution.<br>          <td>Positive (non zero) amount of microseconds to pause execution.<br>
43              [required]</td>              [required]</td>
44        </tr>        </tr>
45      </table>      </table>
# Line 34  wait(??duration-us??) Line 48  wait(??duration-us??)
48      <p>None.</p>      <p>None.</p>
49            
50      <h3>Examples</h3>      <h3>Examples</h3>
51      <p/>      <p>
52          The following example resembles a simple delay effect. For each note
53          being triggered by the musician, the script launches additional notes,
54          each one of such additional successive notes with a more and more reduced
55          volume.
56        </p>
57      <code>      <code>
58  on init  on init
59    { The amount of notes to play }    { The amount of notes to play }

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

  ViewVC Help
Powered by ViewVC