I want to be able to play a single instance of a long sample. In an attempt to do this I have used the code below … which sort of works but it doesn’t always start at the begining.
Any ideas what the issue is or if there is a better way to do this
def fox_once(n=0,stop=11): print(n) if (n <= stop): f1 >> loop('foxdot',n,dur=1) else: f1.stop() return Clock.future(1,fox_once, args=(n + 1,stop)) seconds = Clock.seconds_to_beats fox_once(0,seconds(5.36))
*Edited for syntax highlighting