If I define a group like:
bass_bar_01_g = Group(a0, e1, c1)
a command like
bass_bar_01_g.start()
does not work, but would be nice to have. I also didn’t find a Start command for groups.
As a workaround I can create a group within a function and return the groupname. So I could start the group by calling the function name and still can use all group methods:
def bass_bar_01(run=1):
a0 >> bass([_,5,_,5,5,_], dur=[rest(1),0.75,rest(0.25),0.5,0.5,1])
e1 >> bass([_,9,_], dur=[rest(3.0),0.5,rest(0.5)])
c1 >> bass([_,7], dur=[rest(3.5),0.5])
bass_bar_01_g = Group(a0, e1, c1)
if run:
return bass_bar_01_g
else:
bass_bar_01_g.stop()
return bass_bar_01_g
create the Group bass_group with a function call:
bass_group = bass_bar_01(1)
use group methods:
bass_group.oct=4
bass_group.stop()
restart (recreate) the Group bass_group with a function call:
bass_bar_01()