This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
vividshaper_reference_manual [2025/01/09 21:27] – lars | vividshaper_reference_manual [2025/01/09 21:31] (current) – lars | ||
---|---|---|---|
Line 29: | Line 29: | ||
vol[1] = VSADSRE(1, | vol[1] = VSADSRE(1, | ||
active = vol[1] > 0.00001 | active = vol[1] > 0.00001 | ||
+ | pitchbend = pitchbend*2 | ||
</ | </ | ||
- | This example | + | This example |
This is not the playback frequency of the note (i.e. which note that is being played). The speed of the 128 samples is determined by note[1] for oscillator 1. We don't have to set note[1] explicitly, it is already set by the note you are playing on the keyboard. However, if we do wish to change it, for instance transposing one octave, we can do so by setting: **note[1] = notein+12**. Alternatively, | This is not the playback frequency of the note (i.e. which note that is being played). The speed of the 128 samples is determined by note[1] for oscillator 1. We don't have to set note[1] explicitly, it is already set by the note you are playing on the keyboard. However, if we do wish to change it, for instance transposing one octave, we can do so by setting: **note[1] = notein+12**. Alternatively, | ||
- | The pitch bend value will be added to the note value for each oscillator after the Lua code has finished. This value is stored in the variable pitchbend, which goes from -2 to +2 (i.e. 2 semi-notes). If note[1] == 40 for oscillator 1 and pitchbend == 0.53, the final note value used to play the note will be 43.53. If you want to turn off pitch bend, you can set pitchbend = 0 anywhere in your code. if you want to pitch bend from -4 to +4, you can just multiply it by 2 (pitchbend = pitchbend *2). You can also use the pitch bend value to modulate e.g. something else first, then set it to zero if you don't want it to also bend the notes. | + | The pitch bend value comes from your keyboard and will be added to the note value for each oscillator after the Lua code has finished. This value is stored in the variable pitchbend, which goes from -2 to +2 (i.e. 2 semi-notes). If note[1] == 40 for oscillator 1 and pitchbend == 0.53, the final note value used to play the note will be 43.53. If you want to turn off pitch bend, you can set pitchbend = 0 anywhere in your code. if you want to pitch bend from -4 to +4, you can just multiply it by 2 (pitchbend = pitchbend *2). This is done in the example above. You can also use the pitch bend value to modulate e.g. something else first, then set it to zero if you don't want it to also bend the notes. |
The volume will then be set to an exponential volume ADSR envelope, with attack=1 sec, decay=1 sec, sustain=0.8, | The volume will then be set to an exponential volume ADSR envelope, with attack=1 sec, decay=1 sec, sustain=0.8, | ||
Line 92: | Line 93: | ||
svol[x] | svol[x] | ||
- | -- Delay output information | + | -- Delay output information |
delay1[x] | delay1[x] | ||
| | ||
Line 152: | Line 153: | ||
wave[x] = VSRect(wave[x]) -- Input is a wave array | wave[x] = VSRect(wave[x]) -- Input is a wave array | ||
- | -- Helper functions for delays | + | -- Helper functions for delays |
VSPingPong(feedback, | VSPingPong(feedback, | ||
VSStereoDelay(feedback, | VSStereoDelay(feedback, |