Randomise Object?

Discuss Lemur and share techniques.
Post Reply
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

Randomise Object?

Post by whatisvalis »

Hi

I can randomize a bi-polar knob via the following switch script

Knob.x=rand();

How can I limit the range of randomization + or - a certain amount from 64?

Thanks!
rad3d
Newbie
Posts: 32
Joined: 27 Nov 2015 04:15

Re: Randomise Object?

Post by rad3d »

Here's a quick and dirty example using a button. Every time you push the button, you'll get a random number within +/-4 of 64. Change the values in the script to expand the range.
Attachments
random-test.jzml
(1.79 KiB) Downloaded 141 times
MrCorba
Regular
Posts: 142
Joined: 02 Sep 2013 20:17
Location: Netherlands

Re: Randomise Object?

Post by MrCorba »

Another solution is using the rang() function

Just use Knob.x = range(rand(),min,max) This ranges the random function between the min and max of your choice.

Cheers!
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

Re: Randomise Object?

Post by whatisvalis »

Thank You!
digitalson
Regular
Posts: 143
Joined: 21 Mar 2015 02:26

Re: Randomise Object?

Post by digitalson »

And how can u put time in there and say include or exclude values such as note nums?
digitalson
Regular
Posts: 143
Joined: 21 Mar 2015 02:26

Re: Randomise Object?

Post by digitalson »

Also can u randomise the times between note switches ,,,this would be cool for me to automate cuts and fades for a video program ,I can automate cameras random with different fades and cuts ,it uses midi note nums,,,but I would need to input the note nums and like a speed setting in secs but have a variable range plus or minus 2 secs
Post Reply