-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement ambisonic B-format audio #203
Comments
Implementation of the actual mixing is in 0.2.1-29. There's no config options yet - it's just using a setup I like to use with headphones. |
looks good, will sanic plugin ever be released? |
Get on IRC, I'll flick you a link. |
<~Kasen> mari_kiri, what's the state of this? does it just need to be made configurable? #203 |
Pretty much. If you want a proper matrix like this has then feel free, otherwise just do a two-variable "stereo separation fraction" thing and leave it at that. The latter case will make a more-than-two-speaker setup kinda suck, but heck, we don't even delay the channels by distance properly, and apparently that's one of the fundamental tenets of 3d sound. But what we have now sounds better than what we had before, so eh. If you're wondering, sound travels at ~343m/s through 20'C dry air, and at a 44100Hz sampling rate this basically means that every ~7.778mm a sound is from your ears you delay the sound by one sample. |
Because it's fucking amazing. Even on craptop speakers while using a simplistic psychoacoustic model. Experiments with a modified version of f3m (my s3m playroutine) confirm this.
Also because the current audio model is kinda shit.
May possibly chuck in a special mixer for sackit, too.
Ultimately this would require me to also add support for an arbitrary number of channels as well as some way to position each channel in 3D space. (I use 3W +/- 2Y + X for headphones but I may need to tweak this - may even drop in a Z component.)
Proposed API:
Note, Y is left minus right, and X is front minus back. (In other words they were still on drugs in the 70s.)
clsave/config.json will need a "channels" option.
Here's how you'd use a headphone setup:
Of course we'll just use this for the engine default for 2-channel audio, unless of course we really care that much about compatibility with the old audio engine that we need to use [W+Y, W-Y]. (I personally don't.)
Ambisonic profiles should be settable in clsave/pub/user.json, although I think we should stick a few profiles in clsave/pub/ambisonics.json.
That is, clsave/pub/user.json would have "ambisonic_speaker_profile" (default to "headphones"), and then ambisonics.json would have something like:
The text was updated successfully, but these errors were encountered: