[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] disabling mouse tracking
- To: sc-users@xxxxxxxxxxxxxxxx
- Subject: Re: [sc-users] disabling mouse tracking
- From: "Артём Попов" <artfwo@xxxxxxxxx>
- Date: Tue, 2 Dec 2008 20:13:26 +0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=qEdIYZI8LVUwWq4UK3W9lw+3mpJ3yIVt126TY/UqkAg=; b=xct8JL9mtPePzt7YEWQLkLuefVPz2JQ/HnH8MdJlRU+JGgO7THPZ8C52zJo2ysccCB W15sxbnUU3swC1AKjeMxl8S44mRc3P2SsW8XQG/ZWvBKOZrRRBKgsoGtd4NyvGWLtyiM bbY14glA3Tp7e8WAGoORWJGEKXcqNNayUg7/Q=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Vr53FLoKn9UOweUDWGDdAVR/S/9yFl4Wf3Gdhp0lY2lnxGBqAXOV53gKF3/8UQukkK iCuHIjvd/rByRUbjOM32SMkOBnkLsS6RzR9+i71eFt8GtDU8ygC6HKFHlSWHS7sLe8NB kElZ0EFKZcRb36+0xExaQ/Ib3c74gYD8+Mw6E=
- In-reply-to: <286e6b7c0812010936gce5da97j94560e4e1ffb2120@xxxxxxxxxxxxxx>
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- References: <AF8AAFC8-2BD6-4D8D-B2F4-1FC9B769BC7E@xxxxxxxxx> <286e6b7c0812010936gce5da97j94560e4e1ffb2120@xxxxxxxxxxxxxx>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
I have done something simular in the past using Latch (sample and
hold), here's a modified example by Dan:
(
{
var freq;
freq = Latch.kr(MouseX.kr(100, 1000, 1), KeyState.kr(17));
Pulse.ar(freq, 0.5, 0.02).dup;
}.play;
)
But also check the lag parameter for KeyState ugen (the default value
prevents typing too quickly)
2008/12/1 Dan Stowell <danstowell@xxxxxxxxx>:
> Try this:
>
> (
> x={
> var mx, toggle, freq;
> mx = MouseX.kr(100, 1000, 1);
> toggle = ToggleFF.kr(Trig1.kr(KeyState.kr(17), 0.001));
> freq = if(toggle <= 0, mx, 100);
> Pulse.ar(freq, 0.5, 0.02).dup;
> }.play
> )
>
>
> 2008/12/1 Uri Sala <urisala@xxxxxxxxx>:
>> Hi everybody,
>> I would like to be able to enable and disable mouse tracking just pressing
>> one key. For example: I have a synth with a SinOsc whose frequency is
>> controlled by MouseX.kr. I would like to be able to press 't' and that the
>> frequency stays wherever it is even if I move the mouse, then pressing 't'
>> to enabling tracking again. Any ideas?
>> thx
>> Uri
>>
>> _______________________________________________
>> sc-users mailing list
>>
>> info (subscription, etc.):
>> http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
>> archive: https://listarc.bham.ac.uk/marchives/sc-users/
>> search: https://listarc.bham.ac.uk/lists/sc-users/search/
>>
>
>
>
> --
> http://www.mcld.co.uk
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://listarc.bham.ac.uk/lists/sc-users/search/
>
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/