MIDI notes, some are missed, other stucking
Two warnings before I start my post:
1) I'm visually impaired, so I might be missing something.
2) I only started learning Max a few days ago.
That said, here's the problem:
I'm trying to make a simple monophonic synth, but I can't get pass the "fight against" the adsr~. No matter what I do, some MIDI notes don't register and others get stuck.
Here's a patch where I removed everything not related to the problem.
I noticed that many other people have the same problem but I haven't found a solution yet. Also, I'm pretty sure that is something on my end because I use many M4L instruments and they all work fine.
I appreciate any tips or pointers to study material.
---
P.S.: I also tried to make it polyphonic with poly~, following C74's video tutorial. THe poly part worked like a charm, but the hanging notes still persisted.
You might look into trigger, retrigger and legato attributes of adsr.
that can be adjusted to your needs.
look into reference page of adsr~
post more questions if necessary.
Thanks for the tips!
I tried many different values for all the parameters, however I couldn't get it to work properly as a "normal" adsr. Also, the initial issue of notes getting stuck or missed still persists.
Could you give me an example of how would you go about it to make it behave like a "traditional" synth like Analog or Operator, for example. I know those are more advanced than a simple linear adsr, I just wish to know how to avoid the notes getting stuck or missed.
notes:
I also tried using notein instead of midiin with no difference in the results
And I looked into other ways to trigger the envelope, different than the attached patch, but no luck as well.
Any input will be greatly appreciated.
if you use real keyboard or any other valid midi input,
there should be no missing or hanging notes.
midi notes get converted to frequencies,
and velocity sets volume.
there should be no missing frequencies.
here is one tester for adsr~ modes
now the question is how fast you play, and how many notes are held ...
and if you want each midi note to restart adsr or not.
In addition, maybe poly 1 1 set between
midi input and freq/adsr would enforce mono mode
because each new note on would turn previous ones off.

there is also ddg.mono object with some options about retrigger modes and
priorities.
Could you describe how exactly would you go about retriggering ?
I mean what would you like to hear ?
if a note is on (sounding) and adsr~ is still rising or falling, whatever,
next note comes in ... then ?
Wow... thanks once again, you are in deed being very patient and kind.
Here are some interesting notes:
The poly 1 1 solved my issue with the adsr~ behavior,, that's exactly what I was looking for, every new note cuts the old one imediately and no note is retriggered "by accident".
The issue with notes getting stuck or being missed only happens when I'm running Max in standalone mode. if I open it via Ableton Live, everything works as expected.
I was using the 9.02 version, in demo mode, but I've had something itching my brain about it, so I sneakly got inside the Ableton Live package content and opened Max 8 to try it in standalone mode as well.
What I've found is that both versions (8 and 9 demo) will miss and hang notes in standalone mode.
Even more interesting is that I'm also getting into Pure Data and I've had zero issues both with Pd Vanilla and Plugdata, so it leads me to believe that there is something I need to adjust in Max's settings.
Any ideas about that?
Anyway, thanks again for the tips and patience (;
Honestly, I would expect Live to have problems with midi rather than max standalone.
It coud be that something gets passed through midi pipe in max,
but ableton blocks it.
So again I suspect that midi input causes your problems.
Could you describe how you generate midi notes ?
For real analysis, you could record short midi sequence
directly from your midi input.
That can be done using seq object.
One can save recording as text, and then read in plain text what came in....
Did you turn overdrive on in max ?
That is necessary for midi
Hi, I turn on Overdrive, but it didn't change the MIDI problems.
My input method is pretty basic, just a MIDI Controller (Novation Launchkey Mk3 37) connected to the computer via USB. I think is important to mention that this problem only affects Max, all the other software that I use with MIDI (Bitwig, Live, Pd Vanilla and plugdata) work as expected.
I couldn't figure out how to use seq yet, but I will do that!
In the meantime, I took a screenshot of a simple sequence of 3 notes, played very slowly in a staccato way to ensure my playing is not causing any extra trouble. I tapped this info straight from the midiparse, but I tried tapping it out of other objects with the same result.
I marked the places where the notes were either missed (note on) or hanged (note off).
Hope it can be useful.
MIDI: 54 84
MIDI: 54 0
MIDI: 56 77
MIDI: 56 0
MIDI: 58 95
MIDI: 58 0
MIDI: 54 82
MIDI: 54 0
MIDI: 56 98
MIDI: 56 0
-> Missed 58 note on
MIDI: 58 0
-> Missed 54 note on
MIDI: 54 0
MIDI: 56 99
MIDI: 56 0
MIDI: 58 96
-> Missed 58 note off
MIDI: 54 98
-> Missed 54 note off
MIDI: 56 97
-> Missed 56 note off
MIDI: 58 102
MIDI: 58 0
MIDI: 54 95
MIDI: 54 0
MIDI: 56 101
MIDI: 56 0
MIDI: 58 106
-> Missed 58 note off
MIDI: 54 86
MIDI: 54 0
MIDI: 56 105
MIDI: 56 0
MIDI: 58 107
MIDI: 58 0
MIDI: 54 79
MIDI: 54 0
MIDI: 56 98
MIDI: 56 0
MIDI: 58 99
MIDI: 58 0
-> Missed 54 note on
MIDI: 54 0
MIDI: 56 100
MIDI: 56 0
MIDI: 58 107
MIDI: 58 0
MIDI: 54 96
MIDI: 54 0
MIDI: 56 101
MIDI: 56 0
MIDI: 58 109
MIDI: 58 0
-> Missed 54 note on
MIDI: 54 0
MIDI: 56 99
MIDI: 56 0
MIDI: 58 99
MIDI: 58 0
launchkey keyboards are known to cause problems because of outputting midi beat clock
over USB.
If I remember correctly, one can't turn it off on some models.
Is that the case with your keyboard ?
If so - solution 1 - set tempo to lowest value.
or use 5 pol din output to other midi interface.
Live seems to filter that clock better...
There were many threads about this problem here in the forum.
Oh yeah! Now you've nailed it!!! It's working.
I can confirm that the Launchkey Mk3 series have the option to disable the MIDI Clock via settings menu.
If I only knew the name of the problem to make the search hehehe... being ignorant is hard, but that is just how it is at the beginning of anything, I guess. Luckly there are experienced people like you with the patience and good will to help.
I hope this post can help more novices that are also lost in the glossary (;
Thanks!
P.S.: Universal Audio have a pretty good "Compatibility Report" so you can check what are the known issues, really useful for troubleshooting before the problem appears. Do you know if C74 have something similar? Do you think this is something I should report?