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

Annotation of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_change_vol_function.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2933 - (hide annotations) (download) (as text)
Sat Jul 9 15:58:09 2016 UTC (7 years, 8 months ago) by schoenebeck
File MIME type: text/html
File size: 3505 byte(s)
- Minor correction in newly added function references.

1 schoenebeck 2932 <html>
2     <head>
3     <meta name="author" content="Christian Schoenebeck">
4     <title>change_vol() function</title>
5     <meta name="description" content="Modifies the volume of voices of a particular note.">
6     </head>
7     <body>
8     <h1>change_vol()</h1>
9     <p>
10     This function can be used to modify the volume of active voices during
11     their entire life time. So you may for example implement very sophisticated
12     volume 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     volume of all active voices associated with the requested note. So if you
15     are using a layered instrument patch, then it will change the volume of
16     all layers.
17     </p>
18     <p>
19 schoenebeck 2933 The volume changes set by calling this function are always applied relatively to
20 schoenebeck 2932 the volume calculated by the synthesis model and sampler format. That means
21     the various sources of volume factors like MIDI CC #7, Amplitute Envelopes,
22     Amplitutude LFOs and other volume factors that may be defined by the
23     instrument patch, are always processed and calculated for the voices first,
24     and the final volume 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 volume 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 volume of those release trigger voices
34     will not be affected by this function at all. So if you need to control the
35     volume 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_vol(??note??, ??volume??, [??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</td>
54     <td>All voices of this note will be modified.<br>
55     [required]</td>
56     </tr>
57     <tr>
58     <td><code>??volume??</code></td>
59     <td>Integer Number</td>
60     <td>Volume change in Milli dB.
61     A positive value increases the volume,
62     a negative value decreases the volume.</td>
63     </tr>
64     <tr>
65     <td><code>??relative??</code></td>
66     <td>Integer Number</td>
67     <td>Whether change_vol() calls should be relative to each other.<br>
68     0: A call to <code>change_vol()</code> upon the same note will
69     replace the volume change value set by previous
70     <code>change_vol()</code> calls upon the same note.<br>
71     1: Successive calls to <code>change_vol()</code> upon the same
72     note will be relatively applied against each other.<br>
73     [optional, default: 0]</td>
74     </tr>
75     </table>
76    
77     <h3>Return Value</h3>
78     <p>None.</p>
79    
80     <h3>Examples</h3>
81     <p>None yet.<p>
82    
83     <h3>Availabilty</h3>
84     <p>Since LinuxSampler 2.0.0.svn11.<p>
85    
86     </body>
87     </html>

  ViewVC Help
Powered by ViewVC