React-360: Web Audio Pure Data component

Created on 29 Dec 2016  路  3Comments  路  Source: facebookarchive/react-360

Description

Feature Request

Expected behavior

An Audio component is conspicuously missing. I'm sure there are plans for audio playback and that you know Three.js has spatialization built in... What I would love to see in addition is sound synthesized on the fly. I think dynamically generated sound is crucial to VR interaction.

Solution

Here's an example using a-frame and a web-audio port of the popular signal processing language Pure Data, WebPd: (you might want to lower your volume first) https://meta-meta.github.io/aframe-puredata-component/basic/ WASD to move, mouse to pan

WebPd is of course just 1 possible target. The real solution would be to offer a spatialized Web Audio component that exposes an API for plugging in any Web Audio node.

Additional Information

https://github.com/meta-meta/aframe-puredata-component
https://github.com/sebpiq/WebPd
https://puredata.info/
and here is the a-frame sound component https://github.com/aframevr/aframe/blob/master/src/components/sound.js

Most helpful comment

Thanks for the additional information. it's certainly on the list. More will follow.

All 3 comments

Thanks for the additional information. it's certainly on the list. More will follow.

Any updates on the Audio Module? I'm having this issue Uncaught TypeError: Failed to set the 'buffer' property on 'AudioBufferSourceNode': The provided value is not of type 'AudioBuffer'. whenever i try to use the module. So far i'v been trying with this:

const AudioModule = NativeModules.AudioModule;
AudioModule.addHandle('sprite', {});
AudioModule.setUrl('sprite', "../static_assets/sound/sprite.mp3");
AudioModule.load('sprite');
AudioModule.play('sprite');

Our next update will have basic 2D sounds, positional audio is coming soon!

just FYI, I notice you are using mp3 above, this will work in most browsers but not on Carmel which is based on Chromium which does not have the codex for mp3 so I recommend WAV format. https://www.chromium.org/audio-video

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lazerwalker picture lazerwalker  路  3Comments

muhammetdemirci picture muhammetdemirci  路  3Comments

borisyankov picture borisyankov  路  4Comments

copypasteearth picture copypasteearth  路  3Comments

nikgraf picture nikgraf  路  3Comments