## Circular version of pictslider

Apr 10, 2007 at 4:30pm

# Circular version of pictslider

I am making a control that converts X/Y of a pictslider to location and
distance for a quad panner. When the control is rectangular, the corners
come out further away than the edges. Is their a control around that limits
the slider to a circle?

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

#31286
Apr 10, 2007 at 6:17pm

Hi,

If you want a circle it is good to go over the formulas for circles…
pi(3.14) X r(squared) etc. and the pythagorean theorum… x(squared) X
y(squared) = z(squared)

There is a quad panner that comes with max as well as others online.
Is there a reason you are making one?

max v2;
#N vpatcher 15 55 235 382;
#P window setfont “Sans Serif” 20.;
#P window linecount 1;
#P comment 62 228 63 9109524 radius;
#P inlet 102 29 15 0;
#P inlet 58 29 15 0;
#P outlet 21 270 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 21 176 34 9109513 unpack;
#P newex 21 150 34 9109513 pack i i;
#P flonum 21 236 35 9 0 127. 2 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 21 206 155 9109513 expr sqrt((\$i1*\$i1)+(\$i2*\$i2));
#P number 20 119 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 20 87 27 9109513 * -1;
#P number 140 119 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 140 85 27 9109513 * -1;
#P number 58 119 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 102 119 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 102 52 32 9109513 * 127.;
#P newex 58 52 32 9109513 * 127.;
#P connect 0 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 10 0;
#P connect 3 0 10 0;
#P connect 10 0 11 0;
#P connect 11 0 8 0;
#P connect 8 0 9 0;
#P connect 9 0 12 0;
#P connect 5 0 10 1;
#P connect 2 0 10 1;
#P connect 13 0 0 0;
#P connect 0 0 3 0;
#P connect 14 0 1 0;
#P connect 1 0 2 0;
#P connect 1 0 4 0;
#P connect 4 0 5 0;
#P fasten 11 1 8 1 50 199 171 199;
#P pop;

On 4/10/07, Gary Lee Nelson wrote:
> I am making a control that converts X/Y of a pictslider to location and
> distance for a quad panner. When the control is rectangular, the corners
> come out further away than the edges. Is their a control around that limits
> the slider to a circle?
>
> Cheers
> Gary Lee Nelson
> Oberlin College
> http://www.timara.oberlin.edu/GaryLeeNelson
>
>
>

#101477
Apr 10, 2007 at 6:49pm

Hello,

jsui is probably the way to go nowdays, but if you like oldskool max,
you can go the lcd way like in the cartopol helpfile, or use a
combination of transparent button and pictslider:

#P window setfont “Sans Serif” 9.;
#P flonum 171 395 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 97 391 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P comment 293 322 131 196617 top: transparent button;
#P comment 293 308 137 196617 middle: inactive pictslider;
#P comment 293 294 137 196617 bottom: panel=circle bkg;
#P user ubutton 291 163 100 100 0 6;
#P user pictslider 291 163 100 100 0 0 0 0 SliderDefaultKnob.pct 1
SliderDefaultBkgnd.pct 1 3443 0 -3211314 3276850 1. 1.;
#P noclick;
#P newex 148 124 56 196617 clip 0 100;
#P newex 65 131 56 196617 clip 0 100;
#P newex 142 169 30 196617 – 50;
#P newex 76 179 30 196617 – 50;
#P newex 99 74 40 196617 unpack;
#P newex 52 286 56 196617 clip 0. 50.;
#P newex 125 341 47 196617 poltocar;
#P newex 93 226 47 196617 cartopol;
#P user panel 291 163 100 100;
#X brgb 191 191 191;
#X frgb 181 181 181;
#X border 1;
#X rounded 222;
#X done;
#P comment 109 288 100 196617 < - max radius;
#P comment 293 277 100 196617 3 layers:;
#P connect 4 1 17 0;
#P fasten 4 1 11 1 167 364 242 364 242 144 386 144;
#P connect 4 0 16 0;
#P fasten 4 0 11 0 130 375 254 375 254 155 296 155;
#P fasten 3 1 4 1 191 292;
#P fasten 12 2 6 0 356 273 409 273 409 43 104 43;
#P connect 3 0 5 0;
#P connect 5 0 4 0;
#P connect 8 0 3 1;
#P connect 7 0 3 0;
#P connect 6 1 10 0;
#P connect 10 0 8 0;
#P connect 6 0 9 0;
#P connect 9 0 7 0;
#P window clipboard copycount 18;

cheers,
nesa

#101478
Apr 10, 2007 at 7:00pm

On 4/10/07 2:17 PM, “carey dodge” wrote:

> Hi,
>
> If you want a circle it is good to go over the formulas for circles…
> pi(3.14) X r(squared) etc. and the pythagorean theorum… x(squared) X
> y(squared) = z(squared)

>

And that

>
> There is a quad panner that comes with max as well as others online.
> Is there a reason you are making one?

I’ve already built the panner. What I need is something that reflects
visually that I am dealing with a circle and not a square – like the panners
in Digital Performer surround mixer.

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

#101479
Apr 10, 2007 at 7:23pm

and, it’s nicer without those:

> clip 0 100

#101481
Apr 10, 2007 at 7:26pm

Hi,

Sorry, I thought you wanted to do the calculation not the display…

Here is my solution for the display. I added speaker placement for my
patch. You could make the lcd bigger and have a wider display of the
circle.

Cheers,

Carey

max v2;
#N vpatcher 25 70 323 306;
#P origin 0 37;
#P user lcd 77 56 128 128 0 1 0 0 0;
#P window setfont “Sans Serif” 9.;
#N vpatcher 434 231 962 578;
#P origin 144 53;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P message 313 240 104 9109513 paintrect 0 0 128 128 0;
#P message 283 218 116 9109513 frameoval \$1 \$2 \$3 \$4 19;
#P newex 283 176 60 9109513 prepend set;
#P message 283 197 132 9109513 -2 -9 136 129;
#P newex 283 144 40 9109513 t l b b;
#P newex 283 123 97 9109513 pack 0 0 0 0;
#P newex 370 101 27 9109513 + \$i;
#P newex 341 101 27 9109513 + \$i;
#P newex 312 101 27 9109513 – \$i;
#P newex 283 101 27 9109513 – \$i;
#P newex 283 70 97 9109513 unpack;
#P message 8 248 109 9109513 PaintOval 60 60 68 68 0;
#P message 139 219 109 9109513 PaintOval \$1 \$2 \$3 \$4 0;
#P newex 139 177 60 9109513 prepend set;
#P message 139 198 132 9109513 62 55 72 65;
#P newex 139 145 27 9109513 t l b;
#P newex 139 124 97 9109513 pack 0 0 0 0;
#P newex 226 102 27 9109513 + 5;
#P newex 197 102 27 9109513 + 5;
#P newex 168 102 27 9109513 – 5;
#P newex 139 102 27 9109513 – 5;
#P message 7 219 112 9109513 PaintOval \$1 \$2 \$3 \$4 -1;
#P newex 139 71 97 9109513 unpack;
#P inlet 283 25 15 0;
#P outlet 139 287 15 0;
#P newex 29 93 27 9109513 * -1;
#P inlet 1 25 15 0;
#P outlet 1 287 15 0;
#P newex 29 119 84 9109513 zmap 0 -127 -1. 1.;
#P newex 1 69 38 9109513 unpack;
#P newex 1 142 81 9109513 zmap 0 127 -1. 1.;
#P newex 1 164 85 9109513 pak position 0. 0.;
#P connect 5 0 2 0;
#P connect 2 0 1 0;
#P connect 0 0 4 0;
#P connect 16 0 10 0;
#P connect 16 0 20 0;
#P connect 2 1 6 0;
#P connect 6 0 3 0;
#P connect 1 0 0 1;
#P connect 3 0 0 2;
#P connect 8 0 9 0;
#P connect 9 0 11 0;
#P connect 11 0 15 0;
#P connect 15 0 16 0;
#P connect 16 0 18 0;
#P connect 18 0 17 0;
#P connect 16 1 17 0;
#P connect 17 0 19 0;
#P connect 31 0 7 0;
#P connect 30 0 7 0;
#P connect 10 0 7 0;
#P connect 19 0 7 0;
#P connect 20 0 7 0;
#P connect 9 1 12 0;
#P connect 12 0 15 1;
#P connect 9 0 13 0;
#P connect 13 0 15 2;
#P connect 9 1 14 0;
#P connect 14 0 15 3;
#P connect 8 0 21 0;
#P connect 21 0 22 0;
#P connect 22 0 26 0;
#P connect 26 0 27 0;
#P connect 27 0 29 0;
#P connect 27 1 28 0;
#P connect 29 0 28 0;
#P connect 28 0 30 0;
#P connect 21 1 23 0;
#P connect 23 0 26 1;
#P connect 27 2 31 0;
#P connect 21 0 24 0;
#P connect 24 0 26 2;
#P connect 21 1 25 0;
#P connect 25 0 26 3;
#P pop;
#P hidden newobj 28 24 59 9109513 p draw;
#P hidden connect 1 0 0 0;
#P hidden connect 1 0 0 1;
#P hidden connect 0 1 1 0;
#P pop;

On 4/10/07, Gary Lee Nelson wrote:
>
>
>
> On 4/10/07 2:17 PM, “carey dodge” wrote:
>
> > Hi,
> >
> > If you want a circle it is good to go over the formulas for circles…
> > pi(3.14) X r(squared) etc. and the pythagorean theorum… x(squared) X
> > y(squared) = z(squared)
>
> >
>
> And that
>
> >
> > There is a quad panner that comes with max as well as others online.
> > Is there a reason you are making one?
>
> I’ve already built the panner. What I need is something that reflects
> visually that I am dealing with a circle and not a square – like the panners
> in Digital Performer surround mixer.
>
>
> Cheers
> Gary Lee Nelson
> Oberlin College
> http://www.timara.oberlin.edu/GaryLeeNelson
>
>
>

#101482
Apr 10, 2007 at 7:35pm

i saw some really nice 4-8 channel panner with air dispersion and doppler and whatnot built in. It had a circle for its panner and you could control location of object and speaker :D

It was called ambeasonics

http://www.icst.net/

#101483
Apr 10, 2007 at 8:09pm

Here’s an example I found on my travels researching Doppler effect.

http://www.cycling74.com/forums/index.php?t=msg&goto=35451&rid=4874&S=7be15d4227ac13339689aae06327971c&srch=fergal+doppler#msg_35451

I think this might be the sort of thing your after….

Hope that helps,

Mike

#101484
Apr 10, 2007 at 8:29pm

Just what I needed! Thanks.

On 4/10/07 2:49 PM, “nesa” wrote:

> Hello,
>
> jsui is probably the way to go nowdays, but if you like oldskool max,
> you can go the lcd way like in the cartopol helpfile, or use a
> combination of transparent button and pictslider:
>
> #P window setfont “Sans Serif” 9.;
> #P flonum 171 395 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 97 391 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P comment 293 322 131 196617 top: transparent button;
> #P comment 293 308 137 196617 middle: inactive pictslider;
> #P comment 293 294 137 196617 bottom: panel=circle bkg;
> #P user ubutton 291 163 100 100 0 6;
> #P user pictslider 291 163 100 100 0 0 0 0 SliderDefaultKnob.pct 1
> SliderDefaultBkgnd.pct 1 3443 0 -3211314 3276850 1. 1.;
> #P noclick;
> #P newex 148 124 56 196617 clip 0 100;
> #P newex 65 131 56 196617 clip 0 100;
> #P newex 142 169 30 196617 – 50;
> #P newex 76 179 30 196617 – 50;
> #P newex 99 74 40 196617 unpack;
> #P newex 52 286 56 196617 clip 0. 50.;
> #P newex 125 341 47 196617 poltocar;
> #P newex 93 226 47 196617 cartopol;
> #P user panel 291 163 100 100;
> #X brgb 191 191 191;
> #X frgb 181 181 181;
> #X border 1;
> #X rounded 222;
> #X done;
> #P comment 109 288 100 196617 < - max radius;
> #P comment 293 277 100 196617 3 layers:;
> #P connect 4 1 17 0;
> #P fasten 4 1 11 1 167 364 242 364 242 144 386 144;
> #P connect 4 0 16 0;
> #P fasten 4 0 11 0 130 375 254 375 254 155 296 155;
> #P fasten 3 1 4 1 191 292;
> #P fasten 12 2 6 0 356 273 409 273 409 43 104 43;
> #P connect 3 0 5 0;
> #P connect 5 0 4 0;
> #P connect 8 0 3 1;
> #P connect 7 0 3 0;
> #P connect 6 1 10 0;
> #P connect 10 0 8 0;
> #P connect 6 0 9 0;
> #P connect 9 0 7 0;
> #P window clipboard copycount 18;
>
> cheers,
> nesa
>

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

#101485
Apr 10, 2007 at 8:52pm

Indeed, ambisonics is generally the best way to do this kind of
thing, and if you don’t want all of what the icst stuff offers, it is
very simple to implement yourself. Just see the CMJ article by Malham
and Myatt – Malham, D., and Myatt, A. 1995. “3-D Sound Spatialization
Using Ambiosonic Techniques.” Computer Music Journal, 19(4), 58-70.

That doesn’t exactly solve the display issue, but I think it may make
it easier to get there.

Best

L

On 10 Apr 2007, at 20:35, Nicholas C. Raftis III wrote:

> i saw some really nice 4-8 channel panner with air dispersion and
> doppler and whatnot built in. It had a circle for its panner and
> you could control location of object and speaker :D
>
> It was called ambeasonics
> http://www.icst.net/

Lawrence Casserley – lawrence@lcasserley.co.uk
Lawrence Electronic Operations – http://www.lcasserley.co.uk
Colourscape Music Festivals – http://www.colourscape.org.uk

#101486
Apr 10, 2007 at 9:56pm

Quote: Gary Lee Nelson wrote on Tue, 10 April 2007 09:30
—————————————————-
> I am making a control that converts X/Y of a pictslider to location and
> distance for a quad panner. When the control is rectangular, the corners
> come out further away than the edges. Is their a control around that limits
> the slider to a circle?
>
>

You could also pull out the UI from this:

http://homepage.mac.com/mikezed/technology/powermate.html

mz

#101487

You must be logged in to reply to this topic.