Store midi-information

Philip Gleisner's icon

Hello everyone!

I'd like to find a simple and effective way to press my keys and have Max store the pitch in different messages.
Instead of sitting and putting everything in manually after finding a good chord, it would be lovely if I could make a sequence that remembers what I've played. I'm only thinking about chords, not single tones.

schlam's icon

Clearer please...
I dont understand ;)

Brodie Matthews's icon

are you playing them or using a kslider?

Philip Gleisner's icon

Thank you for your time!

So I'm building a "generator" where I put in a lot of chords in to my patch in different messages and then it randomizes through them out to my analog synths.
Instead of putting in the notes one by one finding the correct number, I would love to be able to play on my midi-keyboard and when I find something I like I bang that sequence of numbers (the widest chords consist of six notes) into a message that "prints" as in I can continue playing and "banging" and then in the end have multiple messages all with different chords.
Makes sense?

Brodie Matthews's icon

you would have to pack the midi data into a list, and store each list in a coll thats a good start, all the info in the helpfiles will help you achive this really easy.

Bradley Korth's icon

You could use thresh to capture a list of simultaneous notes, then use the right inlet of zl reg to store them. If you want to output it, send a bang to the left inlet of zl reg.

Source Audio's icon

thresh would not do the job correctly
hit 5 notes, release 2, add 2 new ones .
What do you get ?
One should use coll, bag or similar to store currently held notes and bang them out
when satisfied with the chord.

Peter Ostry's icon

See the attached coll-based example.
You can add new chords to a [coll] named "storedchords". The notes of new chords are sorted by their note number (maybe good for further processing). Velocities are not stored, I assume that you handle them at playback. You can delete all stored chords at once. I did not add selective chord deletion because this depends on the method you use for playing the chords. The example uses just an automatically adapted [random] object.

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

For a generative patch, I think I would rather use [pattrstorage] instead of [coll]. This would allow more convient storage of different chord sets and the interpolation feature could generate transitional chords.

Philip Gleisner's icon

I really appriceate the help, I think that did it Peter! There's only one problem, is I use both hands I can't press save but I'll work my way around it. I cannot salute this community enough.
While I'm here, why can't I open a patch that's been downloaded on another computer through google drive? My own patches opens without a problem but the ones that I've downloaded only works on that specific computer and not the other one. Is there a way to go around this?

Peter Ostry's icon

There's only one problem, is I use both hands I can't press save

Use a sustain pedal and map CC#64 value 127 to the save button. While collecting chords, you don't need sustain anyway.

Brodie Matthews's icon

use the midi signal as a bang to store the data?

Peter Ostry's icon

Yes. I think a sustain pedal on the keyboard and using the highest sustain value (CC64 127) to store a chord should do it. Just make sure that the signal does not come twice as this would produce uncontrolled chord duplicates. Something like the patch below works good with a medium quality pedal:

If you have a severe bouncing pedal you may consider another trigger method or add some timing function that does not store chords in a fast sequence (minimum pause).

Philip Gleisner's icon

Sorry for late reply, a lot of work and taking care of other peoples kids haha. But this is perfect, I've got a good pedal in the basement! Thanks once again, I'm sending a virtual beer your way :)