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

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

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

revision 2732 by schoenebeck, Sun Apr 26 20:54:00 2015 UTC revision 3234 by schoenebeck, Sun May 28 16:21:57 2017 UTC
# Line 7  Line 7 
7    <body>    <body>
8      <h1>play_note()</h1>      <h1>play_note()</h1>
9      <p>      <p>
10        Triggers a new note to be played by the sampler. This is like generating        Triggers a new note to be played by the sampler. This is almost
11        a new MIDI note-on event programmatically.        like generating
12          a new MIDI note-on event programmatically, with the difference though
13          that triggering a note programmatically this way does not cause a
14          <code lang="nksp">note</code> event handler to be executed for the new note, nor
15          will any MIDI specific note-on handling be done (i.e. it will have
16          no effect on key switching or on the status of built-in array variable
17          <code>%KEY_DOWN[]</code>).
18      </p>      </p>
19            
20      <h3>Function Prototype</h3>      <h3>Function Prototype</h3>
21      <p/>      <p/>
22      <code>      <code lang="nksp">
23  play_note(??note??, [??velocity??], [??offset-us??], [??duration-us??])  play_note(??note??, [??velocity??], [??offset-us??], [??duration-us??])
24      </code>      </code>
25    
# Line 32  play_note(??note??, [??velocity??], [??o Line 38  play_note(??note??, [??velocity??], [??o
38          <td><code>??velocity??</code></td>          <td><code>??velocity??</code></td>
39          <td>Integer Number</td>          <td>Integer Number</td>
40          <td>Trigger velocity.<br>          <td>Trigger velocity.<br>
41              [optional, default: 127]</td>              [optional, default: <code>127</code>]</td>
42        </tr>        </tr>
43        <tr>        <tr>
44          <td><code>??offset-us??</code></td>          <td><code>??offset-us??</code></td>
45          <td>Integer Number</td>          <td>Integer Number</td>
46          <td>Start offset of the sample to be played in microseconds.<br>          <td>Start offset of the sample to be played in microseconds.<br>
47              [optional, default: 0]</td>              [optional, default: <code>0</code>]</td>
48        </tr>        </tr>
49        <tr>        <tr>
50          <td><code>??duration-us??</code></td>          <td><code>??duration-us??</code></td>
51          <td>Integer Number</td>          <td>Integer Number</td>
52          <td>Length of the note to be played in microseconds.<br>          <td>Length of the note to be played in microseconds.<br>
53              -1: The note will be stopped when the event              <code>-1</code>: The note will be stopped when the event
54                  handler's note stops.<br>                  handler's note stops (must only be used with
55              0: The entire note's sample will be played to its end.<br>                  <code>note</code> event handlers).<br>
56              [optional, default: 0]</td>              <code>0</code>: The entire note's sample will be played to its end.<br>
57                [optional, default: <code>0</code>]</td>
58        </tr>        </tr>
59      </table>      </table>
60    
61        <note>
62        You need at least LinuxSampler 2.0.0.svn2 or higher for passing a value
63        higher than <code>0</code> for <code>??duration-us??</code>, and you need
64        at least LinuxSampler 2.0.0.svn3 or higher for passing <code>-1</code> for
65        <code>??duration-us??</code>.
66        </note>
67    
68      <note class="important">      <note class="important">
69      Passing any other value than <code>0</code> for <code>??duration-us??</code>      Passing any other value than <code>0</code> for <code>??offset-us??</code>
70      is not supported by LinuxSampler yet.      is not supported by LinuxSampler yet.
71      </note>      </note>
72        
73      <h3>Return Value</h3>      <h3>Return Value</h3>
74      <table>      <table>
75        <tr>        <tr>

Legend:
Removed from v.2732  
changed lines
  Added in v.3234

  ViewVC Help
Powered by ViewVC