Well first you need to pick a more specific goal, this question is too open ended.
Do you want Max to generate random chords, or do you want to do some algorithmic music, like notes determined by math formulas? Do you even want Max to generate the notes or do you want to sequence/record them ahead of time and have Max play it back?
Are you planning on using MIDI or do you want to control MSP synthesizers? Either way, usually a chord is most easily represented as a list of MIDI note numbers like this:
And then you can use the [mtof] object to control MSP synths if you want.
Or instead of a list of notes you can just generate the roots of the chords, and then have chord builder patches that create additional notes based on the root (like the third and fifth if you are working with standard triads):
The actual sequencing gets trickier, but you need a better idea of what you want to do first...
I've asked questions in the forums and many have graciously helped point me in the right direction, or just given me a patch. Max users are some of the most giving users I've never met. However, if you haven't done the tutorials (or at least a bulk of them), you should look through them, pick apart as many working patches related to what your goals are, and the help files are your friend, I copy and paste all the time.
Also use the reference guide when learning about an object, there's some attributes that may not be in the help file.
Max can be a little frustrating at first, but a few "Ah ha!" moments of Max enlightenment, and it will start to click.
Here's one object that I've been using lately to generate sequences based on modality.
ok, since i'm having a related question i'm reviving this old thread to see if someone can help me. i'm building a max for live patch at the moment to substitute lives native chord plugin because i want something with a chord memory function like the polysix for example. although i'm building this in max for live, my problem is not really max for live related, so i thought i'd post it here anyway.
in my patcher the section on the left waits for midi notes and distributes their offset from the first pressed note among the 6 dials as long as you keep all keys pressed. when any of the keys is released or all the dials have received a new value it goes out of input mode and the corresponding notes are added to the base note in the section on the right so one can play the chord he just put in with one key.
this works fine so far, but sometimes i press the next key shortly before i release the last, which can sometimes lead to overlapping notes between the chords generated by the two pressed keys. if this happens and i relase the first pressed key/chord, the overlapping notes from the next key/chord are also killed since the first key sends all the note offs for its active notes. for example when you have +1 on the first dial and +2 one the second and press c4 and then press c#4 before releasing c4, c#4 and d4 are killed upon releasing the c4 key on the keyboard, only leaving d#4 playing as long as i hold the c#4 key. but i want them to keep playing until i release c#4. i have attached an illustration to make it clearer.
i've tried countless hours now to prevent this from happening, building different clumsy mechanisms with zl filter and others to make lists and filter out doubled notes from the next note off and kill them with the next one instead but to no avail. in the end i always got hung up notes when pressing keys twice and weird stuff like that.
i have run out of ideas how to go on with this and hope you guys can give me some hints or maybe even alter my patch the right way. i've attached the amxd file but also the copied the compressed code:
you mean making the input monophonic? this would be one way of a solution but i'd really prefer if it worked the way abletons chord plugin does (like the upper part of the picture), leaving the notes from the previous chord playing as long as the respective key is held down.
what i'm really trying to do is filtering out the note-offs for overlapping notes as long as the keys are pressed which create the chords with those notes. so they CAN can overlap but leave all the notes playing which are part of the actually playing chord after releasing the overlapped notes not just those who didn't overlap (like in the lower part of the pic).
i need to find a solid way of detecting when a note is played again before it is shut off and then holding it in some kind of a volatile memory until it is really not played anymore by any chord, and only then giving out the respective note-off. at least that's what i tried to do before, using the zl filter, zl sect and zl unique objects amongst others. i'm pretty sure i was on the right track, but always ended up in a chaotic maze of wires, making it next to impossible for me to locate errors.
her is my last try in this direction, but it's really, really messy and hard to see through and locate my errors, at least for me.
i also briefly tried the ddg.mono and the mono patcher you posted. but using ddg.mono i get hung up notes again most of the time. the patcher is working but the way it works also isn't really what i desire, only playing the next note after i released the last. using a [poly 1 1] instead of a [ddg.mono] actually does work here, but again, that's not really how i want it to work.
any other clues? i'm pretty sure, there is a way but i'm having a hard time wrapping my head around it.
and you have 48 held down first, it triggers CEG, then you play 50 over the top, it only triggers the new B and cancels the C, but leaves down the same notes EG from the previous chord? Just using these simple notes as example, but would be great if you could elaborate if I was wrong in understanding using the same terminology, or descriptors so it's easier for me to visualise.
I'm quite happy to help as I've had so much great help from this forum and wanna repay using the limited knowledge I do have. What I find really helpful when debugging or solving an issue is to reduce it down to it's most basic of forms, you mention you are lost in the complexity of what you've built, so reducing it down to some base principles, that you use to get right, attain proof and then scale back up into your bigger patch. That's the method I use.
For some reason explaining your problems in simplest way can help your mind debug the problem and gain new perspective.
Don't be afraid to switch up your approach, there's a much easier way I like to use with coll
EDIT: Making a new thread with a succinct title such as "Emulating Live's chord device" may be better than resurrecting an old thread.
ich weiss worauf du hinaus willst. das problem hab ich auch grad. wenn der nächste chord kommt, und eine Note wie im vorherigen chord kommt drin vor, darf der erste chord kein note-off mehr für diese Note senden, richtig? ich schau mir mal dein patch an.
@richhop: yes, that is what i'm talking about. :) only with the slight difference that all notes, even new ones overlapping old ones should actually be retriggered and not just be held down, since this is the way i am used to from lives plugin. but that could be an interesting optional operating mode, now that i think about it. but you got the picture.
i recorded two videos using lives plugin and mine, each playing a "chord" of +1 and +2.
after recording these i noticed lives plugin actually does the monophonic thing too, but only when playing a note lower than the previous one. hm, that's interesting...
i'm working with the very basic stuff i know since my knowledge of max is also not really advanced. i just made my way half through the tutorials in a few weeks while building a click-free sample player in max for live when it came out. i'm afraid i've once again hit the wall here. as soon as i have an idea how it might work, it gets messy. most of the time simply because i don't know the right object that does the trick.
i have used the coll object before and thought about using it for this case but then again i was afraid it would be overkill and the whole thing would end up in a mess as well.
i hope i don't come across as a lazy guy. this is actually agonizing me for weeks now and asking for help here is kind of the last resort for me.
you might be right about posting this in the max for live sub forum. i just was afraid nobody is reading it there and cross posting would be against the forum rules or something. but i might post this over there too.
@11olsen: jaa, genau!! das ist es! :) schön, dass es hier auch deutsche gibt. meine probleme auf englisch zu erklären, ist nicht immer ganz leicht. und momentan bin ich irgendwie an den grenzen meiner möglichkeiten angelangt. wäre toll, wenn du mir ein bisschen auf die sprünge helfen kannst.
@wetterberg: yes, i tried using borax in the last patch i posted. but i probably used it in the wrong way. i wanted to control which list of combined note-offs gets sent to the noteout, based on the number of notes playing. the one with the doubled notes filtered out or the one contaning note-offs for all held notes. i almost got it to work but the more complex it got the more i ran into problems which i don't really know where they come from.
ok scyhte, often a table can help. i could solve the overlapping note problem but now you have some more.
if you change one of the pitches while a chord is playing you again have this hanging notes problem because the chord notes-off command uses the new pitch. and what if you have 2 chords playing at the same time and change one of the pitches..
das kann man auch lösen aber es wird dann halt immer komplexer. du kannst dann auch wirklich coll benutzen und für jede input Note die chord Noten speichern. aber ich find den ansatz nicht so nützlich wenn jede input Note den selben chord spielt, nur transponiert .?
gruß und bleib dran..wenn dich m4l devices interessieren kann man einiges aus anderen devices lernen. maxforlive.com aber die guten sachen muss man schon etwas suchen ;)
– totally split the incoming note on and note off events and process them in parallel processes. (try to build a [pipe] for lists such as "1 2 3 4 5" and you will see what i mean.)
– build some smaller parts, which could be required for it, apart from the current project, and design them as generic as possible. for examaple i have built myself a "scrolling coll", which is then used in similar situations.
ansonsten gilt wie üblich: bildet olsen-banden! (wer´s nicht versteht: einfach googeln)
I have a similar problem with a patch I'm making. I'm using coll to store all these chord sets that are stored and recalled by a pitch number. I made a coll on the side that stores previous pitches with borax allocation and notes active function. Then I had to isolate note on and off signals and send them to each note in the chord (iI had several makenotes/noteouts so I could control velocity and duration for each note extension in the chord) I got it to stop the hanging notes, but I had to del some signals [just by a milisecond] but in the end everything was not smooth enough for live playing. Would it be better to compile these chord sets with a matrix rather than coll? Any good patches or objects that would help with this other than ones with java script?