mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-23 11:38:37 +00:00
add readme
This commit is contained in:
parent
325eec2c6f
commit
d718eb0be2
25
packages/webaudio/README.md
Normal file
25
packages/webaudio/README.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# @strudel.cycles/xen
|
||||||
|
|
||||||
|
This package adds xenharmonic / microtonal functions to strudel Patterns.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm i @strudel.cycles/webaudio --save
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { Scheduler, getAudioContext } from '@strudel.cycles/webaudio';
|
||||||
|
|
||||||
|
const scheduler = new Scheduler({
|
||||||
|
audioContext: getAudioContext(),
|
||||||
|
interval: 0.1,
|
||||||
|
onEvent: (e) => e.context?.createAudioNode?.(e),
|
||||||
|
});
|
||||||
|
const pattern = sequence([55, 99], 110).osc('sawtooth').out()
|
||||||
|
scheduler.setPattern(pattern);
|
||||||
|
scheduler.start()
|
||||||
|
//scheduler.stop()
|
||||||
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user