Forums > MaxMSP

rotate in 4 speakers

April 3, 2010 | 12:53 pm

Hello,

I wonder whether anyone could give me a hint, who to make the following patch smarter.
The ideas is the rotate a recording.

[ Patch in Max4 ]

All the best
Krisztian

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden newex 198 87 39 196617 r dac4;
#P hidden newex 90 20 39 196617 r dac3;
#P hidden newex 5 40 39 196617 r dac2;
#P hidden newex 26 189 39 196617 r dac1;
#P newex 65 668 39 196617 r dac1;
#P newex 108 668 39 196617 r dac2;
#P newex 195 667 39 196617 r dac4;
#P newex 151 667 39 196617 r dac3;
#P newex 886 384 39 196617 s dac4;
#P newex 628 384 39 196617 s dac3;
#P newex 368 384 39 196617 s dac2;
#P newex 104 385 39 196617 s dac1;
#P hidden newex 6 60 34 196617 * -1.;
#P hidden newex 27 209 34 196617 * -1.;
#P window setfont Arial 12.;
#P hidden newex 65 419 82 -1205862388 pak 1. 1. 1. 1.;
#P user multiSlider 306 506 143 118 0. 1. 4 2681 0 0 2 2 7 0 0;
#M frgb 183 90 56;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P window setfont "Sans Serif" 9.;
#N vpatcher 14 59 262 598;
#P outlet 60 432 15 0;
#P inlet 60 60 15 0;
#P window setfont "Sans Serif" 12.;
#P flonum 60 394 76 12 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 60 359 51 196620 % 360.;
#P flonum 60 91 76 12 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 60 128 37 196620 t f i;
#P newex 83 156 31 196620 abs;
#P newex 60 321 33 196620 + 0.;
#P newex 83 270 45 196620 * 360;
#P newex 83 231 30 196620 + 1;
#P newex 83 197 45 196620 / 360;
#P connect 9 0 6 0;
#P connect 6 0 5 0;
#P connect 5 0 3 0;
#P connect 3 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 10 0;
#P connect 5 1 4 0;
#P connect 4 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 1;
#P pop;
#P newobj 847 225 44 196617 p circle;
#P newex 847 204 36 196617 – 270;
#N vpatcher 14 59 262 598;
#P outlet 60 432 15 0;
#P inlet 60 60 15 0;
#P window setfont "Sans Serif" 12.;
#P flonum 60 394 76 12 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 60 359 51 196620 % 360.;
#P flonum 60 91 76 12 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 60 128 37 196620 t f i;
#P newex 83 156 31 196620 abs;
#P newex 60 321 33 196620 + 0.;
#P newex 83 270 45 196620 * 360;
#P newex 83 231 30 196620 + 1;
#P newex 83 197 45 196620 / 360;
#P connect 9 0 6 0;
#P connect 6 0 5 0;
#P connect 5 0 3 0;
#P connect 3 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 10 0;
#P connect 5 1 4 0;
#P connect 4 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 1;
#P pop;
#P newobj 589 224 44 196617 p circle;
#P newex 589 203 36 196617 – 180;
#N vpatcher 14 59 262 598;
#P outlet 60 432 15 0;
#P inlet 60 60 15 0;
#P window setfont "Sans Serif" 12.;
#P flonum 60 394 76 12 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 60 359 51 196620 % 360.;
#P flonum 60 91 76 12 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 60 128 37 196620 t f i;
#P newex 83 156 31 196620 abs;
#P newex 60 321 33 196620 + 0.;
#P newex 83 270 45 196620 * 360;
#P newex 83 231 30 196620 + 1;
#P newex 83 197 45 196620 / 360;
#P connect 9 0 6 0;
#P connect 6 0 5 0;
#P connect 5 0 3 0;
#P connect 3 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 10 0;
#P connect 5 1 4 0;
#P connect 4 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 1;
#P pop;
#P newobj 329 223 44 196617 p circle;
#P newex 329 202 30 196617 – 90;
#P number 131 83 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 12.;
#P comment 914 291 35 196620 dac4;
#P comment 657 290 35 196620 dac3;
#P comment 394 293 35 196620 dac2;
#P comment 128 292 35 196620 dac1;
#P window setfont "Sans Serif" 9.;
#P flonum 997 319 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 847 384 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 847 274 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 997 297 105 196617 scale 180 360 180 0;
#P number 997 273 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 847 245 160 196617 if $i1<180 then $i1 else out2 $i1;
#B color 5;
#P newex 847 348 93 196617 scale 0. 180. 1. 0.;
#P flonum 739 319 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 589 384 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 589 274 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 739 297 105 196617 scale 180 360 180 0;
#P number 739 273 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 589 245 160 196617 if $i1<180 then $i1 else out2 $i1;
#B color 5;
#P newex 589 348 93 196617 scale 0. 180. 1. 0.;
#P flonum 479 319 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 329 384 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 329 271 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 479 297 105 196617 scale 180 360 180 0;
#P number 479 273 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 329 245 160 196617 if $i1<180 then $i1 else out2 $i1;
#B color 5;
#P newex 329 348 93 196617 scale 0. 180. 1. 0.;
#P window setfont "Sans Serif" 12.;
#P comment 172 124 35 196620 dac4;
#P comment 101 54 35 196620 dac3;
#P comment 25 124 35 196620 dac2;
#P comment 101 191 35 196620 dac1;
#P window setfont "Sans Serif" 9.;
#P flonum 215 320 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 65 385 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 65 275 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 215 298 105 196617 scale 180 360 180 0;
#P number 215 274 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 65 246 160 196617 if $i1<180 then $i1 else out2 $i1;
#B color 5;
#P newex 65 349 93 196617 scale 0. 180. 1. 0.;
#P flonum 195 690 36 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 178 710 28 196617 *~;
#P newex 178 735 41 196617 dac~ 4;
#P flonum 151 690 36 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 134 710 28 196617 *~;
#P newex 134 735 41 196617 dac~ 3;
#P flonum 108 690 36 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 91 710 28 196617 *~;
#P newex 91 735 41 196617 dac~ 2;
#P flonum 65 690 36 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 48 710 28 196617 *~;
#P window setfont "Sans Serif" 12.;
#P comment 244 510 52 196620 voice 1;
#P window setfont "Sans Serif" 9.;
#P message 151 510 41 196617 replace;
#P newex 151 551 73 196617 buffer~ seq1a;
#P user panel 147 506 155 71;
#X brgb 191 191 191;
#X frgb 198 33 0;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P toggle 48 510 16 0;
#P window setfont "Sans Serif" 12.;
#P comment 70 508 73 196620 voice 1;
#P window setfont "Sans Serif" 9.;
#P newex 48 735 41 196617 dac~ 1;
#P message 90 536 50 196617 startloop;
#P newex 48 535 39 196617 sig~ 0;
#P newex 48 557 77 196617 groove~ seq1a;
#P user panel 35 500 418 264;
#X brgb 237 244 185;
#X frgb 0 0 0;
#X border 1;
#X rounded 13;
#X shadow 0;
#X done;
#P user dial 65 81 104 104 359 1 0 0 191 359 1 1. 152 245 162 223 223 223 120 120 120 225 225 225 255 255 255 0 0 0;
#P user multiSlider 67 188 103 46 -1. 0. 1 2937 16 0 2 2 0 0 0;
#M frgb 255 255 255;
#M brgb 196 183 150;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 0 81 64 104 -1. 0. 1 2936 16 0 2 2 0 0 0;
#M frgb 255 255 255;
#M brgb 196 183 150;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 172 81 70 103 0. 1. 1 2936 0 0 2 2 7 0 0;
#M frgb 183 90 56;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P user multiSlider 63 27 107 51 0. 1. 1 2937 0 0 2 2 7 0 0;
#M frgb 183 90 56;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P hidden connect 73 0 2 0;
#P hidden connect 83 0 73 0;
#P hidden connect 82 0 72 0;
#P hidden connect 8 0 6 0;
#P connect 7 0 6 0;
#P connect 16 0 9 0;
#P hidden connect 84 0 0 0;
#P connect 28 0 31 0;
#P fasten 33 0 27 0 220 342 70 342;
#P connect 31 0 27 0;
#P hidden connect 32 0 71 0;
#P connect 81 0 17 0;
#P connect 17 0 16 1;
#P hidden connect 72 0 3 0;
#P hidden fasten 43 0 71 1 334 409 94 409;
#P connect 11 0 8 0;
#P connect 11 0 7 0;
#P connect 19 0 18 0;
#P connect 27 0 74 0;
#P connect 27 0 32 0;
#P connect 80 0 20 0;
#P connect 20 0 19 1;
#P hidden fasten 50 0 71 2 594 409 118 409;
#P connect 22 0 21 0;
#P hidden fasten 57 0 71 3 852 409 142 409;
#P hidden connect 14 0 13 0;
#P connect 78 0 23 0;
#P connect 23 0 22 1;
#P hidden connect 85 0 1 0;
#P connect 25 0 24 0;
#P connect 79 0 26 0;
#P connect 26 0 25 1;
#P connect 28 1 29 0;
#P connect 29 0 30 0;
#P connect 30 0 33 0;
#P hidden connect 71 0 70 0;
#P connect 64 0 65 0;
#P connect 65 0 39 0;
#P connect 39 0 42 0;
#P fasten 44 0 38 0 484 341 334 341;
#P connect 42 0 38 0;
#P connect 38 0 43 0;
#P connect 38 0 75 0;
#P connect 39 1 40 0;
#P connect 40 0 41 0;
#P connect 41 0 44 0;
#P connect 66 0 67 0;
#P connect 67 0 46 0;
#P connect 46 0 49 0;
#P fasten 51 0 45 0 744 341 594 341;
#P connect 49 0 45 0;
#P connect 45 0 50 0;
#P connect 45 0 76 0;
#P connect 46 1 47 0;
#P connect 47 0 48 0;
#P connect 48 0 51 0;
#P fasten 4 0 68 0 70 187 852 187;
#P fasten 4 0 66 0 70 187 594 187;
#P fasten 4 0 64 0 70 187 334 187;
#P hidden connect 4 0 63 0;
#P connect 4 0 28 0;
#P connect 68 0 69 0;
#P connect 69 0 53 0;
#P connect 53 0 56 0;
#P connect 56 0 52 0;
#P fasten 58 0 52 0 1002 341 852 341;
#P connect 52 0 57 0;
#P connect 52 0 77 0;
#P connect 53 1 54 0;
#P connect 54 0 55 0;
#P connect 55 0 58 0;
#P connect 6 0 25 0;
#P connect 6 0 22 0;
#P connect 6 0 19 0;
#P connect 6 0 16 0;
#P window clipboard copycount 86;


April 10, 2010 | 10:04 am

Hey. You should take a look at Ambisonics.

http://www.icst.net/research/downloads/ambisonics-externals-for-maxmsp/


April 15, 2010 | 4:57 pm

thank you, for some reasons I did not get a notification of your reply. best, K


April 16, 2010 | 6:27 am

 
see attached files 110.dekamix for an example of circular panning.

it is a 10 channel patch, but you can easily crate a 4-channel version from it
for your personal needs.

note 1. that the value for "equal power" in the help file is suited to my
taste and speakers, it is not a scientfic elaborated value.

note 2. that the "interpolation" parameter will interpolate "linear" between
position in a circle, i.e. it moves along a segment of the circe, not along
its outline.
(the channel seperation, for example when put on "equal power", will still
stay true.)
 

feedback is welcome.

-110
 


April 16, 2010 | 6:35 am

okay, cant edit the attachements, so here we go.

[attachment=130095,391]

Attachments:
  1. dekamix-forum.jpg

April 16, 2010 | 6:20 pm

hello,
it is asking me for the 110.map. I did not work without.
thank you,
K


April 18, 2010 | 12:22 pm

 
oh pardon.
 

Attachments:
  1. 110.map.mxb.zip

April 20, 2010 | 2:55 pm

many thanks, it works now, and seems to the job :)

I will try to recode mine so I can have the channel separation feature. Thank you!
Krisztian

Attachments:
  1. rotate_ask00

April 29, 2010 | 12:08 pm

Dear Roman

I have two choices:

(1) I try to figure out how you made a patch and make one from scratch
or
(2) alter yours to make it work with 4 speakers, which I am finding a hard nut:)

(1)
I am finding it difficult to have 4 values which I can use to change volumes of 4 samples.
The rotation of the samples is sorted it is just the samples individual volume I need to be able to alter.

The incoming signal is scaled to 0-100,
where if it is at 25 the first sample should be the loudest
if the signal gets closer to 50 the 2nd sampler should be louder, but the first sampler fades away….

Now I did not get to far as I am afraid I need some advanced expression to continue…
can you help please?

any help appreciated.
Krisztian

Attachments:
  1. max_eachvolume

April 29, 2010 | 4:31 pm

Give this a try:

– Pasted Max Patch, click to expand. –

April 30, 2010 | 8:37 am

hello Steve
I have tried it, but it gives me the same amplitude for all 4 outputs when the Q is between 0.25 an 0.75.
thank you,
K

– Pasted Max Patch, click to expand. –

April 30, 2010 | 1:56 pm

hmmmmmm … it might be that i am wrong when i suggest you to just shorten it to 4 speakers …
it might be that the separation value must be changed too then … or something like that.

i dont know if you already found that out, but in my 10 channel version there are 10 numbers
which represent the degree/angle … it could be dynamic (it is only not dynamic because we
only have 9 arguments to patcher in max) … so the first step is to change those to 0, 90, 180., 270 …

i cant now, but i will look into it later and post you a 4 channel version … i can then also alter
it to your needs or make further suggestions.

-110


April 30, 2010 | 7:03 pm

hi -110
oppps, yes I altered it before, but forgot to check the cabling.. now it works… soon I will upload a morph patch which is base on yours… I like it a lot. thanks… K


May 1, 2010 | 9:36 am

and again… it really works, though I still have to add a feature which changes which voice is more dominant (volume).. as mentioned above. But, yes, your patch is great… until I understand the mathematics in it I would love to use it if you do not mind :)

the really beta version of the morph patch attached with the altered ~110 files, where I also use a Sarcuino.
(in Max5 the knobs degrees have to be altered)

thanks again and all the best
Krisztian


May 1, 2010 | 6:41 pm

sure use it, but always rename abstractions when altered or
you will run into trouble hen you install both :)

your knob with the 4 msliders is nice.

i would use [lcd] to make an endless knob, then you could
have the 4 sliders diagonal (i.e. like the speaker position
actually is)

hmmm. :)

you could use the expr pow(cos …. output (inside the 110.deg2gain)
to control those 4 sliders, you know? and let them diplay proper db/A …
the sliders will then also display correctly when the seperation is not
"equal power" :D

god, i gotta open max now and try it


May 6, 2010 | 7:09 am

hi, thanks for the feedback, I will have to try these (lcd, exp pow) asap!
thanks again, and all the best
Krisztian


May 10, 2010 | 3:16 pm

hi Steven
I had a look again on the code you sent me with the "generated signal buffer"… in Max 4 I had to change the [add signal] objects to simple [add float] objects ant than it works. thanks for your help, I shall be using this smart ramp from now. all the best.
Krisztian

– Pasted Max Patch, click to expand. –

May 10, 2010 | 4:22 pm

Hi Tedor,

Glad you got it to work for you. Have fun!

Best,

Steven


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