Arpeggiator with a special feature

Joni950's icon

Hello everyone,
I'm starting to learn Max and I was hoping to be able to build an arpeggiator that could send midi at different rates; regardless of which note I press, I want the first note to sequence at a rate of let's say 1/8th note, the second key to sequence at the rate of a 1/16th note, the third at the rate of a 1/4th note – and so on. Depending on the number of keys being pressed down, the rate of the next note shall be based on that.

I can't really figure out how to make this work; I've used the [borax] object to keep track on the amount of keys being pressed simultaneously, but I'm having some problem with the routing.

As I said, I'm an entry-level Max user, all help is appreciated!

Baba O'Riley 2.0.maxpat
Max Patch



Source Audio's icon

How do you define first, second etc note ?
do you sort them by pitch?
Or by order they came in ?
And what if you hold 4 notes, then release the second and insert new one ?

In my eyes that are more important things to sort, before looking for solutions.

I'll post some stuff for storing and sorting held notes when I get back home.

Joni950's icon

Thanks for your reply!
I would like to sort them based on the order in which they came in.

To answer your question, let's say:
1st note = quarter note
2nd note = eighth note
3rd note = sixteenth note
4th note = half-note
5th note = whole note

If I were to hold 4 notes and release the second, I would like the previous 3rd and 4th note to sort themselves as the 2nd and 3rd note, thereby filling the gap of the second note that was released. The new note inserted would then be the new 4th note.

Hopefully this reply made some sense,

Thanks

Source Audio's icon

that can be done with few objects.
You need storage of held notes - I guess including velocity
and second object holding delay time between steps.
First thought is coll or umenu..
Both can insert, add and remove - renumber items

Source Audio's icon

this is one example.
Uses coll to store held notes, umenu for delay times, counter -> jit.cellblock
as display - player.
I have no idea what you intend to use to start / run /stop, or sync the
arrpeggio, but the storage alone should help you get going.

Max Patch
Copy patch and select New From Clipboard in Max.