Localization Problems
See original GitHub issueI’m using this setup to generate my ambisonics files, and pairing this with this viewer
Initially I thought things were working fine, but after playing around with the Ambix plugins within Reaper, and messing around with various locations on the sphere, I noticed some problems.
The case where it works as expected:
-
Position the mono source on either the left or right hand side of the sphere using the Ambix plugins in Reaper (exactly pointing to the middle of the left ear)
-
Render to .wav as specified in google tutorial
-
Load into the Photo-Sphere-Viewer
-
Rotates well and auralizes in the expected location to the left or right as specified.
The case where it fails:
-
Position the mono source on the exact front or back of the sphere using the Ambix plugins in Reaper
-
Render to .wav as specified in google tutorial
-
Load into the Photo-Sphere-Viewer
-
Does not rotate or spatalize at all
The rotation and spatalization within Reaper is working fine so I know its not that setup. Also if I import my exported Ambix file back into Reaper, I can control the yaw just fine, so it doesn’t seem to be a problem with how I’m rendering the Ambix file either.
Here is my omnitone init code:
/**** Omnitone Code ****/
// Set up an audio element to feed the ambisonic source audio feed.
var audioElement = document.createElement('audio');
audioElement.src = 'audio/AmbisonicOcean.wav';
// Create AudioContext, MediaElementSourceNode and FOARenderer.
var audioContext = new AudioContext();
var audioElementSource =
audioContext.createMediaElementSource(audioElement);
var foaRenderer = Omnitone.createFOARenderer(audioContext, {
HRIRUrl: 'HRTFs/sh_hrir_o_1.wav'
});
// Make connection and start play.
foaRenderer.initialize().then(function () {
audioElementSource.connect(foaRenderer.input);
foaRenderer.output.connect(audioContext.destination);
audioElement.play();
});
viewer.on('ready', function() {
var camera = viewer.camera;
// Rotate the sound field by passing Three.js camera object. (4x4 matrix)
foaRenderer.setRotationMatrixFromCamera(camera.matrix);
// foaDecoder.setRotationMatrixFromCamera(camera.matrix);
});
viewer.on('render', function() {
foaRenderer.setRotationMatrixFromCamera(viewer.camera.matrix)
});
Any thoughts on what is going wrong? As it stands, I can’t spatalize anything directly in front or behind the viewer.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (7 by maintainers)
@topherbuckley, yes, that’s what I mean - there should be no binaural plugin enabled during export, so it looks correct. I’ve also had a quick look at your WAV renders - they look OK. No signal in certain channels is expected when you pan your source so that it coincides with the directions of Cartesian axes.
However, when you say that your source is in the front, it is in fact on top of the listener. (+90 degrees elevation in Ambisonic convention is the top direction). That is why, if you have your sound source rendered like that and you are applying, rotation around the upward-facing axis (yaw), there should be no change in the binaural output. Could that be the case? The easiest way to check that would be to apply roll instead and listen if the source starts to move from one side to the other. Also, try to re-render your files setting the front position as 0az, 0el, and see if it works.
NP! Glad that solved it!