I'm making a 6-note polyphonic synth using p0ly and clone. The first five notes I play work perfectly, but on the 6th note, I get the error message
"clone: instance number 6 out of range"
How can I fix this?
-
Clone error on every sixth note
-
@jamcultur You get that error message because [poly]'s first outlet counts from 1 to 6, but clone numbers the cloned abstractions from 0 to 5. To make clone number from 1 to 6, use the -s flag, e.g. [clone -s 1 kbnote 6], or you could just subtract 1 from [poly]'s first outlet.
-
@jameslo I changed my code to this...
and got this on the console...
Did I do something wrong? -
@jameslo I still get the "clone: instance number 6 out of range" error when I change the code to this:
-
@jameslo I had tried closing and reopening the patch, because it seems that it sometimes necessary for changes to take effect, but that didn't help. But when I closed and restarted Pd, it now works. I don't understand why I had to close and restart Pd to make this work, but it does work now. Thank you!
-
@jamcultur Weird. TBH I didn't build or test anything, I just had a hunch and looked at help files. If you can document a reliable procedure to reproduce that behavior you could file a bug report. Or you could just continue making music