doc: web audio effects

This commit is contained in:
Felix Roos
2022-09-17 15:18:57 +02:00
parent 71ca46b21b
commit cafcead62e
2 changed files with 51 additions and 16 deletions
+35
View File
@@ -241,6 +241,15 @@ The power of patterns allows us to sequence any _param_ independently:
Now we not only pattern the notes, but the sound as well!
`sawtooth` `square` and `triangle` are the basic waveforms available in `s`.
### Envelope
You can control the envelope of a synth using the `attack`, `decay`, `sustain` and `release` functions:
<MiniRepl
tune={`note("c2 <eb2 <g2 g1>>").s('sawtooth')
.attack(.1).decay(.1).sustain(.2).release(.1).out()`}
/>
## Samples
Besides Synths, `s` can also play back samples:
@@ -356,6 +365,32 @@ note("g2!2 <bb2 c3>!2, <c4@3 [<eb4 bb3> g4 f4]>")
The sampler will always pick the closest matching sample for the current note!
## Effects
Wether you're using a synth or a sample, you can apply these effects:
{{ 'cutoff' | jsdoc }}
{{ 'resonance' | jsdoc }}
{{ 'hcutoff' | jsdoc }}
{{ 'hresonance' | jsdoc }}
{{ 'bandf' | jsdoc }}
{{ 'bandq' | jsdoc }}
{{ 'vowel' | jsdoc }}
{{ 'pan' | jsdoc }}
{{ 'coarse' | jsdoc }}
{{ 'shape' | jsdoc }}
{{ 'crush' | jsdoc }}
<br />
# Core API