Felix Roos c1ce72469c webaudio optimizations
- samples with obejct format for pitch declaration
- support note to repitch samples
- support choke to fit samples to hap duration
- support "legacy" context.velocity in .out
- support ":" inside s or note to set n
- fix sample fadeout for soundfonts and choke
- move gain before filters
2022-06-27 00:01:28 +02:00
..
2022-05-17 21:38:47 +02:00
2022-06-18 13:11:25 +02:00
2022-06-22 13:35:13 +01:00
2022-06-22 13:35:13 +01:00
2022-04-16 15:49:40 +02:00
2022-06-27 00:01:28 +02:00
2022-06-27 00:01:28 +02:00

@strudel.cycles/webaudio

This package contains a scheduler + a clockworker and synths based on the Web Audio API. It's an alternative to @strudel.cycles/tone, with better performance, but less features.

Install

npm i @strudel.cycles/webaudio --save

Example

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()

A more sophisticated example can be found in examples/repl.html. You can run it by opening the html file with your browser, or by clicking this link