ahdinosaur / read-audio

:microphone: Read raw audio input as a stream of ndsamples
http://livejs.github.io/read-audio/
10 stars 2 forks source link

support the browser #2

Closed ahdinosaur closed 9 years ago

ahdinosaur commented 9 years ago

can i haz review @mmckegg :cat2:

ahdinosaur commented 9 years ago

random thoughts: i'm thinking this module should provide a readable stream of native audio, either using node or browserify, into a common ndarray format that we can build modules against. so far this only supports the microphone, but as sox supports input files and stdin streams, this module should also interface with the equivalent with web audio.

mmckegg commented 9 years ago

I see you are using microphone-stream

Internally that is just using Web Audio to get the mic stream and then connecting it to a ScriptProcessorNode to extract the buffers.

I think you should just embed the code directly and bypass that module. It's only making things more complicated.

mmckegg commented 9 years ago

At https://github.com/saebekassebil/microphone-stream/blob/master/index.js#L35, audioInput could be any AudioNode.

ahdinosaur commented 9 years ago

sweet, thanks for the help.

ahdinosaur commented 9 years ago

merging, i'll do those updates as separate pushes.

ahdinosaur commented 9 years ago

update based on your suggestions

mmckegg commented 9 years ago

:+1: