If you just want something that arpeggiates on a single note then you can just add the arp code into your main instrument. For example, the following two examples will let users toggle an arp on/off.
One of the examples uses subinstr
, which I find kind of buggy. Sometimes notes will hang. I don’t think it frees memory correctly, which has a negative effect for future calls.
The second one wraps the synth code into a UDO. I did this merely to save myself from copying and pasting code, although in this case it was quite minimal. For large instruments I think the UDO will make things easier to manage.
Let me know if you have any questions.
arpSubinstr.csd (1.6 KB) arpUDO.csd (1.9 KB)