[sc-users] changing a gui slider with a midi function

nescivi nescivi at gmail.com
Thu Apr 17 11:46:22 PDT 2008


Hiho,

On Thursday 17 April 2008 14:37:57 Neil Cosgrove wrote:
> sorry left off the subject.

and did not start a new message.

for your problem:
you need to use
.defer
to put the action on the AppClock.

sincerely,
Marije

>
> 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




More information about the sc-users mailing list