@ddw_music That is a cleaner way of doing it. But I think it will give me the same problems I had before the [spigot] since the BSP seem to send the message twice which would mean that both the note_on and the note_off messages would reach the [vline~] at the same time. But maybe I'm not understanding [moses] correctly so I will try it tonight and get back!
@whale-av Thanks a lot!
By printing the messages I could see that the [vline~] received the same message twice. Once when I pressed the key, and then again when I released it. No idea why it worked before, I'm guessing my BSP is a little buggy.
Anyways, solved it with a [spigot] and now it works like a charm.
I'm pretty new to PD and have been building my first polyphonic synth for the last couple of days.
I use [poly] with 10 voices and send note number and velocity to the oscillators and only velocity to the envelope.
Before last night I could press and hold a key on my Beatstep Pro and the note would keep playing until I let go, at which point the release kicked in.
Same if i pressed multiple keys on the BSP.
For some reason this changed last night without me touching the ADSR.
I can see that velocity 0 reaches the ADSR and on the right channel, but if I don't release the key before the sustain is finished the note will just cut off. This is probably because it needs velocity 0 to trigger the release, but it doesn't explain why I can't hold the keys anymore.
To make even more weird, sometimes when I hold a key it works...
Any idea why this happens?
If you want, I can post the whole patch but the problem seem to be in the ADSR.
Also, I'm running vanilla.