Forums > MaxMSP

Sort of Simple Question

April 12, 2007 | 4:13 pm

Hey everyone,

I’m new to the forum and I understand the whole RTFM idea, and I have. I’ve taken a class on MAX, designed a rather extensive ear trainer for the computer labs in my program at NYU, and I’ve just started experimenting with using the Nintendo Wii Remote as an external controller (which is awesome. The patch to use is aka.WiiRemote, if anyone’s interested).

However, I’ve been stumped by something really simple. As part of the ear trainer I’ve made, I’m trying to allow the user to check and uncheck the intervals that will be played in the interval section of the ear trainer. Then I need to select one from that list at random.

What I need is a way to pick a random number from a list.

I’ve tried mixing "bag" and "coll," and I’ve looked into the Alea Max objects (though I can’t seem to fid the original Alea, just more specific ones like alea-lin and such).

I have to be overlooking something really obvious. In the "table" help file, it has a Bang labeled random, but I can’t figure that out either.

Any suggestions would be greatly appreciated. Thanks

Rob


April 12, 2007 | 5:26 pm

something like this should do the job:

#P newex 126 92 27 9109513 + 1;
#P newex 126 179 26 9109513 print;
#P newex 126 114 27 9109513 t b i;
#P button 126 52 15 0;
#P newex 126 70 52 9109513 random 16;
#P message 126 136 293 9109513 this is obviously a list with symbols and some ints 34 6 23 6 7 3245;
#P newex 126 156 38 9109513 zl nth 3;
#P connect 6 0 4 0;
#P connect 2 0 6 0;
#P connect 3 0 2 0;
#P connect 0 0 5 0;
#P connect 4 0 1 0;
#P connect 4 1 0 1;
#P connect 1 0 0 0;

Mattijs

Quote: rjy211@nyu.edu wrote on Thu, 12 April 2007 18:13
—————————————————-
> Hey everyone,
>
> I’m new to the forum and I understand the whole RTFM idea, and I have. I’ve taken a class on MAX, designed a rather extensive ear trainer for the computer labs in my program at NYU, and I’ve just started experimenting with using the Nintendo Wii Remote as an external controller (which is awesome. The patch to use is aka.WiiRemote, if anyone’s interested).
>
> However, I’ve been stumped by something really simple. As part of the ear trainer I’ve made, I’m trying to allow the user to check and uncheck the intervals that will be played in the interval section of the ear trainer. Then I need to select one from that list at random.
>
> What I need is a way to pick a random number from a list.
>
> I’ve tried mixing "bag" and "coll," and I’ve looked into the Alea Max objects (though I can’t seem to fid the original Alea, just more specific ones like alea-lin and such).
>
> I have to be overlooking something really obvious. In the "table" help file, it has a Bang labeled random, but I can’t figure that out either.
>
> Any suggestions would be greatly appreciated. Thanks
>
> Rob
—————————————————-


April 12, 2007 | 6:33 pm

On 12 Apr 2007, at 18:26, Mattijs Kneppers wrote:

>
> something like this should do the job:
>

Or have a look at Karlheinz Essel’s RTC Lib (link on maxobjects.com)

david


April 12, 2007 | 6:37 pm


April 14, 2007 | 10:03 am

>
> What I need is a way to pick a random number from a list.
>

here is another way just with coll, listfunnel and random

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 141 343 32 196617 print;
#P button 295 236 15 0;
#P newex 296 259 52 196617 random 7;
#P newex 141 279 52 196617 listfunnel;
#P message 141 257 79 196617 1 2 3 4 5 6 7 8;
#N coll ;
#P newobj 141 311 53 196617 coll;
#P fasten 3 0 0 0 301 303 146 303;
#P connect 4 0 3 0;
#P connect 0 0 5 0;
#P connect 2 0 0 0;
#P connect 1 0 2 0;
#P window clipboard copycount 6;


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