< Back to IRCAM Forum

Spat5.binaural~ errors

Hi,

I’m a new user of max (9) and spat5.
I want to build a VR project with unity and osc communications with max. I send from unity /sources/xyz positions and /listener/xyz and /listener/ypr to spat5.viewer.
Then a “spat5.absrel” before spat5.oper for relative coordinates (as mentioned from the tuto with headtracker).

All works perfectly but a have some errors in the console of max.

I put a “spat5.osc.print” after spat5.oper, so I don’t know if it comes from the viewer or oper (I can check).

On the screenshot, one can see that the viewer or oper send osc commands " /direct/params, /early/params/ etc…" that cause errors.
How can I avoid them ?

NB: in the screenshot this is spat5.osc.pan~ with “/panning/type binaural” because I test the both. Sames errors with spat5.binaural~

Thank you for the assistance.
Best,
Christophe

Hello Christophe,

The spat5.oper GUI is meant to control the spat5.spat~ object. These objects include reverb + panning.

On the other hand the spat5.pan~ object, as the name suggests, supports only panning (without artificial reverb). It is typically controlled via the spat5.viewer GUI.

The error messages that you see indicate that spat5.pan~ receives messages (from spat5.oper) that it cannot interpret.

It’s hard to tell more without inspecting your patch. But in a nutshell, you need to choose either spat5.oper+spat5.spat~ OR spat5.viewer+spat5.pan~.

(Finally: spat5.binaural~ is really just the same as spat5.pan~ with “/panning/type binaural”. Therefore it does not include/support reverb)

Hope this helps,
T.

Hello Thibaut,

Merci ! I understand. I started from the spat5.tuto-binaural-1 and I missed that the binauralization was made with spat5.spat~. I put a spat5.binaural~ instead.

spat5.binaural~ considers the listener at the center of the origine or not ?
Or I have to make a spat5.absrel before (because the listener move) ?

Many thanks for the spat development.
Christophe

It is OK to move/rotate the listener when using spat5.binaural~. That should work.

Best,
T.

Hi,

I’m sorry to bother you Thibaut…
I have a warning, panner does not support /listener/orientation send by the viewer to binaural~.

It’s a warning, in the viewer, the head rotate perfectly. In writing this message, I find the triangle to avoid warning in the max console and print only the errors.

It send a quaternion orientation. But is it normal that spat5.binaural~ doesn’t accept quaternion orientation ? I thougth it accepts both euler angles or quaternion orientation.

Best,
Christophe

Hello Christophe,
No worries, we’re here to help. (and your trouble probably reveals that the documentation is not detailed enough)
Yes, spat5.binaural~ is supposed to accept both quaternion and Euler angles.
Can you please send your patcher (at least the relevant part of it) so that we can inspect more precisely what your problem is ?

Best,
T.

of course, but there are on the top osc communications with unity…

First_patch.maxpat (136.5 KB)

thanks,
Christophe

Hello,

I think it is because I send /aed in binaural~ for the sources and it wants just azimuth/elevation or yaw/pitch/roll. The distance is not taking account in binaural~.
I think i must use the spat~ (after oper and with /panning/type binaural) to take account the distance of the sources. I will try.

Thanks,
Christophe

Yes, it’s correct with viewer → oper → spat~ , no more warnings.

Have a nice week-end.
Bye

Hum.
I dont see any obvious error in your patch. That looks correct.
Can you explain in more details which error/warning messages you observe ? In which conditions ?

Also : yes, it is true that spat5.binaural~ does not take the source distance into account. Only the source direction (azimuth/elevation) is rendered. However, you can send “aed” or “xyz” messages. No problem; the object will just “ignore” the distance information.

Cheers,
T.

On my patch, on the top/left, press 1 to “start”.
In the console it appears:

max_console_warnings

the so-called warnings…

Christophe

Ah, I don’t know which patch I give it to you.

When I relie the viewer directly to binaural, no warning.

But, If between viewer and binaural there is a spat5.abs2rel object, then there are warnings.
This is abs2rel which send an orientation (I place a osc.print after the abs2rel):
max_console_warnings_with abs2rel

I’m sorry…
Christophe

OK, I see now.
spat5.binaural~ supports listener orientation.
However it does not support source’s orientation. (you’d need a reverb engine to simulate source orientation).
The warnings in your case refer to source orientation. (admittedly it was not obvious at all)

One simple workaround is to add a [spat5.osc.ignore /source/*/orientation] before spat5.binaural~.
This will filter out the undesired messages.

Hope this helps,
T.