Arpeggiator for Audio Signals

piearesquared's icon

So I was looking at guitar pedals and came across Earthquaker Devices' Arpanoid and was wondering if I could create a patch that would work the same way in Max (or preferably M4L). Now there are two ways I thought about going about doing that:

1. Use an analyzer~ object to get the frequency of the root note and at the same time record what's coming in into a small buffer~ every time a note is detected. Then play that sample via groove~ at different time stretch values to create a sweep of frequencies. The problems I've had with this approach is that analyzer~ changes values a lot until it lands on one frequency so that means that the recording is triggered several times per note and that I don't really now how to make whatever is recorded and played via groove play at a different pitch in time with whatever tempo my session's in, which led me to...

2. Using something to play whatever's stored in that buffer~ as if it was a sampler with analyzer~ outputting the MIDI note value and then playing the rest of the notes in a scale by using a coll object or something.

Given that I am a beginner, maybe an intermediate level Max user at best, maybe I am approaching this thing without considering something or the other that would make this much easier, so any help would be very much appreciated. Even if that help is in the form of a tutorial or tutorials I missed that might have something useful in them
Thanks!