[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



hi,
i had a similar problem recently.
it would be so great having a doneAction sending a osc message!
i ended up doing it this way:
- b pauses itself instead of freeing
- b has an envelope inside that triggers a SendReply.kr
- the OSCresponder getting the message frees both synths...
best, florian

Am 20.09.2010 um 00:49 schrieb ronni montoya:

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