The kslider and the coll objects.

Dr. Spankenstein's icon

Can someone suggest a more efficient way of the following:

I select one or more notes on the kslider which then get fed into a coll object.

The coll object can then be told to output a random note (as a number) based on the kslider data fed into it?

This is the method I currently use, but as you can see it is not efficient. Although it works, it sends out too much data for one random selection.

Max Patch
Copy patch and select New From Clipboard in Max.

Thanks

Luke Hall's icon

There are a few problems with your patch. You aren't getting random numbers from your [coll] because you are always sending the "next" message. You are sometimes getting more than one value because your [uzi] is triggering "next" between 1 and 4 times as set by the [random] object.

Here is the method I would attempt using [table] instead of [coll] because [table] outputs a random number from its contents on receiving a bang. I have also added a simple method of octave scaling. If you are interested in generating "random" music in this way I would suggest looking at Karlheinz Essl's Real Time Composition Library which is a number of abstractions and externals for creating generative music. It is very helpful if you want to explore creating more "musical" melodic and rhythmic patterns. You can find a link to download it on maxobjects.com

lh

Max Patch
Copy patch and select New From Clipboard in Max.

Dr. Spankenstein's icon

The table object... Brilliant!

I am familiar with the Essl Realtime Library but I'm not gonna use it for this patch.

Thanks for the info and your help. :)