stuck notes with poly~

Steven's icon

Hi, I was wondering if anyone can help me with a MIDI problem. I've built a patch that includes several synth modules and for some reason I keep getting stuck notes or notes that don't sound. As a result I have close and its very annoying. I am using poly~, which I think generates note offs automatically. Its just the occassional missed or stuck note so i'm not sure how to fix it.
Thanks for any advice.
Steve

jml's icon

are you using [midinote] messages?
are you utilizing thispoly~?
are you using adsr~ as a quick-fix for internally updating poly~?

please see poly~'s help file; also try to give us more info so that we can help you out.

jl

Steven's icon

Hi, I am using adsr~ with thispoly~ as a quick fix for internally updating poly~. I have no midinote messages, just a notein to connect my midi keyboard.
I'm using target0 and steel messages connected to the poly~'s first inlet.
To get the note and velocity into poly~, I packed them and then connected to a prepend with an argumnet, "midinote" then inside poly~ i unpacked them and sent pitch to the oscillators and velocity to adsr~.
It seems to be working fine, just a note wil get stuck or it doesn't sound and I have to close the patch.
Thank you for your reply,
Steve

jml's icon

it'd be better if you could post your patch so i could help you out with a concrete example.

jl

jml's icon

without seeing an example,
i can only tell you that you'll want to use midinote messages directly to poly~, and that you don't need to be targeting if you are wanting to utilize poly~'s steal function.

jl

Steven's icon

I looked into using midinote messages but i'm using notein so I don't really understnd the point of this. I've included a poly~ patch and subpatch that shows how I set this up. I used a target0 message to send new adsr values to all voices.
Thanks,
Steve

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

jml's icon

Hi Steven,

Using midinote messages is *essential* here, because you are telling poly~ that it should expect a given note-off for each note-on you give it, i.e., the durations are not determined.

There are a couple things missing from your patch;

1. an oscillator! ;)
Maybe this was intentional for your demo, but I've modified it and everything seems to work fine.
2. You need to be turning your MIDI vals into Hz vals; you can use [mtof] for this.
3. If you allow the pitch to be instantaneously changed before you create a note-off for adsr~, then you'll potentially hear clicks because the frequency is jumping to that value; this is something the "new envelope trigger" can be helpful for.

See patch:

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

jl

Steven's icon

Thanks for sending that patch. Actually the one i posted was a cut down version of my full patch. I already have my sound sources in place. I've been working on this project for a while now and i've always had this problem with stuck notes and missed notes. It happens about once in every ten notes i play from my keyboard.
When you talk about midinote messages do you mean notes from my keyboard or the word midinote sent into the right inlet of poly~? You said it is essential in my patch so i've looked into this but I don't understand how it is supposed to work. It takes a two number arguments, one for pitch and one for velocity and sends them to the first instance. I'm sending lots of different note and velocity values to poly~ using my midi keyboard. Maybe i'm just being a bit thick here but if you could post an example of this it would be a great help
Thanks very much,
Steve

jml's icon

"midinote" is an identifier for [poly~]. Any note information, including pitch, vel, etc. needs to be prepended/formatted as such, and get delivered to the the left (main) inlet, not the right:

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

jl

mattyo's icon
Stefan Tiedje's icon
Stefan Tiedje's icon