A way to create gaps of silence in a loop

35 views
Skip to first unread message

Befokus Ambient

unread,
Oct 11, 2021, 7:56:27 AM10/11/21
to pyo-discuss
Hi guys!
I'm looking for a way to create gaps of silence (slightly faded) in a loop.
so far i've found the LFO for mul attr which works BUT it's periodically.

I need to provide a list of point that tells the loop when to be silent and when to play.

anyone ? 

Thanks for your help !

sergei.k...@gmail.com

unread,
Oct 11, 2021, 12:48:44 PM10/11/21
to pyo-discuss
I don't quite understand what you mean, but there is a Pattern class.

from pyo import Server, Pattern, Sine

s = Server(duplex = 0).boot()
s.start()

point = [True, False, False, False,
        False, True, True, False,
        False, True, False, True,
        False, False, True, False]

sine = Sine()
sine.mul = 0.1

seek = 1

def step():
    global seek
    
    if point[seek-1] == False:
        sine.stop()
    if point[seek-1] == True:
        sine.out()

    seek += 1

    if seek == 17:
        seek = 1

pattern = Pattern(step, time = 0.1)
pattern.play()

s.gui(locals())

You can write your own mini sequencer.

Befokus Ambient

unread,
Oct 11, 2021, 3:44:13 PM10/11/21
to pyo-discuss
Thanks Sergei, appreciate the fast response and detailed explanation. 
Reply all
Reply to author
Forward
0 new messages