mention crackle in the documentation

This commit is contained in:
2024-01-16 22:49:57 +01:00
parent 835a30eafb
commit b4f2ff0fd9

View File

@ -25,11 +25,13 @@ Note that you can also use noise if you do not want to use a periodic oscillator
${makeExample( ${makeExample(
"Listening to the different types of noise", "Listening to the different types of noise",
` `
beat(.5) && snd(['brown', 'pink', 'white'].beat()).adsr(0,.1,0,0).out() beat(.5) && snd(['brown', 'pink', 'white', 'crackle'].beat()).adsr(0,.1,0,0).out()
`, `,
true, true,
)} )}
The <ic>crackle</ic> type can be controlled using the <ic>density</ic> parameter.
Two functions are primarily used to control the frequency of the synthesizer: Two functions are primarily used to control the frequency of the synthesizer:
- <ic>freq(hz: number)</ic>: sets the frequency of the oscillator. - <ic>freq(hz: number)</ic>: sets the frequency of the oscillator.
- <ic>note(note: number|string)</ic>: sets the MIDI note of the oscillator (MIDI note converted to hertz). - <ic>note(note: number|string)</ic>: sets the MIDI note of the oscillator (MIDI note converted to hertz).