scenevr / server

:heart_eyes: Create multiuser 3d environments using html-like tags and javascript
http://www.scenevr.com/
BSD 3-Clause "New" or "Revised" License
144 stars 19 forks source link

Please add sounds #52

Closed disasteradio closed 9 years ago

disasteradio commented 9 years ago

HEY THIS IS AWESOME, and if there was ability to stream mp3 & ogg then I'd love to build something in this! I've actually been looking for a way to do a 3d environment for a new record I'm working on.

bnolan commented 9 years ago

I've got some work kicking around for an audio element and can roll it out again! A few questions:

I'd love to work with you on a scene DR! Slowed down push up is awesome ;)

disasteradio commented 9 years ago

what I was imagining was "an album you could walk through", how that is expressed exactly depends on what works exactly. Would a sound within a null (ie invisible) bounding box be simple to implement? or I guess null objects you walk through as a trigger to make one tune take presidence over the rest.

I think in terms of triggering and sync, a global loop for all players would make the most sense, I mean if they are more-or-less hearing the same position the VR space kinda takes dominance. to enter and leave different zones at different points would make players come back.

bnolan commented 9 years ago

Yeah. The audio element is already a null object, you can't see it but it has a position, and the audio is attenuated based on your distance from it. I like the idea of syncing up the playback to all players, so you can experience a track together. I'll dig up the existing audio code and put up a demo. There is a control panel in SceneVR now, so you can turn the volume up / down, which is why I disabled the audio element originally.

bnolan commented 9 years ago

Fixed in 7076d95. Added sounds to queenie and snoo in the homeroom. Click them to play. Sounds are played by all players and in sync, but only if all players are present when the sound starts (if you join halfway through a track playing you won't be synced up).