Removing a stream.

7 views
Skip to first unread message

iz4...@libero.it

unread,
Dec 15, 2023, 6:05:30 AM12/15/23
to pyo-d...@googlegroups.com

Another basic one.

If a, b and c are Sines and theyre all out(), how can I stop b, for instance, from playing?

I’m doing these exercise with the python interpreter.

I tried del b, but it doesn’t work all the time.

 

And if p is my Pan and a, b and c had been added to p, how can I stop b from playing?

 

Thanks.

Gabe.

 

Gabriele Battaglia (Gabe / Gabry) - IZ4APU

--... ...--  -.. .  .. --.. ....- .- .--. ..-  - ..-  . .

Sent from Outlook on Windows, Genus Bononiae's computer. (Libero)

 

barmin

unread,
Dec 15, 2023, 6:21:54 AM12/15/23
to pyo-d...@googlegroups.com
> If a, b and c are Sines and theyre all out(), how can I stop b, for instance, from playing?

basically:

b.stop()

This works but will cause clips. You'll probably want to lower volume first, or play with envelopes.

> And if p is my Pan and a, b and c had been added to p, how can I stop b from playing?

Exact same answer ;-)

Note that if you intend to have b playing again soon and don't have performance concerns, you could also simply set b's volume to 0.

Cheers,

Matthieu
Reply all
Reply to author
Forward
0 new messages