[sc-users] changing a gui slider with a midi function
Neil Cosgrove
neil_cosgrove at hotmail.com
Thu Apr 17 11:37:57 PDT 2008
sorry left off the subject.
From: neil_cosgrove at hotmail.com
To: sc-users at create.ucsb.edu
Date: Thu, 17 Apr 2008 18:36:28 +0000
Subject: [sc-users] (no subject)
// why can't you set the value of a slider within a midi function?
// and how do you do it?
(
var window, mySlider;
window = SCWindow.new("",Rect(318, 356, 400, 400)).front;
mySlider=SCSlider.new(window,Rect(38, 27, 100, 20));
mySlider.value=1; // why does this work
MIDIClient.init;
MIDIIn.connect(0, MIDIClient.sources[0]);
MIDIIn.control = { arg src, chan, num, val;
mySlider.value=val/127; // and this doesn't ?
};
)
Regards
Neil
A prize an hour, 24 hours a day. Try Big Snap now!
_________________________________________________________________
Amazing prizes every hour with Live Search Big Snap
http://www.bigsnapsearch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.create.ucsb.edu/pipermail/sc-users/attachments/20080417/18a4526e/attachment.html
More information about the sc-users
mailing list