Skip to content

Commit 2227b40

Browse files
committed
rework filter fx to poly~ for clean bypass
1 parent bbd9382 commit 2227b40

7 files changed

Lines changed: 4966 additions & 3050 deletions

File tree

docs/04-fx.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,24 +72,37 @@ new sample hat_click time(1/2) fx(delay 3/16 7/16 0.5 0.7)
7272

7373
## filter
7474

75-
Add a filter to the sound. This can be a static filter or a modulated filter depending on the amount of arguments you provide. The filter-type can be a `low`, `high` or `band`-pass filter. The second argument is the cutoff frequency in Hz and the third argument is the resonance between `0` and `1`.
75+
Add a filter to the sound. This can be a static filter or a modulated filter depending on the amount of arguments you provide. The filter-type can be a `low`, `high` or `band`-pass filter. The second argument is the cutoff frequency in Hz and the third argument is the resonance between `0` and `1`. Passing a single argument only sets the cutoff, passing two arguments sets the cutoff and resonances. The filter then defaults to `lowpass`.
76+
77+
**arguments**
78+
- {Name} -> filter type, low, high, band (default = low)
79+
- {Number+} -> cutoff frequency in Hz (default = 1200)
80+
- {Float+} -> resonance between 0-1 (default = 0.45)
7681

7782
```
83+
fx(filter)
84+
fx(filter <cutoff>)
85+
fx(filter <cutoff> <resonance>)
7886
fx(filter <type> <cutoff> <resonance>)
7987
```
80-
example
88+
8189
```java
82-
new synth saw note(0 1) shape(-1) fx(filter low 200 0.6)
90+
new synth saw note(0 1) shape(-1) fx(filter low 800 0.6)
8391
```
8492

85-
Alternatively you can provide extra arguments to have the filter modulate between a low and high cutoff-frequency. In this case the arguments are as follows (in order): The filter-type `low | high | band`. The modulation speed in float/expression as musical time division where `0.25` or `1/4` = a quarter note. The high cutoff in Hz, the low cutoff in Hz the resonance between `0` and `1`. The modulation shape tilt between `0` and `1`, where 0 is ramp-down, 1 is ramp-up and 0.5 is triangle form. The exponential curve for the filter as floating point.
93+
You can provide extra arguments to have the filter modulate between a low and high cutoff-frequency. In this case the arguments are as follows (in order): The filter-type `low | high | band`. The modulation speed in float/expression as musical time division where `0.25` or `1/4` = a quarter note. The high cutoff in Hz, the low cutoff in Hz the resonance between `0` and `1`. The modulation shape tilt between `0` and `1`, where 0 is ramp-down, 1 is ramp-up and 0.5 is triangle form. The exponential curve for the filter as floating point.
94+
95+
**arguments**
96+
- {Name} -> filter type, low, high, band (default = low)
97+
- {Division} -> modulation ratio (default = 1/1)
98+
- {Number+} -> low modulation frequency in Hz (default = 200)
99+
- {Number+} -> high modulation frequency in Hz (default = 3000)
100+
- {Float+} -> resonance between 0-1 (default = 0.45)
101+
- {Float+} -> modulation slope 0-1 up, down, triangle) (default = 0.5)
102+
- {Float+} -> exponential scaling (default = 2)
86103

87-
```
88-
fx(filter <type> <modulation> <hi-cut> <lo-cut> <res> <shape-tilt> <exponent>)
89-
```
90-
example
91104
```java
92-
new synth saw note(0 0) shape(-1) fx(filter low 1/4 100 1500 0.5 0 0.2)
105+
new synth saw note(0 0) fx(filter low 1/4 100 3500 0.55 0 4)
93106
```
94107

95108
## freeze

0 commit comments

Comments
 (0)