414 |
triggered on a MIDI keyboard. The following example demonstrates how that |
triggered on a MIDI keyboard. The following example demonstrates how that |
415 |
could be achieved. |
could be achieved. |
416 |
</p> |
</p> |
417 |
<note class="important"> |
<note> |
418 |
The following example does not fully work with LinuxSampler yet. That's |
You need at least LinuxSampler 2.0.0.svn2 or higher for the following |
419 |
because the used <code>wait()</code> function is not fully implemented |
example to work as described and as expected. Refer to the notes of the |
420 |
yet. Currently a <code>wait()</code> function call suspends execution, |
<code>wait()</code> function reference documentation for more |
421 |
but since the respective scheduler code is yet missing, the script |
informations about this issue. |
|
will automatically be resumed with the next audio fragment cycle. So |
|
|
effectively a <code>wait()</code> call will pause your script for a few |
|
|
miliseconds with LinuxSampler right now, no matter which function argument |
|
|
you provided. Hopefully this will be implemented soon though. |
|
422 |
</note> |
</note> |
423 |
<code> |
<code> |
424 |
on init |
on init |
600 |
like we did with <code>$i := $delayNotes</code> right from the start |
like we did with <code>$i := $delayNotes</code> right from the start |
601 |
during discussion of the previous example script. |
during discussion of the previous example script. |
602 |
</p> |
</p> |
603 |
|
<p> |
604 |
|
There is another special aspect regarding the variable scope of polyphonic |
605 |
|
variables: <code>note</code> handlers and <code>release</code> handlers of |
606 |
|
the same script share the same polyphonic variable scope, that means you |
607 |
|
may pass data from a particular note's <code>note</code> handler to its |
608 |
|
<code>release</code> handler by using the same polyphonic variable name. |
609 |
|
</p> |
610 |
|
|
611 |
<h2>Control Structures</h2> |
<h2>Control Structures</h2> |
612 |
<p> |
<p> |