This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| getting_started_vividshaper [2026/09/09 20:42] – [Filter functions] lars | getting_started_vividshaper [2026/09/09 21:00] (current) – [Filter functions] lars | ||
|---|---|---|---|
| Line 328: | Line 328: | ||
| </ | </ | ||
| - | Since this filter is applied | + | Since this filter is applied |
| + | The other method is to use the filter as an insert effect, processing the oscillator output continuously. In this case, the filter retains its state from one waveform cycle to the next. This is particularly important for resonance: instead of being baked into a single repeating waveform, the resonant response can build up and ring across successive cycles, producing a more dynamic filter response over time. | ||
| - | The first method is to apply the filter on the actual wave. | + | Say we want to apply the highpass-filter |
| + | <code Lua> | ||
| + | afilter[1] = filter3 | ||
| + | </ | ||
| + | You can even combine the two methods. Say you first filter the wave with a lowpass filter, then you apply the bandpass filter as an insert: | ||
| - | The lowpass/ | + | <code Lua> |
| + | filter1 = VSLowpass(cutoffFreq,resonance) | ||
| + | filter2 = VSBandpass(cutoffFreq, | ||
| + | wave[1] = VSBiquad(wave[1], | ||
| + | afilter[1] = filter2 | ||
| + | </ | ||
| + | |||
| + | You can even apply the same filter | ||
| <code Lua> | <code Lua> | ||
| - | wave[x] = VSBiquad(wave[x],biquadcoeff) | + | filter1 = VSLowpass(cutoffFreq, |
| + | wave[1] = VSBiquad(wave[1],filter1) | ||
| + | afilter[1] = filter1 | ||
| </ | </ | ||
| - | It can be quite difficult to calculate how these coefficients | + | Both the waveform and the insert filters VividSynths are biquad filters. A biquad filter consists of five different |
| + | |||
| + | In previous versions, you also needed to provide the current note to the filter, like this: | ||
| <code Lua> | <code Lua> | ||
| - | biquadcoeff | + | filter1 |
| - | biquadcoeff = VSBandpass(cutoffFreq, | + | |
| - | biquadcoeff = VSHighpass(cutoffFreq, | + | |
| </ | </ | ||
| - | A very important thing is that you need to provide each of these helper functions with the current note. If you play a note at a low frequency, you may actually play under the cutoffFreq so that no filter should be applied at all for a lowpass | + | From v2.0, you don't have to do that any longer, as notein is default. However, |
| + | |||
| + | |||
| + | <code Lua> | ||
| + | filter1 = VSLowpass(cutoffFreq, | ||
| + | </ | ||
| - | A full example comes here: | + | A full example comes here for how to apply the waveform filter: |
| <code Lua> | <code Lua> | ||
| -- Patch: Filter example | -- Patch: Filter example | ||
| wave[1] = VSSaw(1,0) | wave[1] = VSSaw(1,0) | ||
| - | vol[1] = VSADSRE(1, | + | vol[1] = VSADSRE(1, |
| - | biquadcoeff = VSLowpass(300, | + | biquadcoeff = VSLowpass(300, |
| wave[1] = VSBiquad(wave[1], | wave[1] = VSBiquad(wave[1], | ||
| </ | </ | ||