// Other Control issues

// In our previous examples, our sliders etc. produced values between 0 and 1 which we then altered
// mathematically. This is fine if you want simple values output, but if you want more complex
// values, for example some sort of exponential response, then the maths can start to get tricky.
// This is where ControlSpec comes in. It will map a range of 0 to 1 onto another range which you 
// specify. This can be done linearly or exponentially. You can also define step sizes and a default 
// value.
(
var w, sl, ctlspec;

w = SCWindow("ControlSpec", Rect(100, 800, 100, 500));
w.front;

ctlspec = ControlSpec.new(0.1, 10, 'exponential', 0.1, 0.1);

sl = SCSlider(w, Rect(5, 5, 50, 450));
sl.action = {
sl.value.postln;
//var val;
//val = ctlspec.map(sl.value);
//val.postln;
};
)

// MIDI Input

// This is done through the MIDIIn object
//
// MIDIIn actions:
// MIDIIn.connect initialises the MIDI port
// MIDIIn.noteOn deals with noteon messages
// MIDIIn.noteOff with noteoff messages
// MIDIIn.control with controller messages
// MIDIIn.polytouch, touch and bend do what you would expect them to do as well!!
//
// For arguments, check out the MIDIIn Class Def (select it and do apple-j)

// Other things to check out
//
// MouseY.kr
// MouseX.kr
// MouseButton.kr
//
// And for the very adventurous
//
// HIDDeviceService