Forums > MaxMSP

8 speaker surround

May 25, 2008 | 10:14 am

alright all, i’ve made a 5 sound drum machine and basically what im trying to do is have each sound slowly rotating around the room in different directions and different speeds, so far i havent had much luck, bucket seems like a close object but i cant get it so each slider spaces out more. any ideas?


May 25, 2008 | 10:42 am

James skrev:
> alright all, i’ve made a 5 sound drum machine and basically what im trying to do is have each sound slowly rotating around the room in different directions and different speeds, so far i havent had much luck, bucket seems like a close object but i cant get it so each slider spaces out more. any ideas?
>
There is a wide variety of abstractions that will do this quite
flawlessly. I seem to remember 110.distribution or similar.

check maxobjects.com


May 25, 2008 | 11:11 am

ambisonics?
multiout?

On 25 May 2008, at 11:42, Andreas Wetterberg wrote:

> James skrev:
>> alright all, i’ve made a 5 sound drum machine and basically what
>> im trying to do is have each sound slowly rotating around the room
>> in different directions and different speeds, so far i havent had
>> much luck, bucket seems like a close object but i cant get it so
>> each slider spaces out more. any ideas?
>>
> There is a wide variety of abstractions that will do this quite
> flawlessly. I seem to remember 110.distribution or similar.
>
> check maxobjects.com


May 25, 2008 | 1:54 pm

You could control the volume of each speaker with a sine function with
each sine function driven by the same metro. To do the spacing, you
could use progressively bigger delays on the metro for each function.
Maybe a ramp/triangle function would work better here…I’m sure
there’s a more elegant way to do it. And you can adjust the delays by
cleverly stringing + and * operators.

On Sun, May 25, 2008 at 7:11 AM, Tommaso Perego wrote:
> ambisonics?
> multiout?
>
>
>
> On 25 May 2008, at 11:42, Andreas Wetterberg wrote:
>
>> James skrev:
>>>
>>> alright all, i’ve made a 5 sound drum machine and basically what im
>>> trying to do is have each sound slowly rotating around the room in different
>>> directions and different speeds, so far i havent had much luck, bucket seems
>>> like a close object but i cant get it so each slider spaces out more. any
>>> ideas?
>>>
>> There is a wide variety of abstractions that will do this quite
>> flawlessly. I seem to remember 110.distribution or similar.
>>
>> check maxobjects.com
>
>


Morgan Sutherland


May 25, 2008 | 6:02 pm

this is what ive just come up with, seems to work, each sound needs to use this for individual travel. its not very elegant at all is there a better way of doing this?

max v2;
#N vpatcher 222 336 1131 882;
#P origin 0 -7;
#P toggle 213 504 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 283 524 105 196617 dac~ 1 2 3 4 5 6 7 8;
#P user gain~ 665 321 13 87 158 0 1.071519 7.94321 10.;
#P user gain~ 593 318 13 87 158 0 1.071519 7.94321 10.;
#P user gain~ 508 318 13 87 158 0 1.071519 7.94321 10.;
#P user gain~ 412 316 13 87 158 0 1.071519 7.94321 10.;
#P user gain~ 322 318 13 87 158 0 1.071519 7.94321 10.;
#P user gain~ 228 312 13 87 158 0 1.071519 7.94321 10.;
#P user gain~ 158 313 13 87 158 0 1.071519 7.94321 10.;
#P user gain~ 89 315 13 87 158 0 1.071519 7.94321 10.;
#P number 401 54 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 200 127 15 0;
#P newex 201 105 44 196617 togedge;
#P button 168 104 15 0;
#P inlet 65 22 15 0;
#P toggle 65 43 15 0;
#P number 119 44 55 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 65 64 64 196617 metro 2000;
#P newex 660 152 32 196617 sel 8;
#P newex 580 151 32 196617 sel 7;
#P newex 490 156 32 196617 sel 6;
#P newex 409 158 32 196617 sel 5;
#P toggle 656 173 15 0;
#P toggle 570 173 15 0;
#P toggle 485 179 15 0;
#P toggle 408 182 15 0;
#P newex 654 201 62 196617 metro 333;
#P button 654 221 15 0;
#N counter 2 0 127;
#X flags 0 0;
#P newobj 656 244 83 196617 counter 2 0 127;
#P newex 565 199 62 196617 metro 333;
#P newex 483 199 62 196617 metro 333;
#P button 565 221 15 0;
#N counter 2 0 127;
#X flags 0 0;
#P newobj 567 244 83 196617 counter 2 0 127;
#P button 484 221 15 0;
#N counter 2 0 127;
#X flags 0 0;
#P newobj 486 244 83 196617 counter 2 0 127;
#P newex 401 199 62 196617 metro 333;
#P button 401 221 15 0;
#N counter 2 0 127;
#X flags 0 0;
#P newobj 403 244 86 196617 counter 2 0 127;
#P newex 318 152 32 196617 sel 4;
#P newex 238 151 32 196617 sel 3;
#P newex 148 156 32 196617 sel 2;
#P newex 67 158 32 196617 sel 1;
#P number 65 109 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 3 1 8;
#X flags 0 0;
#P newobj 65 85 71 196617 counter 3 1 8;
#P toggle 314 173 15 0;
#P toggle 228 173 15 0;
#P toggle 143 179 15 0;
#P toggle 66 182 15 0;
#P newex 312 201 62 196617 metro 333;
#P button 312 221 15 0;
#N counter 2 0 127;
#X flags 0 0;
#P newobj 314 244 83 196617 counter 2 0 127;
#P newex 223 199 62 196617 metro 333;
#P newex 141 199 62 196617 metro 333;
#P button 223 221 15 0;
#N counter 2 0 127;
#X flags 0 0;
#P newobj 225 244 83 196617 counter 2 0 127;
#P button 142 221 15 0;
#N counter 2 0 127;
#X flags 0 0;
#P newobj 144 244 83 196617 counter 2 0 127;
#P newex 59 199 62 196617 metro 333;
#P button 59 221 15 0;
#N counter 2 0 127;
#X flags 0 0;
#P newobj 61 244 86 196617 counter 2 0 127;
#P connect 12 0 2 0;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P connect 48 0 44 0;
#P connect 45 0 44 0;
#P connect 44 0 42 0;
#P connect 42 0 16 0;
#P connect 16 0 17 0;
#P connect 18 0 12 0;
#P connect 17 0 18 0;
#P connect 0 0 50 0;
#P connect 49 0 2 1;
#P connect 43 0 42 1;
#P connect 13 0 7 0;
#P connect 7 0 4 0;
#P connect 19 0 13 0;
#P connect 4 0 3 0;
#P connect 17 0 19 0;
#P connect 3 0 51 0;
#P connect 16 2 46 0;
#P connect 49 0 7 1;
#P connect 47 0 48 0;
#P connect 46 0 47 0;
#P connect 14 0 8 0;
#P connect 8 0 6 0;
#P connect 6 0 5 0;
#P connect 20 0 14 0;
#P connect 5 0 52 0;
#P connect 17 0 20 0;
#P connect 49 0 8 1;
#P connect 59 0 58 0;
#P connect 50 0 58 0;
#P connect 51 0 58 1;
#P connect 52 0 58 2;
#P connect 15 0 11 0;
#P connect 11 0 10 0;
#P connect 21 0 15 0;
#P connect 10 0 9 0;
#P connect 17 0 21 0;
#P connect 9 0 53 0;
#P connect 53 0 58 3;
#P connect 54 0 58 4;
#P connect 55 0 58 5;
#P connect 56 0 58 6;
#P connect 49 0 11 1;
#P connect 57 0 58 7;
#P connect 34 0 24 0;
#P connect 24 0 23 0;
#P connect 23 0 22 0;
#P connect 38 0 34 0;
#P connect 17 0 38 0;
#P connect 22 0 54 0;
#P connect 49 0 24 1;
#P connect 35 0 29 0;
#P connect 29 0 26 0;
#P connect 39 0 35 0;
#P connect 26 0 25 0;
#P connect 17 0 39 0;
#P connect 25 0 55 0;
#P connect 49 0 29 1;
#P connect 36 0 30 0;
#P connect 30 0 28 0;
#P connect 28 0 27 0;
#P connect 40 0 36 0;
#P connect 17 0 40 0;
#P connect 27 0 56 0;
#P connect 49 0 30 1;
#P connect 37 0 33 0;
#P connect 33 0 32 0;
#P connect 41 0 37 0;
#P connect 32 0 31 0;
#P connect 17 0 41 0;
#P connect 31 0 57 0;
#P connect 49 0 33 1;
#P pop;


May 25, 2008 | 6:14 pm

im trying to used a 2 dimensional pict slider (one of the objects at the top) because i thought thats a really good way representing where exactly the sound is coming out….


May 25, 2008 | 6:39 pm

James skrev:
> this is what ive just come up with, seems to work, each sound needs to use this for individual travel. its not very elegant at all is there a better way of doing this?
>
Yes, and that would be by using some of the very powerful work that is
in the abstractions and externals at maxobjects.com.. I would SERIOUSLY
recommend you go there and have a look-see.


May 25, 2008 | 9:45 pm


May 26, 2008 | 8:59 am

> this is what ive just come up with, seems to work, each sound needs
> to use this for individual travel. its not very elegant at all is
> there a better way of doing this?

Try VBAP. It is easy to get started with, and is not particularly
heavy on your CPU.

Cheers,
Alexander


May 26, 2008 | 2:04 pm

In case a reader doesn’t know how ambisonics would solve this
question, it’s relatively simple – and probably more scalable than
some of the other solutions posted. I’ll try and give a plain English
explanation.

First, the short version:

source(s), azimuth(s), elevation(s)
|
v
encoder(s)
|
v
(summed)
|
v
decoder
|
v
speaker outputs

And a brief explanation of what this means:

Each source to be spatialized is passed to an encoder, along with a
direction from the listener described as azimuth (angle from the
listener on the horizontal plane, typically clockwise) and elevation
(angle from the listener going up/down, usually up from front-facing
is positive). These are polar coordinates, which are sometimes called
phi and theta. Note that the elevation transform is applied after
the azimuth (you could imagine turning from a front-horizontal facing
clockwise until you are aligned to the source, then rotating upwards
until you face the source).

The ambisonic encoder then creates an intermediate representation of
this sound source in the ambisonic domain. It’s just a transform, in
the same way that a spectral domain can be achieved by (some kind of)
Fourier transform, however in this case it is based upon the math of
spherical harmonics and captures polar orientations rather than
frequencies. There are different orders of ambisonics, and they can
be done in 2D or 3D. Increasing the order is better if you want to
expand your acceptable listening area, but requires more signals in
the ambisonic domain. For an 8 channel surround in 2D, you would
typically use 1st order (requires 3 channels) or 2nd order (requires
5 channels in the ambisonic domain). One of the nice things about the
domain is that it is additive, you can encode lots of independent
sources and add the domain signals together (assuming the domain
orders and dimensions match).

The other nice thing is that the domain is portable; it can be easily
‘decoded’ onto different arrays of speakers, and the only additional
information needed is the speaker arrangement (and that, again, the
order/dimensions must match). The domain signals are passed to a
decoder to do another spherical harmonic transform at each speaker
location, and deduce the needed pressure waves from each speaker to
try and reconstruct the spatial sound field in your listening area.
That’s why the decoder also needs to know the azimuth and elevation
of each speaker relative to the listener.

You can build a simple 1st order encoder in max just using basic
objects, since the math at 1st order is pretty simple – see Dave
Malham’s primer:

http://www.york.ac.uk/inst/mustech/3d_audio/ambis2.htm

Or, you can use externals for higher orders. There are two higher-
order ambisonic libraries listed on http://www.maxobjects.com, ICST’s and my
own; both are fully capable of these tasks.

Also, note that ambisonics can do a lot more than what I’ve mentioned
here – I’ve deliberately simplified the description. I hope someday
soon a book will be published on the subject – it is quite overdue.

On May 25, 2008, at 4:11 AM, Tommaso Perego wrote:

> ambisonics?
> multiout?
>
>
>
> On 25 May 2008, at 11:42, Andreas Wetterberg wrote:
>
>> James skrev:
>>> alright all, i’ve made a 5 sound drum machine and basically what
>>> im trying to do is have each sound slowly rotating around the
>>> room in different directions and different speeds, so far i
>>> havent had much luck, bucket seems like a close object but i cant
>>> get it so each slider spaces out more. any ideas?
>>>
>> There is a wide variety of abstractions that will do this quite
>> flawlessly. I seem to remember 110.distribution or similar.
>>
>> check maxobjects.com
>

Be seeing you

grrr waaa
http://www.grahamwakefield.net


May 26, 2008 | 8:40 pm

I would strongly recommend ICST ambisonics for your purposes. You can freely position all you sources in a 3D space very easily, and change the speaker configuration as well.

Not 5 compatible yet, though.

Ph


May 27, 2008 | 10:39 am

yes I agree with Jelly,
you need just that now, even I have found multiouts very useful too
in the past.
the patch you have made its not really effective.
You’ll be amazed by ambisonics

On 26 May 2008, at 21:40, Philippe Jelli wrote:

>
> I would strongly recommend ICST ambisonics for your purposes. You
> can freely position all you sources in a 3D space very easily, and
> change the speaker configuration as well.
>
> Not 5 compatible yet, though.
>
> Ph


May 27, 2008 | 3:50 pm

"I hope someday
soon a book will be published on the subject – it is quite overdue." HERE HERE! > 30 years overdue!


May 27, 2008 | 6:54 pm

Quote: Jimmeh wrote on Sun, 25 May 2008 03:14
—————————————————-
> alright all, i’ve made a 5 sound drum machine and basically what im trying to do is have each sound slowly rotating around the room in different directions and different speeds, so far i havent had much luck, bucket seems like a close object but i cant get it so each slider spaces out more. any ideas?
—————————————————-

I made a wrapper around VBAP called panhandler~. It’s here:

http://cnmat.berkeley.edu/patch/2861

mz


Viewing 14 posts - 1 through 14 (of 14 total)