Switching between soundloops and transitions

Hi everyone!
It’s been a while since I posted anything here, but anyway:

I’ve created a function that plays a number of loops and transitions in a specific order which is this:
Loop1 > Trans1 > Loop2 > Trans2 > Loop3 > Trans3 > Loop3

Now, the last loop (loop3) is supposed to play infinite after trans3 has finished, but that doesn’t work. (This is the goLoop function )

So, basically, what I want to do is to have a button that switches the currently playing loop to the next one, and between them should the transition play automatically.

I hope this is detailed enough.

Extremely grateful for ANY help :puzzle: :frowning:

EDIT: Source code further down the thread!