granular
React granular synthesis engine
example
https://ruebel.github.io/granular/
installation
npm install granular
usage
; Component state = buffer: null context: null ; { const context = ; this; } { return <Granular // Audio File Buffer buffer=thisstatebuffer // Audio Context context=thisstatecontext // (Optional) if you want to output to a Gain node // rather than to the AudioContext output=null // Output gain amount (0 - 1) gain=06 // Grain attack (ms) attack=20 // Grain sustain (ms) sustain=100 // Grain release (ms) release=20 // Grain density (grains / sec) density=01 // Pan spread amount (0 - 1) pan=1 // Grain playback rate playbackRate=1 // Grain start position in file(0 - 1) position=05 // Random +/- offset that will be applied to position spread=02 // On (true) - Off (false) run=false /> ; } ;
license
MIT © Randy Uebel