i have built a simple synth in pd with a very simple envelope (using the line command) my problem is that notes are being triggered twice, once when the note is pressed down and once when let go, causing the envelope to be triggered twice. what am i doing wrong?
www3.sympatico.ca/alexandre.matheson/alex/simplesynth.pd
-
Twice triggered notes
-
what's happening is this;
when a note is hit a message is sent with the note number, velocity, channel, etc..., and when when it is released all of the same information is sent again, with the important difference that the velocity is zero.
In your current patch the velocity is used to trigger the envelope, regardless of its value. To stop the double notes you need to filter out any velocities whose value is zero.
A easy way to do that is with the "select" (or "sel") object.
connect the second output of your "notein" with the first input of a "select 0", then connect the second output of the "select 0" to the "t" message box.
(also check out the trigger object box, it will work better and be more flexible that the "t" message box that your patch currently uses)
hope that all helps. -
thanks, I'll try it out right now
{ : -)) -
hello
an easiest way to avoid triggering on note off is to use the stripnote object.
it doesz exactly what you want. it supress all note off message and let note on goes thru.
have a look at the reference help for the stripnote..
cheers
glo