{"json_modified": "2016-03-28T08:37:56.711361", "uuid": "78a154c3-32ec-4a15-aa88-025af6979f30", "title": "ScriptProcessorNode.onaudioprocess", "url": "/en-US/docs/Web/API/ScriptProcessorNode/onaudioprocess", "tags": ["API", "onaudioprocess", "Reference", "Property", "R\u00e9f\u00e9rence", "Web Audio API", "ScriptProcessorNode"], "translations": [], "modified": "2015-02-22T12:04:23", "label": "ScriptProcessorNode.onaudioprocess", "localization_tags": [], "locale": "en-US", "id": 127131, "last_edit": "2015-02-22T12:04:20", "summary": "The following example shows basic usage of a ScriptProcessorNode
to take a track loaded via AudioContext.decodeAudioData
, process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the AudioDestinationNode
. For each channel and each sample frame, the scriptNode.onaudioprocess
function takes the associated audioProcessingEvent
and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Syntax", "title": "Syntax"}, {"id": "Example", "title": "Example"}, {"id": "Specifications", "title": "Specifications"}, {"id": "Browser_compatibility", "title": "Browser compatibility"}, {"id": "See_also", "title": "See also"}], "slug": "Web/API/ScriptProcessorNode/onaudioprocess", "review_tags": ["technical"]}