josephburnett / hive-jam

A loop-oriented, multi-player framework for making music with Sonic Pi.
MIT License
7 stars 0 forks source link

Stream server audio to web client #27

Closed josephburnett closed 8 years ago

josephburnett commented 8 years ago

If the audio from the server could be streamed to the client browser then the entire server could be remote. This opens up geographically separated jam sessions and easier setup (e.g. spinning up a docker container).

josephburnett commented 8 years ago

BinaryJS looks like a good candidate for getting bytes from node.js to the browser.

Cached website: http://webcache.googleusercontent.com/search?q=cache:b1kW7ZmikqIJ:binaryjs.com/%3Futm_medium%3Dreferral%26utm_source%3Dpulsenews+&cd=1&hl=en&ct=clnk&gl=us

josephburnett commented 8 years ago

http://stackoverflow.com/questions/20850396/stream-recorded-audio-from-browser-to-server/20850467#20850467

josephburnett commented 8 years ago

How to get the bytes from the browser to the audio card: https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API

josephburnett commented 8 years ago

How to get the audio from jack to bytes in node.js: https://github.com/unclechu/node-jack-connector or https://www.npmjs.com/package/simplejack

josephburnett commented 8 years ago

This would amount to running Sonic Pi headless in a container, which doesn't need to be coupled with Sonic Jam. See https://github.com/xavriley/sonic-pi-docker for prior art running SP in Docker.

josephburnett commented 8 years ago

Another possible architecture:

SonicPi => Jack => DarkIce => IceCast => ?

josephburnett commented 8 years ago

@5dac6b71ea2602f9c47bfd5a8a8296f3d7ba11d8 @902b429ce65480344d0cce71a5d4bbc0479fa5b5