Forums > MaxMSP

picture dial creation


January 18, 2007 | 3:19 am

I noticed that you have to have an image for every single value in a picture dial.. this seems like it would be ludicrous to make.. is there any way to make this easier?? I mean even an animated gif would take mere moments to make in comparison to laying out every one of 127 frames in a row, and if somethings off or you want to adjust the look that seems totally insane…

January 18, 2007 | 3:57 am

Wouldn’t there be a way to use ImageReady or something similar to generate the pictures, a la animated GIF? I’m not too sure but it’s possible. There’s also applications out there for just this kind of thing, though I forget the specifics (I remember a similar post awhile back).

I also was surprised to see the number of frames required, it’s a little bit crazy, though it makes some kind of sense given the need for a particular resolution. Lately I’m all about the jsui dials anyway, they have a ton of additional possibilities that aren’t immediately obvious (like changing the dragtracking with Shift, the ability to do rollovers, and nice color / transparency control using javascript / OpenGL. (They may eventually eat up processing / refresh rates too, especially in wireframe, or with anti-aliasing on).

What about a movie-clip dial instead—128 frames of a rotating dial that gets played back based upon the frame number? Use a 3D program to generate the 128 frames of your beautifully-sculpted virtual hardware dial, then use QT playback in Max to scroll thru the frames. For interactivity, use a transparent button over the movie and map the vertical or horizontal coordinates accordingly.

–CJ

January 18, 2007 | 10:19 am

have u tried using QT to export movie as pictures?
it should work fine a slong as u have the right n umber of frames in the movie timeline.

dont know much about imageready, but u can do it in flash with relative speed…

January 18, 2007 | 4:20 pm

If you have Jitter, you could put together an automated image layout
patch. This should be fairly straightforward using the dstdimstart/end
attributes and a counter.

Andrew B.

January 18, 2007 | 4:44 pm

Search the Cycling archives – this has come up a few times before.

Here’s an example of what a Google search turned up:

http://www.mtco.com/~cwtooley/vps/KnobCreator/KnobCreator.htm

There’s a few tools like this out there, and I also remember finding
some pre-made images somewhere…

Dan

At 8:20 AM -0800 1/18/07, Andrew Benson wrote:
>If you have Jitter, you could put together an automated image layout
>patch. This should be fairly straightforward using the
>dstdimstart/end attributes and a counter.
>
>Andrew B.


Dan Nigrin
Defective Records
202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X
http://www.defectiverecords.com
http://www.jackosx.com

January 18, 2007 | 5:09 pm

Quote: Axiom-Crux wrote on Wed, 17 January 2007 20:19
—————————————————-
> I noticed that you have to have an image for every single value in a picture dial.. this seems like it would be ludicrous to make.. is there any way to make this easier?? I mean even an animated gif would take mere moments to make in comparison to laying out every one of 127 frames in a row, and if somethings off or you want to adjust the look that seems totally insane…
>
>
—————————————————-

not exactly true … you can make a dial with 20 pictures
which is outputting values of 0-127, too.

but with something like 64 it will definetly look better of
course.

gimp or photoshop allow you to use script automation for the
creation of image series, the same is true for indesign or coreldraw.

January 18, 2007 | 5:20 pm

Nicholas C. Raftis III wrote:
> I mean even an animated gif would take mere moments to make in
> comparison to laying out every one of 127 frames in a row, and if
> somethings off or you want to adjust the look that seems totally
> insane…

An animated gif is nothing else, a movie is nothing else, and if you
look at the help file the number of frames required to make it work
would be two, though the visusal resolution would not be sufficiant. The
knobs I made have for example 16 or 32 frames…

I am sure it would be possible to translate an animeted gif or a movie
to the Max dial format, the tool for it would be Jitter I guess…

And yes of course Max is totally insane, and if you look at great
artwork which had been done long before computers arose, to do that was
totally insane as well…
I think it took two years to transcribe some of Xenakis visual scores to
scores which are playable by traditionally trained musicians of an
orchestra…

What drives me insane that nobody wants to be insane anymore… ;-)

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
— _|_)—-|—–()————–
———-()——–www.ccmix.com

January 18, 2007 | 5:42 pm

Did I imagine it, or did someone also post a Photoshop
action for this ? Sadly my copy of Crossover has
just expired, so i can’t use KnobCreator ;-(
cheers
Roger

— Dan Nigrin wrote:

> Search the Cycling archives – this has come up a few
> times before.
>
> Here’s an example of what a Google search turned up:
>
>
http://www.mtco.com/~cwtooley/vps/KnobCreator/KnobCreator.htm
>
> There’s a few tools like this out there, and I also
> remember finding
> some pre-made images somewhere…
>
> Dan
>
> At 8:20 AM -0800 1/18/07, Andrew Benson wrote:
> >If you have Jitter, you could put together an
> automated image layout
> >patch. This should be fairly straightforward using
> the
> >dstdimstart/end attributes and a counter.
> >
> >Andrew B.
>
>
> —
> Dan Nigrin
> Defective Records
> 202 Hack / PC-1600 User / VSTi Host / OMS Convert /
> Jack OS X
> http://www.defectiverecords.com
> http://www.jackosx.com
>
>

January 18, 2007 | 5:50 pm

NO, I spend months on my patches, days upon days making them sound and look as good as possible. There is a borderline when its not worth it to achieve an effect. doing 127 frames by hand is tedious and if I were to do multiple dials that way it would be too much of a pain. And I was sure that there must be another way to do this easier, which is why I asked.

I should know, I have a BFA in animation, I have done plenty of drawn frame by frame animations, they took days for a simple 30 frame walk cycle to look good. And I know all about artwork pre-computers, as I paint as well for fun and spend years on my paintings.

don’t give me this talk as if I don’t spend loads of time on my work, its insulting even with a smily at the end.

January 18, 2007 | 6:38 pm

hey Roger, you can try this js for Photoshop.
(hope the attachment will work).
_y.

January 18, 2007 | 6:39 pm

Hi Roger:

You must mean RLH Knob Render – pro and free versions:

http://otiumfx.mirrorz.com/

Dan

At 5:42 PM +0000 1/18/07, ROGER CARRUTHERS wrote:
>Did I imagine it, or did someone also post a Photoshop
>action for this ? Sadly my copy of Crossover has
>just expired, so i can’t use KnobCreator ;-(
>cheers
>Roger
>
>— Dan Nigrin wrote:
>
>> Search the Cycling archives – this has come up a few
>> times before.
>>
>> Here’s an example of what a Google search turned up:
>>
>>
>http://www.mtco.com/~cwtooley/vps/KnobCreator/KnobCreator.htm
>>
>> There’s a few tools like this out there, and I also
>> remember finding
>> some pre-made images somewhere…
>>
>> Dan
>>
>> At 8:20 AM -0800 1/18/07, Andrew Benson wrote:
>> >If you have Jitter, you could put together an
>> automated image layout
>> >patch. This should be fairly straightforward using
>> the
>> >dstdimstart/end attributes and a counter.
>> >
>> >Andrew B.
>>
>>
>> –
>> Dan Nigrin
>> Defective Records
>> 202 Hack / PC-1600 User / VSTi Host / OMS Convert /
>> Jack OS X
>> http://www.defectiverecords.com
>> http://www.jackosx.com
>>
>>
>


Dan Nigrin
Defective Records
202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X
http://www.defectiverecords.com
http://www.jackosx.com

January 18, 2007 | 6:43 pm

Im going to try andrews suggestion, Ill post it when Im done

January 18, 2007 | 6:46 pm

I use mac btw, none of these dial tools are for mac it seems.

January 18, 2007 | 6:47 pm

gusano, your js didn’t come through

January 18, 2007 | 6:52 pm

Me too, but the Photoshop script should work.
Thanks Dan and e.g.r. both,
cheers
Roger
— "Nicholas C. Raftis III"
wrote:

>
> I use mac btw, none of these dial tools are for mac
> it seems.
> –
> -=ili!ili=- http://www.Axiom-Crux.net -=ili!ili=-
>

January 18, 2007 | 7:11 pm

On 1/18/07, Nicholas C. Raftis III wrote:
>
>
> your js didn’t come through

try this one:
http://scp.web.elte.hu/synthedit/scripts/ps_rotate_layer.ZIP

January 18, 2007 | 7:17 pm

sadly I don’t have cs2, and also the difficult part for me is not the rotation, its actually making the large film strip with exact offsets, but as I said Im going to try making that in jitter as per andrews suggestion.

Thanks though!

January 18, 2007 | 7:33 pm

>Lately I’m all about the jsui dials anyway, they have a ton of >additional possibilities that aren’t immediately obvious (like >changing the dragtracking with Shift, the ability to do >rollovers, and nice color / transparency control using >javascript / OpenGL

Do you have any jsui examples that demonstrate these things.
I have always wanted to do rollovers and transparency.

Anthony

January 18, 2007 | 8:11 pm

My only issue with js, (besides trying to run a ton of them and
having performance/memory issues.. :( ), is that you cannot create
pulldown menus like ubumenu that overflow their normal box/bounds.
This makes it hard to stack a bunch of menus, or have a small UI with
lots of options.

On Jan 18, 2007, at 2:33 PM, Anthony Palomba wrote:

>
>> Lately I’m all about the jsui dials anyway, they have a ton of
>> >additional possibilities that aren’t immediately obvious (like
>> >changing the dragtracking with Shift, the ability to do
>> >rollovers, and nice color / transparency control using
>> >javascript / OpenGL
>
> Do you have any jsui examples that demonstrate these things.
> I have always wanted to do rollovers and transparency.
>
>
>
> Anthony

v a d e //

http://www.vade.info
abstrakt.vade.info


wak
January 18, 2007 | 8:55 pm

Have you considered Creating a background image and drawing the dial/pointer on top?
The archives contain this example of a dial in lcd:

http://www.tiny.cc/Qy2O4

or

http://www.cycling74.com/forums/index.php?t=msg&goto=33558&rid=2841&S=66c4d79b80a19eaca2d88054904eb0f0&srch=lcd+dial#msg_33558

January 18, 2007 | 9:23 pm

Here’s the basic structure to load a matrix with 127 frames (100×100
px). From there you should be able to fill in the rest.

Cheers,
Andrew B.

#P button 80 94 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 80 138 44 196617 uzi 128;
#P newex 80 177 129 196617 jit.matrix 4 char 100 100;
#P newex 114 255 38 196617 * 100;
#P newex 166 286 31 196617 + 99;
#P newex 114 350 90 196617 pack 0 100 0 100;
#P message 114 371 172 196617 dstdimstart $1 $2 , dstdimend $3 $4;
#P newex 114 395 206 196617 jit.matrix 4 char 12700 100 @usedstdim 1;
#P connect 7 0 6 0;
#P fasten 5 0 0 0 85 388 119 388;
#P connect 6 2 4 0;
#P connect 6 0 5 0;
#P connect 1 0 0 0;
#P connect 4 0 2 0;
#P fasten 4 0 3 0 119 276 171 276;
#P connect 3 0 2 2;
#P connect 2 0 1 0;
#P window clipboard copycount 8;

January 19, 2007 | 1:22 am

Check out the jsui help, specifically the one for the 3D dial (second from left). Copy the object and put it into a new patch. Right-click and the popup should allow you to edit jsui_3ddial.js. If you’re going to mess around with the script, SAVE IT using another name so the default Max script is unaffected!

The text editor is sufficient for simple stuff, though of course you could use jedit or something else.

For the fine-tuning of mouse dragging (which is already included), check out the end of the script:

function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
{
var f,dy;

// calculate delta movements
dy = y – last_y;
if (shift) {
// fine tune if shift key is down
f = val – dy*0.001;
} else {
f = val – dy*0.01;
}
msg_float(f); //set new value with clipping + refresh
// cache mouse position for tracking delta movements
last_x = x;
last_y = y;
}

Failry straightforward, plus you can add something– I added

if (cmd) { etc…. made it coarser than normal for fast tracking). }

Transparency is managed in openGL (which is what the jsui uses for drawing these objects) using RGBA, where A is alpha level. All values are 0.0 to 1.0, so a color setting of (1.0,0.0,0.0,0.5) means fully red, but half-transparent. You can scale the RGB values of 0-255 to 0.0 – 1.0 (zmap) before going into the jsui, or do it in the js script itself (as seen below).

Don’t know much about javascript but it’s pretty user-friendly I guess. Max provides a great shell for it through the jsui… note that these don’t have to be restricted to dials and sliders, they could be anything! The great advantage is the multiple mouse controls that are manageable and the transparency. The downside is that they’re significantly more processor-intensive.

To get values into the jsui from Max, look at this:

function brgb(r,g,b)
{
vbrgb[0] = r/255.;
vbrgb[1] = g/255.;
vbrgb[2] = b/255.;
draw();
refresh();
}

the message from Max is brgb(0,0,0). These values get scaled and set to the js internal variables vbrgb[0],[1],[2]. They are then used to set the colors.

Really powerful stuff, since you can use ANY declared variable within js—simply create a function var_name(arguments), and set it from Max with a message and the appropriate arguments. Furthermore, checking the "messages for jsui" popup in Max will keep track of all the functions available–including ones you’ve added yourself.

Hope that helps, I’ll post an example shortly.

–C

January 23, 2007 | 2:44 pm

performance issues aside, you can always resize the jsui object at
will to accommodate whatever you need to draw in it. i keep thinking
about coding an ubumenu jsui, maybe someday soon. i’ve actually
written what amounts to an entire GUI app (3000+ lines of code!)
inside a jsui that runs very fast, in order to get around the
performance hit of having many separate jsuis.

cheers
evan

On Jan 18, 2007, at 8:11 PM, vade wrote:

> My only issue with js, (besides trying to run a ton of them and
> having performance/memory issues.. :( ), is that you cannot create
> pulldown menus like ubumenu that overflow their normal box/bounds.
> This makes it hard to stack a bunch of menus, or have a small UI
> with lots of options.
>
> On Jan 18, 2007, at 2:33 PM, Anthony Palomba wrote:
>
>>
>>> Lately I’m all about the jsui dials anyway, they have a ton of
>>> >additional possibilities that aren’t immediately obvious (like
>>> >changing the dragtracking with Shift, the ability to do
>>> >rollovers, and nice color / transparency control using
>>> >javascript / OpenGL
>>
>> Do you have any jsui examples that demonstrate these things.
>> I have always wanted to do rollovers and transparency.
>>
>>
>>
>> Anthony
>
> v a d e //
>
> http://www.vade.info
> abstrakt.vade.info
>
>
>

January 23, 2007 | 6:00 pm

Id be interested in seeing that JSUI app. I might end up getting into Javascript soon, though for the time Ive got plenty hands full with max/msp/jitter.

I finally made a dial/slider pict maker so that I can make sliders in after effects and then load them and distribute them into left to right frames and export to pict.. its super messy at the moment (Ill probably make it nicer soon) but for what its worth here it is:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 41 120 84 196617 exportimage tiff;
#P newex 41 538 118 196617 jit.scissors @columns 8;
#P newex 398 540 118 196617 jit.scissors @columns 8;
#P user jit.pwindow 579 576 534 90 0 1 0 0 1 0;
#P user jit.pwindow 30 577 534 90 0 1 0 0 1 0;
#P newex 170 539 222 196617 jit.scissors @columns 16;
#P message 40 99 86 196617 exportimage pict;
#P button 368 329 15 0;
#P message 208 182 75 196617 matrixcount $1;
#P number 170 181 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 152 205 82 196617 outputmatrix $1;
#P user jit.pwindow 457 380 730 156 0 1 0 0 1 0;
#P newex 237 159 64 196617 prepend dim;
#P newex 121 450 66 196617 prepend size;
#P newex 230 131 43 196617 pak 0 0;
#P user jit.pwindow 207 461 192 52 0 1 0 0 1 0;
#P comment 129 79 21 196617 go;
#P newex 381 350 38 196617 * 100;
#P newex 357 376 43 196617 pak 0 0;
#P comment 266 83 42 196617 hsize;
#P number 265 99 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 217 84 42 196617 vsize;
#P number 170 100 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 49 79 69 196617 importmovie;
#P newex 294 279 27 196617 – 1;
#P number 222 99 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 135 100 15 0;
#P newex 135 144 44 196617 uzi 128;
#P newex 140 237 164 196617 jit.matrixset 128 4 char 100 100;
#P newex 189 278 38 196617 * 100;
#P newex 273 305 31 196617 + 99;
#P newex 189 330 156 196617 pack 0 0 0 0;
#P message 189 401 172 196617 dstdimstart $1 $2 , dstdimend $3 $4;
#P newex 190 435 200 196617 jit.matrix 4 char 100 3200 @usedstdim 1;
#P comment 169 83 42 196617 frames;
#P connect 7 2 25 0;
#P connect 21 0 19 0;
#P fasten 22 0 6 0 242 232 145 232;
#P fasten 20 0 21 0 235 228 126 228;
#P connect 20 0 22 0;
#P connect 12 0 7 1;
#P fasten 12 0 26 0 175 131 213 131;
#P fasten 12 0 17 0 175 203 386 203;
#P connect 9 0 5 1;
#P connect 9 0 20 0;
#P fasten 9 0 10 0 227 125 299 125;
#P fasten 9 0 27 0 227 122 373 122;
#P fasten 9 0 17 1 227 124 414 124;
#P connect 14 0 20 1;
#P fasten 14 0 3 3 270 218 338 218;
#P connect 14 0 16 0;
#P connect 17 0 16 1;
#P fasten 16 0 1 0 362 420 195 420;
#P connect 34 0 1 0;
#P connect 33 1 30 0;
#P connect 29 0 33 0;
#P connect 8 0 7 0;
#P fasten 26 0 6 0 213 203 145 203;
#P connect 24 0 6 0;
#P connect 11 0 6 0;
#P fasten 25 0 24 0 175 202 157 202;
#P connect 1 0 29 0;
#P connect 25 0 5 0;
#P connect 5 0 3 0;
#P connect 3 0 2 0;
#P fasten 6 0 1 0 145 427 195 427;
#P connect 28 0 1 0;
#P connect 2 0 1 0;
#P fasten 6 0 19 0 145 453 213 453;
#P fasten 5 0 4 0 194 300 278 300;
#P connect 4 0 3 2;
#P connect 10 0 4 1;
#P connect 27 0 17 0;
#P connect 29 15 32 0;
#P fasten 1 0 23 0 195 528 438 528 438 361 463 361;
#P connect 32 7 31 0;
#P window clipboard copycount 35;

September 14, 2007 | 4:59 pm

I like illustrator for making knobs, as the indicator rotation is easy to do there. I can send an .ai file on request.

P.

September 15, 2007 | 12:59 am

I think there is something to be gained from not always looking for the fastest/easiest solutions in max. I made this little interface as a test in Lightwave and compiled by had in Photoshop. Yes it took ages and yes i realised afterwards that the knobs were not quite centered on my rendering but i think it still looks quite nice. Please feel free to have a look but please don’t steal it i might just want to use it one day!

best,

J x.

September 15, 2007 | 1:34 am

Very nice! Even if the centering isn’t perfect, it’s a really engaging GUI and I like the color change to indicate relative value.

EH

September 25, 2007 | 8:46 am

That is lovely. I was just starting to get discouraged by the effort involved in thinking up a pretty UI and I feel all fired-up again now! I like the slight wobblyness in the dials, it makes it feel more analogue.

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

Forums > MaxMSP