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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3243 - (show annotations) (download) (as text)
Sun May 28 17:14:14 2017 UTC (4 years ago) by schoenebeck
File MIME type: text/html
File size: 2213 byte(s)
- NKSP: Added description to example code of set_event_mark() function.

1 <html>
2 <head>
3 <meta name="author" content="Christian Schoenebeck">
4 <title>set_event_mark() function</title>
5 <meta name="description" content="Adds an event to an event group.">
6 </head>
7 <body>
8 <h1>set_event_mark()</h1>
9 <p>
10 Adds the supplied event to the requested event group. This can be used to
11 i.e. conveniently manipulate a set of notes simultaniously with one single call
12 using the helper function <code lang="nksp">by_marks()</code>. The latter acts as placeholder
13 for all event IDs of that group.
14 </p>
15
16 <h3>Function Prototype</h3>
17 <p/>
18 <code>
19 set_event_mark(??event-id??, ??group-id??)
20 </code>
21
22 <h3>Arguments</h3>
23 <table>
24 <tr>
25 <th>Argument Name</th> <th>Data Type</th> <th>Description</th>
26 </tr>
27 <tr>
28 <td><code>??event-id??</code></td>
29 <td>Event ID Number</td>
30 <td>Event to be assigned to the group.<br>
31 [required]</td>
32 </tr>
33 <tr>
34 <td><code>??group-id??</code></td>
35 <td>Event Group ID Number</td>
36 <td>Event group where the event shall be added to. You should pass one
37 of the built-in constant variables <code>$MARK_1</code> to
38 <code>$MARK_28</code> for this argument to select one of the
39 28 available groups.<br>
40 [required]</td>
41 </tr>
42 </table>
43
44 <h3>Return Value</h3>
45 <p>None.</p>
46
47 <h3>Examples</h3>
48 <p>
49 The following example implements two "exclusive" keyboard zones with a
50 split point at key <code>36</code>. The script enforces that only
51 notes of either one of the two keyboard zones may play at the same time.
52 So for example if you start playing notes left of the split point, all
53 sounds play as usual. Now however, as soon as you hit a note on the
54 right side of the split point, it will cause all notes left of the split
55 point to be released immediately.
56 </p>
57 <code>
58 on note
59 if ($EVENT_NOTE < 36)
60 set_event_mark($EVENT_ID, $MARK_1)
61 note_off(by_marks($MARK_2))
62 else
63 set_event_mark($EVENT_ID, $MARK_2)
64 note_off(by_marks($MARK_1))
65 end if
66 end on
67 </code>
68
69 </body>
70 </html>

  ViewVC Help
Powered by ViewVC