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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2944 - (show annotations) (download) (as text)
Wed Jul 13 16:52:58 2016 UTC (7 years, 8 months ago) by schoenebeck
File MIME type: text/html
File size: 3470 byte(s)
* NKSP: Added built-in script variables $KSP_TIMER, $NKSP_PERF_TIMER,
  $NKSP_REAL_TIMER and $ENGINE_UPTIME.

1 <html>
2 <head>
3 <meta name="author" content="Christian Schoenebeck">
4 <title>change_pan() function</title>
5 <meta name="description" content="Modifies the panning (stereo balance) of voices of a particular note.">
6 </head>
7 <body>
8 <h1>change_pan()</h1>
9 <p>
10 This function can be used to modify the stereo panorama (stereo balance) of active voices during
11 their entire life time. So you may for example implement
12 pan envelopes by script by using this function. You need to pass the
13 note ID of the voices you want to alter. This function will change the
14 panning of all active voices associated with the requested note. So if you
15 are using a layered instrument patch, then it will change the panning of
16 all layers.
17 </p>
18 <p>
19 The panning changes set by calling this function are always applied relatively to
20 the panning/balance calculated by the synthesis model and sampler format. That means
21 the various sources of panning/balance factors like MIDI CC #10 and other panning
22 factors that may be defined by the instrument patch, are always processed and
23 calculated for the voices first,
24 and the final stereo balance applied is always a relative combination of all those
25 factors and the one set with this function call. This does also not change
26 when you pass <code>1</code> for argument <code>??relative??</code>.
27 Or in other words: you cannot replace the panning/balance set by other synthesis
28 sources with this function.
29 </p>
30
31 <note class="important">
32 Release Trigger Samples: In case the affected voices cause release trigger
33 samples to be spawned later on, the panning of those release trigger voices
34 will not be affected by this function at all. So if you need to control the
35 panning of release trigger samples by script, then you might rather also trigger
36 those release trigger samples by script with <code lang="nksp">play_note()</code>
37 instead of using the sampler format's internal support for release trigger samples.
38 </note>
39
40 <h3>Function Prototype</h3>
41 <p/>
42 <code lang="nksp">
43 change_pan(??note??, ??pan??, [??relative??])
44 </code>
45
46 <h3>Arguments</h3>
47 <table>
48 <tr>
49 <th>Argument Name</th> <th>Data Type</th> <th>Description</th>
50 </tr>
51 <tr>
52 <td><code>??note??</code></td>
53 <td>Note ID Number or Note ID Array</td>
54 <td>All voices of this note will be modified.<br>
55 [required]</td>
56 </tr>
57 <tr>
58 <td><code>??pan??</code></td>
59 <td>Integer Number</td>
60 <td>Value between -1000 (most left) and +1000 (most right).</td>
61 </tr>
62 <tr>
63 <td><code>??relative??</code></td>
64 <td>Integer Number</td>
65 <td>Whether change_pan() calls should be relative to each other.<br>
66 0: A call to <code>change_pan()</code> upon the same note will
67 replace the panning change value set by previous
68 <code>change_pan()</code> calls upon the same note.<br>
69 1: Successive calls to <code>change_pan()</code> upon the same
70 note will be relatively applied against each other.<br>
71 [optional, default: 0]</td>
72 </tr>
73 </table>
74
75 <h3>Return Value</h3>
76 <p>None.</p>
77
78 <h3>Examples</h3>
79 <p>None yet.<p>
80
81 <h3>Availabilty</h3>
82 <p>Since LinuxSampler 2.0.0.svn11.<p>
83
84 </body>
85 </html>

  ViewVC Help
Powered by ViewVC