[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] quick question regarding Pause.kr
- To: sc-users@xxxxxxxxxxxxxxxx
- Subject: Re: [sc-users] quick question regarding Pause.kr
- From: casey anderson <casey.thomas.anderson@xxxxxxxxx>
- Date: Wed, 22 Jul 2009 12:11:19 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=2MdB/wQFOAKdDcJ0P323wBAQ8GhyVEDbRXK3qkuK38A=; b=MlBrt+N3smtGMqyvWjtrWg63rzeYV8zYLwkF8M9L3jZ75eOqsSpf84PpK43fIaJYuQ vdNvAJaPcIa8/aVYKmz131G2bOwyar3u+Vm5uwiwXK2HQfy3OqAQzPVOgjMkC96J4rW5 mjKmsvyRvLK9oGPWBOp7CGTFQMPMf63QyB+FQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=M5q2iBj4dravV9pbukGacj5dKITOjyPL4NXRIz3Q2/Zacofzwgx/Pt0bqSZNqbpzMt a6SsAB146XbWopD1myZ47Tc3Swf5FDCd6wGbOBc/vzkXwAoh23vlJEPjAytY8L0nOzif HB5+FCsyvCR/OV2uak4tevw7nwGZoAYOqbWCU=
- In-reply-to: <200907221345.49979.nescivi@xxxxxxxxx>
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- References: <4e5a2b840907212027o15d09104h2477a6c234e0583e@xxxxxxxxxxxxxx> <200907221345.49979.nescivi@xxxxxxxxx>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
actually, the only reason im using that nodeID is because the help
file for Pause.kr seemed to suggest that one needs to hard code the
nodeID for the synth, however, im not sure if the synth retains that
nodeID, and perhaps that is why this is not working. that seems like a
likely reason for this issue, im just not quite sure how to correct
that.
On Wed, Jul 22, 2009 at 10:45 AM, nescivi<nescivi@xxxxxxxxx> wrote:
> On Tuesday 21 July 2009 23:27:55 casey anderson wrote:
>> hi list,
>>
>> im trying to use randomly generated 1s and 0s, from MaxMSP, to pause
>> and unpause a synth in supercollider using Pause.kr (this is done over
>> OSC). when i stumbled upon this object a few weeks ago, and played
>> around with the help files, it seemed like something that would allow
>> me to randomly turn on and off a synth at a fairly fast rate while i
>> continually altered various other data parameters. however, im doing
>> something wrong here, as the synth does not actually pause ever. below
>> is an excerpt from my code:
>>
>> ///below are excerpts of my patch
>> var fft_b;
>>
>> fft_b = Buffer.alloc( s, 2048, 1 );
>>
>> /////////SynthDefs
>> SynthDef( \impulseBinShift, { arg amp, fft_b, freq, gate = 0, gate1 =
>> 0, phase, str, shft;
>> var env, in, fft, playMe;
>> env = EnvGen.kr( Env([0, 1, 0], [1, 1], \sin, 1), gate, doneAction: 2);
>> in = Impulse.ar( freq, 0, 0.9 ) * env;
>> fft = IFFT( PV_BinShift( FFT( fft_b, in ), str, shft ) );
>> playMe = ( fft * amp );
>> Out.ar( [ 0, 1 ], playMe );
>> Pause.kr( gate1, 1001 );
>
> is the second argument the ID of the synth?
> Does your synth always have that ID?
>
> sincerely,
> Marije
>
>> }).memStore;
>>
>> //play and stop buttons start/stop both synths
>> OSCresponder( nil, '/startStop', {
>>
>> | t, r, m |
>>
>> switch( m[1],
>> '/start', {
>> w = Synth( \impulseBinShift, [ \amp, 0.01, \freq, 1, \str, 0.25,
>> \shft, 0.1, \gate, 1, \gate1, 1 ]);
>> x = Synth( \lfBrownNoise, [ \amp, 0.01, \freq, 1, \dev, 0.25,
>> \dist, 0.1, \gate, 1, \gate1, 1 ]);
>> y = Synth( \crackle, [ \amp, 0.01, \param, 1, \gate, 1, \gate1, 1 ] );
>> },
>> '/stop', {
>> w.release;
>> x.release;
>> y.release;
>> }
>> )
>> }).add;
>>
>> //controls for synth1
>> OSCresponder( nil, '/synth1', {
>>
>> | t, r, m |
>>
>> "synth1".postln;
>> switch( m[ 1 ],
>> '/amp', { w.set( \amp, m[ 2 ] ); },
>> '/freq', { w.set( \freq, m[ 2 ] ); },
>> '/str', { w.set( \str, m[ 2 ] ); },
>> '/shft', { w.set( \shft, m[ 2 ] ); },
>> '/gate1', { w.set( \gate1, m[ 2 ] ); }
>> )
>> }).add;
>>
>> i use MaxMSP over OSC for control structure stuff fairly regularly
>> (though i want to switch over to supercollider exclusively, but im
>> still trying to beef up my code chops in order to do that
>> effectively...heh). regardless, i was wondering if anyone has any idea
>> why the Pause.kr will not actually pause the synth at all in the above
>> example. i have verified that the OSC message im creating in Max is
>> going over to SC perfectly fine, so im fairly certain i am just doing
>> something incorrectly with Pause.kr. any input would be greatly
>> appreciated.
>>
>> casey
>
>
>
>
> _______________________________________________
> 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.ctandersonmusic.com/
_______________________________________________
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/