jevstrudel.git / packages / hydra / README.md
1# @strudel/hydra
2
3This package integrates [hydra-synth](https://www.npmjs.com/package/hydra-synth) into strudel.
4
5## Usage in Strudel
6
7This package is imported into strudel by default. To activate Hydra, place this code at the top of your code:
8
9```js
10await initHydra();
11```
12
13Then you can use hydra below!
14
15### options
16
17You 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:
18
19- `feedStrudel`: sends the strudel canvas to `s0`. The strudel canvas is used to draw `pianoroll`, `spiral`, `scope` etc..
20
21## Usage via npm
22
23```sh
24npm i @strudel/hydra
25```
26
27Then add the import to your evalScope:
28
29```js
30import { evalScope } from '@strudel/core';
31
32evalScope(
33  import('@strudel/hydra')
34)
35```