Spat: WFS array setup and OSC basic setup?


#1

Hi,

we want to use Spat for our current VR project where we compare different 3d spatialization algorithms. I’m a Max noob, but very experienced with NI Reaktor and signal processing. I had a look at the docs and at the tutorials but couldn’t figure out the following things:

  1. How can I set up a circular speaker array for WFS?
  2. How can I define/change/read the port of the OSC messaging system?
  3. What is the difference between the spat5.wfs and the spat5.wfs~ module?
  4. What are the “WFS Filters”, “WFS Directivity” and “WFS Files” sections in the spat5.wfs module for?
  5. What is an SDIF file?

#2

Hi,

  1. You can’t, unfortunately: wfs (in spat) is currently restricted to linear uniform arrays.
  2. Typically you use the updsend or udpreceive object to make Max communicate with other OSC applications. See the help patchers for these objects.
  3. spat5.wfs~ receives audio signals and applies wavefield synthesis, delivering speaker feed signals.
    spat5.wfs on the other hand computes the gains/delays that should be used to render wfs. It’s up to you to use this information (or mess with it) and take care of the signal processing.
  4. Given a loudspeaker, we pre-compute a number of things (using spat5.wfs.config) so that the realtime processing is more efficient (using lookup tables). “WFS filters” contains the pre-computed speaker delays/gains. “WFS directivity” contains filters for simulating directivity of sound sources; this is experimental and mostly for Ircam internal use only. A so called “wfs file” is a file containing either “wfs filters” or “wfs directivity” data.
  5. It’s a generic file format that we use for storing the pre-computed data. (see https://www.ircam.fr/projects/detail/format-sdif/). The format is open/free, so technically you could generate your own set of data.

Best,
T.


#3

Hi,

thanks for your answers!

We were unaware of the fact that SPAT WFS rendering only supports line arrays, as the product description mentions 3D with WFS.
However, we discussed that current limitation of Spat and are now trying to use some of our mobile WFS modules instead (that is 16 speakers per module in a line array with a distance of 2,5cm apart with a length of 88cm per module).
These wfs modules are a hybrid two-way-system with dedicated inputs for 16 tweeters and 4 low/mid-drivers per module. That means, we’d have to define two line arrays in spat: one for the tweeters and one for the low/mid-drivers. Is that possible with spat and what would the basic max setup look like?

A limiting factor (from Max?) is that you cannot have more than 64 output channels. Is that correct?

Best


#4

Hi,

There’s no built-in way to deal with the tweeters & low-mid drivers distinction. You’d have to define and process two independent line arrays (and patch it yourself).

In Max 7 (and prior), the DSP I/O was limited to 256 channels. With Max 8 (and its “MC” features) there is no such limitations; I think the upper limit (in Spat or in Max) is around 8192 channels.

Best
T.


#5

Hi,

thanks for the explanation. Concerning building the crossover filters for the two independent line arrays, which Max modules would you recommend for that task?

Using Spat on Max 8 gives you a maximum of 8192 output channels? That sounds very good. The product page of Spat says something different, though:
“Spat objects are highly configurable and most of them support up to 250 input/output channels.”
Does that limitation still apply?

Best


#6

Yes, you can use more than 250 channels. The actual upper limit might depend on which objects you use, but most can probably go up to 8192.
Trust your patchers, not the out-dated product page.

spat5.cross3~ is a good (phase-compensated) three-way crossover. Otherwise, maybe svf~ could do the job. Or design the crossover filters yourself, and use cascade~ or alike.

T.


#7

Hi,

we had a small intermezzo in our week schedules, but I’m now able to continue getting Spat to work.

I had a detailed look at the help patchers of spat5.wfs~ and spat5.wfs and tried to replicate the basic parts like speaker setup and output configuration in a new patch. It went successful but I was unable to get any audio beyound the playback module. To my surprise, the same issues exists with the help patchers. So have a look at the screenshot below, which is the spat5.wfs~ helper patch with a wavefile loaded and played back. Why is the audio not being processed in the spat5.wfs~ module and not output to the ASIO device?

Best

Spat5WfsBasicPlayback.png


#8

Hi,

It is difficult to say without further information, but my guess is that the wfs filters haven’t been loaded (therefore no audio).
You can check that by opening spat5.wfs~ status window.

Best,
T.


#9

Looks empty indeed. How can I create the WFS filters? If that is done using the spat5.wfs module, how do I use that to create the filters?

If there is any info in the manual (I didn’t find anything wfs related in the manual) or somewhere else on how to setup wfs in spat, I’ll happily rtfm.

Spat5WfsStatusWindow.png


#10

The WFS filters are created with spat5.wfs.config.
(Again, this is restricted to linear uniform arrays)
Most of the information is in the help patchers rather than in the PDF manual.
Some details can also be found in the reference pages ("?" tab in the help patchers)

T.


#11

Is numerical keyboard input supported instead of mouse-sweeping on the int fields of spat5.wfs.config?

Anyway, I created the filters and the audio seems to be processed by the spat5.wfs~ module.
However, I still don’t get any signal on the configured ASIO device. Is the spat5.cascade module supposed to do that or do I need to add another module to get the signals out of max to the ASIO device?

Spat5WfsNoOutput.png


#12

Yes you can use numerical keyboard input in the int fields.
And yes you need to add another module dac~ to output signals to the audio device.

T.


#13

Thanks, the dac~ module does the trick!

Does the spat5.wfs.config module support a spacing below 5cm? Our custom wfs speakers are spaced by 2,5cm and entering a value below 5cm just caps the field.

Something bizzare is going on in the spat5.wfs~ helper patch. The screenshot below shows the spat5.wfs.config helper patch I used to create the WFS filters. The spat5.viewer window next to the config window shows the correct speaker array. However the spat5.viewer next to the spat5.wfs window shows a circle array?

Spat5-LineVsCircle.png


#14

Yes, spacing below 5cm is supported. You just need to change the range of the dial button.

The two help patchers do not communicate. You need to send the speaker coordinates to whichever spat5.viewer you use (otherwise it will just display the default setup, which is this case is a circular array).

These are basic Max operations, and have nothing to do with spat.
I think you should explore the Max tutorials to get more familiar with Max patching.

T.


#15

Great to know that the algorithms support spacing below 5cm. It’s better to ask if changing the dial range can break something :wink:

I’m doing the Max tutorials in parallel with exploring Spat5. I’m at Numerical UIs. That’s number 7, but still no dac~ and adc~ modules in sight.

However, I wasn’t expecting the spat5.wfs.config module to communicate with the spat5.wfs module as opposed to what you wrote. I was confused to open a help patch of the wfs renderer and seeing a speaker setup in there that is actually not supported by the wfs renderer module. That’s kind of contradictory, isn’t it?
Furthermore, I was confused by the need to define my speaker setup twice. I expected defining the speaker setup via the spat5.wfs.config example patch, exporting that data and importing that into the spat5.wfs~ example patch would be enough.

Without an overview about how these wfs modules should be used in conjunction with each other (all I was seeing up to this point are example patches showing how to use one of the many wfs modules included in Spat), there is a lot to find out and ask about, I guess.
I’ll do my best to research Max specific questions by myself.

Thank you for your enduring help and for your work on Spat!