[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] selfdestroying synth that destroys another synth stored in a variable



Yep I'd recommend what Batuhan suggests too.

I recently blogged about a related requirement, to use one synth to
pause/unpause another.
http://mcld.co.uk/blog/blog.php?308
Replace Pause.kr with Free.kr and you have yet another way to do it...

Dan


2010/9/20 Batuhan Bozkurt <batuhan@xxxxxxxxxxxxxxxxxx>:
> Create a group for each of your synth pairs and use doneAction: 14. This frees the enclosing group.
>
> See doneAction help for other types of behavior.
>
> Best,
> Batuhan Bozkurt
> /* http://www.earslap.com */
>
>
>
>
> On Sep 20, 2010, at 1:49 AM, ronni montoya wrote:
>
>> Hello dear list, im using task for sequencing behaivors , the task
>> have 2 nested "do", when the first do is called it creates a synth an
>> stores it  in a variable, then when the second "do" is called it
>> create another synth that selfdestroys after a while. I want that when
>> my second synth selfdestroys also destroy the first synth stored in
>> the variable.
>> Any idea of how to do this?
>>
>> here is the code
>>
>> (
>> t = Task({
>>       inf.do({
>>
>>               1.do {
>>                       arg i;
>>                       a = Synth(\sound_a );
>>                       (20.rand  ).wait;
>>               };
>>
>>
>>               1.do {
>>                       arg i;
>>                       Synth(\sound_b ); //
>> ----------------------------------------------------->    when this
>> selfdestroys, i want that  also destroys variable a
>>
>>               };
>>
>>
>>
>>               (40.rand  * 0.1 ).wait;
>>               })
>>               })
>>               )
>>
>> t.play
>> t.stop
>>
>>
>>
>> THANKS!
>>
>> _______________________________________________
>> 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/
>



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