diff --git a/packages/hydra/README.md b/packages/hydra/README.md index e36a421b..0b238692 100644 --- a/packages/hydra/README.md +++ b/packages/hydra/README.md @@ -12,12 +12,11 @@ await initHydra(); Then you can use hydra below! -### Enable audio capture -Use `{audio: true}` param to enable Hydra's audio capture: +### options -```js -await initHydra({audio: true}); -``` +You can also pass options to the `initHydra` function. These can be used to set [hydra options](https://github.com/hydra-synth/hydra-synth#api) + these strudel specific options: + +- `feedStrudel`: sends the strudel canvas to `s0`. The strudel canvas is used to draw `pianoroll`, `spiral`, `scope` etc.. ## Usage via npm diff --git a/website/src/pages/learn/hydra.mdx b/website/src/pages/learn/hydra.mdx index d5219e6f..f1ace48b 100644 --- a/website/src/pages/learn/hydra.mdx +++ b/website/src/pages/learn/hydra.mdx @@ -41,6 +41,8 @@ note("[a,c,e,,b4]/4").s("sawtooth").vib(2) `} /> +## H patterns + There is a special function `H` that allows you to use a pattern as an input to hydra: +## detectAudio + To use hydra audio capture, call `initHydra` with `{detectAudio:true}` configuration param: You might now be able to see this properly here: [open in REPL](/#YXdhaXQgaW5pdEh5ZHJhKCkKbGV0IHBhdHRlcm4gPSAiMyA0IDUgWzYgN10qMiIKc2hhcGUoSChwYXR0ZXJuKSkub3V0KG8wKQpuKHBhdHRlcm4pLnNjYWxlKCJBOm1pbm9yIikucGlhbm8oKS5yb29tKDEpIA%3D%3D) + +Similar to `detectAudio`, all the [available hydra options](https://github.com/hydra-synth/hydra-synth#api) can be passed to `initHydra`. + +## feedStrudel + +Using the `feedStrudel` option, you can transform strudel visualizations with hydra: + +")) + .diff(osc(1,0.5,5)) + .modulateScale(osc(2,-0.25,1)) + .out() +// +stack( + s("bd*2,[hh:0:<.5 1>]*4,~ rim").bank("RolandTR909").speed(.9), + note("[>>]*3").s("sawtooth") + .room(.75).sometimes(add(note(12))).clip(.3) + .lpa(.05).lpenv(-4).lpf(2000).lpq(8).ftype('24db') +).fft(4) + .scope({pos:0,smear:.95})`} +/>