Hi all,
Below is my attempt to generate a random melody between 7 and 13 notes. The algorithm seemed to be running fine for the most part, but the loop itself ran twice, once because it ran the loop as any piece of code would run(…“initial pass?”), and another time because of the metro object which “reinit” the loop.
The solution I have at the moment is to delay the metro by the same interval by which it itself is defined, so that I can start the periodic execution of the algorithm a little later. I was wondering if anyone had a better solution. Or am I not understanding the loop_lt opcode correctly?
random melody gen.csd (1.4 KB)