Forums > MaxMSP

How To Sequence A Number Of Variables Over Time

July 21, 2008 | 2:01 pm

Hello there,
I am looking to sequence a number of variables that would be output to a dmx controller that would be sent over a certain number of seconds (20 for example).

These variables are in the dmx format where the first integer refers to the channel and the second being the value – for example [1,230] or [5,123].

So in simple terms, I would like as an example;

1,128 2,43 3,59 4,12 to be sent at 1 second.
1,0 2,0 3,0 4,0 to be sent at 2 seconds.
1,255 2,255 3,255 4,255 to be sent at 3 seconds.
1,0 2,0 3,0 4,0 to be sent at 4 seconds.

Now I looked at using the timeline in the older versions of Max and it was perfect, although I upgraded to 5.0 and the timeline has been removed, but I’ve heard about it being very buggy and not very useful so I am looking for an alternative.

Thanks,
Neak.


July 21, 2008 | 2:10 pm

For this sort of thing I’d be inclined to use coll with a metro.

Something like below. Salt to taste.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 105 274 30 196617 pack;
#P newex 106 182 112 196617 unpack 0 0 0 0 0 0 0 0;
#N counter 0 4;
#X flags 0 0;
#P newobj 94 92 66 196617 counter 0 4;
#P newex 96 65 37 196617 metro;
#N coll dmx 1;
#P newobj 109 154 57 196617 coll dmx 1;
#P connect 0 0 3 0;
#P connect 3 7 4 1;
#P connect 3 6 4 0;
#P connect 3 5 4 1;
#P connect 3 4 4 0;
#P connect 3 3 4 1;
#P connect 3 2 4 0;
#P connect 3 1 4 1;
#P connect 3 0 4 0;
#P connect 2 0 0 0;
#P connect 1 0 2 0;
#P window clipboard copycount 5;

(Writing from my Max4 machine)

– P.


July 21, 2008 | 2:22 pm

If you feel like getting into rtcmix~ at all, this task could be done
very easily. Here’s the script:

MAXMESSAGE(1, 1,128 2,43 3,59 4,12)
MAXMESSAGE(2, 1,0 2,0 3,0 4,0)
MAXMESSAGE(3, 1,255 2,255 3,255 4,255)
MAXMESSAGE(4, 1,0 2,0 3,0 4,0)

and of course you could set up all kinds of arrays/looping constructs
within the language.

note: rtcmix~ ‘sort of’ works w/ Max5 on OSX (I think it’s broken on
windows) Max5); it awaits the SDK for complete MAx5 finish/debugging.

brad

http://music.columbia.edu/~brad

On Jul 21, 2008, at 10:01 AM, Neak wrote:

>
> Hello there,
> I am looking to sequence a number of variables that would be output
> to a dmx controller that would be sent over a certain number of
> seconds (20 for example).
>
> These variables are in the dmx format where the first integer
> refers to the channel and the second being the value – for example
> [1,230] or [5,123].
>
> So in simple terms, I would like as an example;
>
> 1,128 2,43 3,59 4,12 to be sent at 1 second.
> 1,0 2,0 3,0 4,0 to be sent at 2 seconds.
> 1,255 2,255 3,255 4,255 to be sent at 3 seconds.
> 1,0 2,0 3,0 4,0 to be sent at 4 seconds.
>
> Now I looked at using the timeline in the older versions of Max and
> it was perfect, although I upgraded to 5.0 and the timeline has
> been removed, but I’ve heard about it being very buggy and not very
> useful so I am looking for an alternative.
>
> Thanks,
> Neak.


July 21, 2008 | 2:35 pm

Quote: Peter Castine wrote on Mon, 21 July 2008 08:10
—————————————————-
> For this sort of thing I’d be inclined to use coll with a metro.
>
> Something like below. Salt to taste.
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 105 274 30 196617 pack;
> #P newex 106 182 112 196617 unpack 0 0 0 0 0 0 0 0;
> #N counter 0 4;
> #X flags 0 0;
> #P newobj 94 92 66 196617 counter 0 4;
> #P newex 96 65 37 196617 metro;
> #N coll dmx 1;
> #P newobj 109 154 57 196617 coll dmx 1;
> #P connect 0 0 3 0;
> #P connect 3 7 4 1;
> #P connect 3 6 4 0;
> #P connect 3 5 4 1;
> #P connect 3 4 4 0;
> #P connect 3 3 4 1;
> #P connect 3 2 4 0;
> #P connect 3 1 4 1;
> #P connect 3 0 4 0;
> #P connect 2 0 0 0;
> #P connect 1 0 2 0;
> #P window clipboard copycount 5;
>
> (Writing from my Max4 machine)
>
> — P.
>
—————————————————-

Thanks I’ll look into this.

I won’t be able to use rtcmix as I’m using Windows, thanks anyway.


July 21, 2008 | 2:41 pm

On Jul 21, 2008, at 10:35 AM, Neak wrote:

> I won’t be able to use rtcmix as I’m using Windows, thanks anyway.

Coming soon… (I hope!)

brad

http://music.columbia.edu/~brad


July 22, 2008 | 3:37 pm

Another option would be to use qlist. It allows you to sequence
commands so that they occur at specific times or relative times.


July 22, 2008 | 3:45 pm

Quote: Anthony Palomba wrote on Tue, 22 July 2008 09:37
—————————————————-
> Another option would be to use qlist. It allows you to sequence
> commands so that they occur at specific times or relative times.
—————————————————-

That’s perfect, just had a play around with it and it works perfectly thanks.


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