View Full Version : scaling values?

03-08-2009, 12:37 AM
Hi Camille,

The new version 2.8 description includes:

You can now change the scalings for each individual messages. Just click the page curl icon on the top right to edit the input and output min / max ranges.

I think this is the feature we discussed a while back that will allow me to scale values such as the Wii Pitch to something other than 0-1. But from this description, I can\'t figure out how to do it. Can you explain in more detail?


Philip van Allen

03-08-2009, 01:07 AM
Okay, found it!

To change the scaling of values on an incoming OSC message, click on the page curl icon in the main interface that\'s just to the right of the Chan. column and under the Wiimote Drawer. Clicking on this will show incoming min/max, and outgoing min/max values (Camille, what does \"Cap\" do?).

So for example, if you want to scale the values coming from the Wii Pitch (which by default are fractional numbers from 0 to 1) to be in a range of 0 to 127 for midi you would change the Out. min value to 1.0 and the Out. max value to 127. Similarly, if you wanted values from 80 to 100, set the Out. min to 80, and Out. max to 100.

If any of you want to use Osculator with Flash, check out Art Center\'s Media Design Program tools, NET Lab Toolkit:


This set of Flash components allows you to use Osculator (and sensors connected to a Make Controller) with Flash with no programming.

03-08-2009, 11:22 PM
Hello Philipp,

Camille, what does \"Cap\" do?

I am very sorry for the lack of documentation. As I previously said, I am rewriting the user\'s manual, and it should be ready by the end of the month.

Cap is an option that restricts input values given by the bounds specified by Input Min and Input Max. So for example, if you set input min to 0 and input max to 1, you can expect that events will be processed only for those values, and will not receive values that are under 0 or higher than 1.

This can allow you make customs splits of input values.

To understand that easily, select an argument (for example the roll argument of pry), and do the Split command (found in Edit->Split). Now go to the scalings page. You will see that the argument has been duplicated and assigned custom scaling values that split the input at 0.5. Because the Cap is set, only one out of the two duplicated is active at a time.

Just one thing: what you are saying about scaling the values for MIDI is not true when you are using the internal events in OSCulator like MIDI CC. MIDI CC events accepts values from 0 to 1. This is because it would be inconsistent and inconvenient to edit the scalings every time you would like to use another type of event. Take this as a convention: every OSC input should be from 0 to 1 and every events are taking arguments that go from 0 to 1, but you are free to scale them if you want more sensitivity or a different behaviour.

However, if you are forwarding values with OSC, this is true that you may want to scale the values, hence the scalings feature you have requested (so long ago!).

There are clever things that can be done if you choose the scalings values wisely. For example, nothing restricts you from choosing inverted output values, eg. a min value that is lower than the max. In this case, the output is simply inverted.

Thanks for the NET Lab Toolkit, I think it is a great framework.

I am curious about how the DMX feature works, tho. Could you please elaborate a bit?



03-10-2009, 01:05 AM
Hi Camille,

Understood about the MIDI example - Yes, I\'m more oriented towards OSC forwarding, and that\'s where I\'ll use this.

Regarding the NET Lab Toolkit & DMX:

DMX is kind of like MIDI for lighting, and is the standard used in most music and stage events to computer control lighting. It runs over 3 wire low voltage cables to control high voltage lighting equipment - dimmers, RGB LED lights, scanners (lights with motorized mirrors that can be pointed), etc.

The NET Lab Toolkit allows applications running in Flash communicate with DMX, instead of say, using a lighting console. It works through a MAX/MSP application called MediaControl, which can be used independently of Flash. So for example, you could use Osculator and send OSC messages to MediaControl and make a stage full of lights turn on. The MediaControl app uses a plug-in that communicates with a USB -> DMX protocol adapter called the DMX USB PRO:


The MAX/MSP plugin I use is:


BTW, I\'m in the process of porting the NET Lab Toolkit to ActionScript 3, and will have that version out in a month or so.


03-10-2009, 01:18 AM
P.S. here is the documentation for MediaControl and the OSC strings to send to it:



03-10-2009, 09:01 PM
That is great, thanks for making this toolkit available!

(PS: I\'ve blogged on it)

04-13-2009, 04:28 AM
Does this mean that the Scaling will not work for MIDI values? I am trying to use MIDI values as substitutes for literals in SysEx data and only want MIDI control values between 0 and 7 to be sent to my application (SuperCollider). Is there anyway to scale the MIDI output values for a specific purpose?


04-13-2009, 10:28 AM
Hi Carl,

The scaling feature is not dependent of the output event. You can use it with anything as long as your

If I understand well, you only want values from 0 to 7 to be sent, but no scaling to occur, right?

For this, knowing that input values are ranged from 0 to 1 (99% of the time, if usure use the Console Log), you have to find the upper limit where you want clipping to occur. This will be 7 divided by 127 times 1 (the input range), which is roughly 0.006.

So, in the scaling page, enter 0 for Input Min, 0.006 in Input Max, and check the Cap checkbox to ensure the input is clipped at those values. Enter the same (0 and 0.006) in output Min and Max to ensure the signal won't be scaled but only clipped.

This should work as expected.



PS: if you cross this feature with 'presets' you can change the scalings values on the fly … Enjoy!

04-13-2009, 10:01 PM

Thanks for your quick response. I tried what you suggested and it is working as you said it would. What if I did want to scale the values so that the full range of 0 - 1 was coming in as OSC but that full range was spread out (or constricted?) to MIDI values between 0 - 7? How would that work?

Again, thanks for your all your help,


04-13-2009, 10:44 PM
You know what, I think I figured it out. I set the In Min. to 0.0 and In Max. to 1.0 then I set the Out Min. to 0.0 and the Out Max to 0.059 which then outputs values between 0 and 7 in MIDI when I set the smoothness to 0. It is working, but is this the way you would recommend doing it?

Thanks So Much, The software, and you, are really helpful,


04-14-2009, 04:02 PM
This is the way I would have done it.

Thanks for the nice comment :-)