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

Contents of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_change_play_pos_function.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3256 - (show annotations) (download) (as text)
Tue May 30 16:14:40 2017 UTC (3 years, 5 months ago) by schoenebeck
File MIME type: text/html
File size: 2718 byte(s)
* NKSP: Added change_play_pos() function.

1 <html>
2 <head>
3 <meta name="author" content="Christian Schoenebeck">
4 <title>change_play_pos() function</title>
5 <meta name="description" content="Change the sample playback position.">
6 </head>
7 <body>
8 <h1>change_play_pos()</h1>
9 <p>
10 This function can be used to change the sample playback position of the
11 voices of the requested note. You need to pass the note ID of the voices
12 you want to alter. This function will change the sample playback position
13 of all voices associated with the requested note.
14 </p>
15 <p>
16 At the moment you may only use this function for new notes.
17 That effectively means you should change the sample playback position with
18 this function before any <code lang="nksp">wait()</code> calls, and before
19 entering any loops that may execute your script for a very long time.
20 Using this function for notes which alreay play for a while does not raise an error,
21 but calling this function will simply be ignored for such older notes, and
22 thus will have no effect. This current limitation might change in future.
23 </p>
24
25 <note class="important">
26 In case the respective sample is using disk streaming, then you might be
27 limited to set the new playback position somwehere within a certain
28 range at the beginning of the sample (i.e. less than several hundred
29 milliseconds from sample start). The precise range depends on the
30 sampler configuration and the sampler format engine being used.
31 Setting a position beyond that maximum position might either cause your
32 position to be automatically corrected by the sampler, or that the resulting
33 voices will not play at all.
34 </note>
35
36 <h3>Function Prototype</h3>
37 <p/>
38 <code lang="nksp">
39 change_play_pos(??note??, ??position-us??)
40 </code>
41
42 <h3>Arguments</h3>
43 <table>
44 <tr>
45 <th>Argument Name</th> <th>Data Type</th> <th>Description</th>
46 </tr>
47 <tr>
48 <td><code>??note??</code></td>
49 <td>Note ID Number</td>
50 <td>All voices of this note will be modified.<br>
51 [required]</td>
52 </tr>
53 <tr>
54 <td><code>??position-us??</code></td>
55 <td>Integer Number</td>
56 <td>New sample playback position in micro seconds from sample start.<br>
57 [required]</td>
58 </tr>
59 </table>
60
61 <h3>Return Value</h3>
62 <p>None.</p>
63
64 <h3>Examples</h3>
65 <p>None yet.<p>
66
67 <h3>See also</h3>
68 <p><code>play_note()</code><p>
69
70 <h3>Availability</h3>
71 <p>Since LinuxSampler 2.0.0.svn57.<p>
72
73 <note>
74 This function exists only with NKSP, it is not available with KSP.
75 </note>
76
77 </body>
78 </html>

  ViewVC Help
Powered by ViewVC