Group Admins

  • Profile picture of warusfel
  • Profile picture of T.

Spat

Public Group active 20 hours, 22 minutes ago

User group for Spat, panoramix and ToscA

Ambisonic decoding

Author 5 Subscribed Users |
Benjamin Levy
Benjamin Levy

Hi,

I would like to use Spat to play files recorded with soundfield microphone (bformat, 4 tracks) and decode them as an xy pair. Then I’d like to control the position and orientation of the xy pair. Although the doc and example patches are pretty clear about ambisonic encoding and combined encoding/decoding (spat.tut.04-Ambisonic), I’m not 100% sure about decoding only and could not find anything in the discussion about that.

What I would do is something like this patch:

— Pasted Max Patch, click to expand. —

Is that correct for what I intend?
What is the effect of the 8 channels between spat.decoder~ and spat.pan~? Is the number of channels important in-between them?
Is there a shortcut to do that with only 1 spat.spat~ object?
How do I control the xy pair? Maybe with the listener message to the spat.span~?

Thank you very much for any info!
Cheers,

Benjamin

October 14, 2015 at 11:20 #15149
Profile photo of T.
T.

Hi Benjamin,

Sorry for the late reply.

I’m not so sure to understand your intention here.
However here is a patch that could hopefully help you.

— Pasted Max Patch, click to expand. —
October 16, 2015 at 09:26 #15241
Profile photo of raulquilez
raulquilez

Hello T
Two questions in the same direction.
This is the best way to convert from B-format to binaural too, That is right?
The configuration 1 has a better binaural restitution that the configuration 2, That’s right? (See the patch)
When we move the sources via transform, the config 1 sounds with more coherence, but the two configurations are really very different on the high frequency. (I tested with street noise)

Thank you very much
Best
Raul

November 7, 2015 at 13:47 #15865
Profile photo of raulquilez
raulquilez

Sorry this is the good Patch

November 7, 2015 at 19:24 #15869
Profile photo of T.
T.

Hi Raul,

You’re absolutely right.
At the moment there is no direct ambisonic-to-binaural transcoding available.
The solution is then to 1) decode the ambisonic signals and 2) virtualize the decoded loudspeakers in binaural.
Exactly as you did in your patch.

For the virtual speakers, you should use a “regular distribution” in 3D, as dense as possible.
Your “configuration 1″ should be better than #2.
(of course more virtual speakers implies much more cpu…)

When it comes to moving the sound scene, it would be much more efficient to actually apply the rotation on the encoded ambisonic signals (using e.g. spat.hoatransform~).

Best,
T.

November 12, 2015 at 18:49 #15955
Profile photo of raulquilez
raulquilez

Thank you very much T for your answer.

I’m not very sure where insert <spat.hoatransform~> (see patch)

Thanks again
Best
Raúl

B-format with spat.hoatransform~ to binaural.maxpat

November 13, 2015 at 11:57 #15982
Profile photo of T.
T.

Yes, correct : [spat.hoatransform~] operates on Ambisonic-encoded signals i.e. it must be inserted (anywhere) before the [decoder~].

T.

November 13, 2015 at 12:04 #15987
Profile photo of raulquilez
raulquilez

Thanks so much

November 13, 2015 at 18:56 #16015
Profile photo of axeldrioli
axeldrioli

Hi T.

I have a question I am trying to decode various 3rd order ambi signals, channel order ACN, from example from BlueRipple’s O3A panner, or from Sound Particles (pic attached). From both of them I have the soundfield with a roll of 180 deg and yaw of -45. And I can’t figure out what I am doing wrong.

do you mind having a look at it please? I attached the max patch too. the spat.decoder by default should work in ACN right?

Cheers

Axel

Attachments:
  1. Screen-Shot-2017-04-18-at-14.22.36-2

    Screen-Shot-2017-04-18-at-14.22.36-2.png

  2. Screen-Shot-2017-04-18-at-14.22.36-2

    Screen-Shot-2017-04-18-at-14.22.36-2.png

April 18, 2017 at 14:24 #22131
Profile photo of axeldrioli
axeldrioli

Here is the patch

April 18, 2017 at 14:27 #22134
Profile photo of puchifilou
puchifilou

Hello Axel,

I might be able to answer your question.
With most applications on the market, the X axis points forward and the Y axis points to the left (in Spat, X points to the right and Y points forward). As there’s a high chance that sound particles uses this convention, you must apply a 90° yaw before decoding the Ambisonic signals.

I’ve updated your patch by adding a “spat.hoatransform~” before the “spat.decoder~” (the decoder doesn’t accept any Yaw/Pitch/Roll messages).
Hope this will fix your issue.

Best regards,
Philippe.

April 18, 2017 at 14:51 #22137
Profile photo of axeldrioli
axeldrioli

Hi Pgilippe

Thanks for your quick answer. Ah ok, I was trying to yaw it on the decoder itself.

It looks like 90 degrees is not enough. there is some sort of roll that is happening in here that doesn’t make sense to me. How could we check it? Do you have blueripple’s panner to try it out? I’m trying to understand if it’s my fault somehow, but I can’t figure it out. with the 90 deg if Iposition the source in front it stays there, but if I start panning it around in circle it goes to the opposite direction.

Let me know how we could check this thing out, it would be awesome.

Thanks for your help.

Axel

April 18, 2017 at 15:19 #22141
Profile photo of T.
T.

Hi,

Indeed, Philippe is absolutely right: most Ambisonic tools uses X axis pointing forward while in Spat, X points to the right and Y points forward.
Consequently you may have to apply a 90° (yaw) shift.

Otherwise, be very careful about the used normalization (SN3D / N3D). Make sure spat.decoder~ matches the normalization used in the BlueRippleSound encoder.

The loudspeaker layout is not super-well conditioned. The decoding sound field might therefore be (spatially) distorted.

I dont have the BlueRipplePanner, so hard to test.
Maybe you could encode a signal (say white noise) is each cardinal directions and try to listen to each one of these independently.
(and/or share the encoded files so that I can try it out).

Best,
T.

April 18, 2017 at 16:27 #22144
Profile photo of axeldrioli
axeldrioli

Hi T.

I tried at first with Sound Particles, and bounced down with SN3D normalisation. I can clearly hear that is going the other way around. I checked my speakers and they are fine.

This is the encoded file from Sound Particles.

https://we.tl/pLJdcVNxrj

ps: how would you improve this system? maybe moving the front and back speakers closer to create a spherical array more then elliptical?

Cheers

Axel

April 18, 2017 at 20:14 #22145
Profile photo of T.
T.

Just for debugging purpose, here is a patch with a “good” loudspeaker layout.

Also: it seems that Sound Particles supports various HOA sorting (i.e. ACN / SID / FuMa).
Make sure you use ACN sorting as this is the default in Spat.
If you’re using another kind of sorting you’d need to insert a spat.hoasorting~ prior to decoding.

— Pasted Max Patch, click to expand. —
April 19, 2017 at 09:26 #22151
Profile photo of axeldrioli
axeldrioli

Hi T

Thanks again.

I can’t figure out why but after that day everything worked fine again. The point is that I opened the same patch and it was fine. No clue.

Cheers for that anyway

Axel

April 25, 2017 at 23:00 #22198

You must be logged in to reply to this topic.

Log in now