7-channel panning

Marigold Maripol's icon

Marigold Maripol

4月 10 2016 | 8:57 午後

Hi there-

I'm looking to do a basic Max patch where I can pan between 7 speakers.. I've experimented a bit with 8-channel spatialization, but I have no idea how to tailor it to 7. Can anyone direct me towards pre-existing patches or make some suggestions? I'm not trying to make anything particularly sophisticated with ambisonics, just wanted to figure out the basics..

Roman Thilenius's icon

Roman Thilenius

4月 10 2016 | 10:43 午後

really depends on the setup. circle? one dimensional? irregular? dynamic postioning?

Marigold Maripol's icon

Marigold Maripol

4月 11 2016 | 12:15 午前

It's one-dimensional. it looks a little bit like this:

---1--2 --3----
4-------------7
5 ------------6

Ultimately, though, I'm not sure why/if I can use a patch like the one attached...and just have the 7th track start to blend back into the first?

pan8.maxpat
Max Patch
Roman Thilenius's icon

Roman Thilenius

4月 11 2016 | 2:52 午後

your patch would be perfectly working when your speaker setup would be circular and everything had the same distance.

rectangles are more difficult and rectangles with irregular distances between the speakers would normally require some more math.

is there a specific reason why you dont arrange the speakers with equal distribution? or why you dont use 8 ?

or at least arrange stuff in a circle shape, then the "missing" speaker at 180 degrees is ok. a circular setup will be much easier to control as the weighting between neighbour channels is always the same, no matter hor far the distance. :)

Marigold Maripol's icon

Marigold Maripol

4月 11 2016 | 10:54 午後

it's not really my set-up, so i'm unable to alter it too much..
there are only 7 speakers there, the speakers are pretty firmly mounted into their respective locations..

is there a way to evenly distribute over 7?

spectro's icon

spectro

4月 12 2016 | 11:26 午前

From your diagram it looks (somewhat) like a 7.1 configuration - without the .1. With that said, a relatively straightforward way to do what you want is to use the ICST Ambisonic toolkit ( https://www.zhdk.ch/index.php?id=icst_ambisonicsexternals ) which has a downloadable package of max externals and help files, etc.. With ambisonics (and that toolkit) you can decode to pretty much any speaker configuration - such as the one you are going to use.

Roman Thilenius's icon

Roman Thilenius

4月 12 2016 | 10:30 午後

to do it for 7 wont differ from 8 at all when you use the technology of that patcher you got.

but the problem remains that the rear speakers are not as close to each other as the others, and that the arrangement is not a circle.

if you have access to the speakers while programming you should be able to easily adjust the gains for the channels a bit until you like the result.

try it with my approach in the attachement which is more or less based on a single expression, expr pow(((cos(($f1+$f2)*0.017455)*0.5)+0.5)\,(($f3*99.99)+0.01)) which allows you to set up the angle in degree and which also has a "broadness" parameter input.

110.deg2gain.zip
zip
110.dekamix.zip
zip
Marigold Maripol's icon

Marigold Maripol

4月 13 2016 | 1:56 午後

Thanks, everyone.

Marigold Maripol's icon

Marigold Maripol

4月 13 2016 | 2:29 午後

Is there a specific approach in the amibisonic toolkit that is configured for 7.1 or is the point to just eyeball it?

I think this stuff is way over my head, straight out of the box..

Luke Woodbury's icon

Luke Woodbury

4月 13 2016 | 2:37 午後

I often use the [nodes] object to do sound placement with a multi speaker setup and simple panning. Here's an example I use for 6 speakers in a circle, but no reason you couldn't set it up for your setup.

Max Patch
Copy patch and select New From Clipboard in Max.

Marigold Maripol's icon

Marigold Maripol

4月 13 2016 | 3:30 午後

I'm sorry - but can you help me understand how to arrange this to handle audio panning? I'm still very confused about all of this.

Luke Woodbury's icon

Luke Woodbury

4月 13 2016 | 7:16 午後

It may be wise to go through some of the Max tutorials at this point :)

Here's an example with an audio file:

Max Patch
Copy patch and select New From Clipboard in Max.

Marigold Maripol's icon

Marigold Maripol

4月 14 2016 | 2:59 午前

Ah yes, I should've been more clear about what was confusing to me.
It makes sense to have a single cursor panning through the 7 speakers - that does seem to work relatively nicely with how things are set up. But it really seems to lag if I have 7 instances of this node object - and I'd like to have multiple sounds. Is it possible to use multiple cursors with the same node object?

Luke Woodbury's icon

Luke Woodbury

4月 14 2016 | 7:50 午前

Do you need realtime interactivity? If not you could record your panning data and play it back, I've done similar with a [coll] before, or [pattrstorage] has some nice interpolation features. You can put [nodes] in a sub patcher and I believe it won't redraw so should save some power, you could use [pictslider] as the placement control outside, or... you could do some clever maths as Roman has suggested.

Marigold Maripol's icon

Marigold Maripol

4月 14 2016 | 3:47 午後

Hmm..it does need to be realtime interactive for a few reasons.. I'll definitely experiment with some of these suggestions. I'm a little confused about what is causing this to drag, also - it seems like my CPU processing is fine, my vectors are all large - is there a way to ensure better scheduler accuracy in Max?

Re: Ambisonic Toolkit - the clever maths option might be a bit over my head, unless someone on this forum has done similar?

Roman Thilenius's icon

Roman Thilenius

4月 14 2016 | 5:36 午後

when the setup is not linear you must (theoretically) include a haas delay for the corner speakers.

calculating the gain weighting and the delay times "by hand" (instead of using some library) is not too difficult, but only when the setup really never changes.

mizu's icon

mizu

4月 14 2016 | 7:05 午後

Hi Marigold, imho not easy to help you, solutions go from simplest to most complex, depending of your real needs. Can you take time with the setup ? Begin with gains, then delays, and maybe eq's. If the loudspeakers are different, & their places, the room, it will have an impact on the perception of your sound. The propositions here are very nice and reveal the deepness of the thing. Do you think Frontal in your setup ? So, center, L-R and rear. If circular, so you have 4 sources to think to.
zz

Marigold Maripol's icon

Marigold Maripol

4月 14 2016 | 9:53 午後

Hi Mizu and Roman,
I do have time to experiment with the setup - and quite frankly, the simple interpolating nodes patch worked pretty well for my needs. The thing that is complicated for me is that this object seems to create a significant burden on the CPU(?) and I can't have more than 2 or 3 going at one time without noticing lags in the panning.

There is some talk about using the ambisonic toolkit because it might allow me to position multiple sounds in the space...but I'm a little unclear about how to use it for this purpose. The ideas about haas delays and gain levels easily surpass my knowledge of psychoacoustics and spatialization. I understand that certain auditory illusions function differently, but I was hoping to implement some sort of simple Max project without reviewing all of this very dense technical information.

Luke Woodbury's icon

Luke Woodbury

4月 15 2016 | 5:11 午前

Anything with a fancy UI like nodes is going to add up pretty quick on the CPU. Did you try hiding them in subpatchers so they are not redrawing all the time? I don't know if putting them inside a poly would help? Maybe post what you have so far.

Roman Thilenius's icon

Roman Thilenius

4月 15 2016 | 9:45 午前

i think the point about using nodes was that you can control more than one channel with only one UI object. the user interface is always a matter of taste, of course, but something simpler( like pictureslider) will not hog the CPU at all when not moved with the mouse.

delay time and air absorbtion/attenuation are more or less using a constant and the rule of three.

the delay is based on the difference in distance, the attenuation is based on the difference between the speakers.

if speaker A is 20 meters from the listener and speaker B 10 meters, speaker A should/might be delayed for about 29,95 milliseconds.

[delay~ 1320] (at 44 khz)

the attenuation for the speaker 2 times further away would be around -6db/A. in your cubic setup the center speaker has the distance A and the corner speaker has the distance of squareroot(2*(A*A)), so the corner speaker is about 1.414 times further away from the listener, who sits in the middle of the cube and smokes weed. so the corner speakers should be some 41.4% of +6 db/A louder that the center speakers.

note that we are talking about the actual db/A of the speakers... this last factor can only be found by measuring. :)

i´d prefer trial and error here. :)

mizu's icon

mizu

4月 16 2016 | 1:35 午後

Max Patch
Copy patch and select New From Clipboard in Max.

Hi all
sharing my perplexity, sorry ;)
a big thing for me with the computer was to be able to place a sound in space with delays and with levels.
For "microdelays", delay in gen~ can go to zero. Hope that is explicit enough:

For Marigold, nice to can play between the fingers, and the brain.
I think 2 steps:
- a static state for every loudspeaker. Treatment of the room.
- a state for every sound : static recalls, or moving in space ?
I should take 7 gain~ or live.gain~ ( no matter integer or dB, they have interpolation inside ). and presets to test.
So you can find by ears where to go deeper and search help in theory.
-- something speaking to me, the patch of MZED
https://cycling74.com/forums/question-xy-crossfader-patch/
zz

mizu's icon

mizu

4月 16 2016 | 1:37 午後

Oops, what's that in blue ?
Learned something
zz