poly~ midinote message ?
Hey,
Has anyone success with using midinote message in a poly~ ? i can't seme to make it happen. The documentation is not very clear, there is no example for mdiinote, just for note. I tried: (midinote 0 $1 1) into poly~ to send a $1 1 message inside one instance, followed by (midinote 0 $1 0) to stop it (where $1 is to be replaced) ; i tried (midinote $1 1) and (midinote $1 0) but no instance receives any message. What happens ?
in the meantime i use [poly] object to manage polyphony and send to a different [poly~] voice
Confirm, 6 years later, the midinote method in poly~ does not do what the manual says, in the process of voice allocation it completely ignores the velocity=0 event. Agree the poly object is the only work around I found. Hey Max developers, you need to update the manual to reflect what the software actually does.
Norman, I've been using the midinote feature successfully for years. Would you have a simple example showing what doesn't work?
Jean-Francois Charles,
I have revisited using the midinote messages sent to poly~, now working as it should. In my humble opinion, it's one of those strange beasts, that needs a good example to explain how it is intended to work. I came across a very dated YouTube video from Cycling'74 explaining how it this:
"Cycling74 Max/MSP/Jitter Tutorials: Polyphonic Synth", Cycling'74, 11-Jan-2011, Link: https://youtu.be/y0mcWhrFrEY
I could repeat the above in my own code, enhanced and added liberal comment codes as part of my knowledge base, ready for the next time I need to use it, see below:


There is this dance happening between the instances that poly~ creates for each voice and the thispoly~ object for voice allocation and digital signal processing (dsp) muting. When coding by just reading the reference manual, that path is difficult to find, but the above worked example makes it clear. I get the impression that the above YT example from Cycling'74 represents the best practice to make this happen. Please correct me if I am wrong.
See next message for updated code.
Update on my previous message. Using signal cords to the adsr~ object inside the code that the poly~ object loads gives trouble, so I replaced it with message cords. Also added a gen object for the midi pitch to frequency calculations which in turn uses a codebox for the final calculation, a simple enough example but will pay off for more advanced frequency calculations.
The updated coding:
All full of comments to explain how it works and the pitfalls of what not to do. There are some extra outputs, boxes in blue that are not necessary for the calculations but serve as a teaching aid, explaining how it work and what comes out of the important Max objects.