Using SplayAz to spatialize multichannel sources

Hi,

I’m trying to understand how SplayAz works.

I’d like to have a transparent setup for a multi-channel sound: source 1 to channel 1, source 2 to channel 2, etc., in order to then work on rotations, focuses and other translations of a multi-source sound projected into a multi-channel space.

In this example, I’ve empirically found the values for a transparent configuration: each source is routed to a single channel (a bus), in the same order. But I can’t see any logic in it. You’d expect the spread to be 1 to get this, but it doesn’t work like that.

(SynthDef.new (\test_spat, {
	|spread = 1,
	level = 1,
	width = 2.0,
	center = 0.0,
	orientation = 0.0|

	var sig = SplayAz.ar(6, [
		Impulse.ar(0.01, 0.0, 0.001),//ch1 (nothing)
		Impulse.ar(7.21, 0.0, 0.9),//ch2
		Impulse.ar(0.01, 0.0, 0.001),//ch3 (nothing)
		Impulse.ar(1.8, 0.0, 0.9),//ch4
		Impulse.ar(0.01, 0.0, 0.001),//ch5 (nothing)
		Impulse.ar(0.8, 0.0, 0.9),//ch6
	], spread, level, width, center, orientation);
	Out.ar(0, sig);
}).add)

x = Synth(\test_spat);

//For having one source in one channel, width must be 1 (that is different from PanAz)
x.set(\width, 1);

//for having the source 2 in channel 2 center must be 1
x.set(\center, 1);
//But you can observe the source 6 get out via the channel 1

//To get something like what I'm looking for... 
x.set(\spread, 3.2, \center, 0, \orientation, 1);
//But why this spread value???

Does anyone have any experience in this area?

Thanks !

any reason to not use ambisonics here? the ATK stuff is excellent in this regard.

Hi Jordan, I’m planning to do this, as well as the VBAP system. For the moment, I’m studying the different spatialization solutions in SC, favoring those that are the lightest in calculation and the easiest to adapt to my studio and to most concert setups. I thought SplayAz might do the job…

SplayAz had an eccentric calculation that could be quite confusing! It was changed recently:

If you have the old calculation you can copy the fix from:

Atk, if you’re not using the kernel stuff, is really fast. It’s also the most flexible as you can specify a decoder per venue. The only downside could be spatial fidelity, so a second order might be warranted.

Thank you @rdd ! I’ve modified the code, but the behavior is still a bit strange… Examples:


x = Synth(\test_spat);
x.set(\width, 1, \center, 1); //doesn't work
x.set(\width, 1, \center, 0.7); //works
x.set(\width, 2, \level, 1);
x.set(\orientation, 0, \width, 1, \level, 2);
x.set(\spread, 1, \width, 1 );//doesn't work
x.set(\spread, 0, \width, 1);//works

Oh well, thank you @jordan for the suggestion, I’ll have a look at it then. I’ve seen that the documentation is quite extensive…