Incidentally, this is a good way of scaling any sort of data (a random number 
in a JavaScript patch, for example) to a particular range.

a|x
http://machinesdontcare.wordpress.com




----- Original Message ----
From: Christopher Wright <[EMAIL PROTECTED]>
To: Barret Hodgson <[EMAIL PROTECTED]>
Cc: [email protected]
Sent: Tuesday, 5 August, 2008 1:43:58 PM
Subject: Re: Scaling Midi Data

> What's the best way of scaling midi data - for example the 0 - 1  
> from the midi to scale to rotational data -360 - 360.


Midi data is typically 0-127, so to scale it to [min, max], use the  
Mathematical Expression patch with the following function:

(midiValue / 127) * (max - min) + min

If it's not 0-127, you'll have to change the "midiValue  127" part a  
bit.

--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/


      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at 
Yahoo! http://uk.docs.yahoo.com/ymail/new.html
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to