question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Localization Problems

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mgorzelcommented, Jun 27, 2017

@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.

0reactions
mgorzelcommented, Jun 27, 2017

NP! Glad that solved it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 Localization Problems and How to Solve Them (2022)
Localization Problem 1: Not knowing how to target market awareness · Localization Problem 2: Handling cultural barriers and miscommunication · Localization ...
Read more >
The Biggest Challenges of Localization | Smartling
Frequent Challenges in Localization · 1. Communication 🗣️ · 2. Cultural Nuance · 3. Translation Errors.
Read more >
The 6 Biggest Challenges of Localization - Transifex
The 6 Biggest Challenges of Localization · Not knowing where to start · Lacking the necessary resources · Still relying on manual processes ......
Read more >
Top 5 Localization Challenges (inc. zombies?)
1. Slow time to market · 2. Process is too manual · 3. Impact is difficult to measure · 4. Process takes up...
Read more >
10 Biggest Website Localization Problems and How to Avoid ...
10 Biggest Website Localization Problems and How to Avoid Them · 1. Translation quality · 2. High cost · 3. Difficult updating and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found