<br><br><div class="gmail_quote">2009/11/9 Athos Bacchiocchi <span dir="ltr">&lt;<a href="mailto:athos.bacchiocchi@tin.it" target="_blank">athos.bacchiocchi@tin.it</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


 hi,<br><br>i&#39;m working on a little project in which some notes with random pitches and duration appear at random time intervals. Each note is packed in a &quot;midi&quot; format (pitch and velocity), with a note-off event (pitch and zero velocity) sent after the note duration interval.<br>


<br> it can happen that a new note is generated before the previous one has been stopped.That&#39;s not a trouble, since i  can handle it with [poly], eventually set to 1 voice and with voice stealing to force a &quot;monophonic&quot; melody. <br>


<br></blockquote><div>Hi Athos, <br></div><div><br>Since you want it to be monophonic, why don&#39;t you just force a note-off for the previous note, right before the note-on of the new note ?<br>If you want rests inbetween the notes you could also use [pipe]---[pack f 0], and [flush( the [pipe] when a new note arrives, so that if the previous note had not finished yet, the scheduled note-off for it is sent early, before the new note-on...<br>


does that make sense ?<br>(attached is an example)<br><br>Tim<br><br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The problem appears if the new note coming has the same pitch than the previous one. This is impossible for a &quot;real&quot; midi keyboard, in fact a key can be played again only after it has been released.<br>


This leads to an undesired behaviour of [poly]: if there are more than 1 voice, i have the sum of different voices playing the same note, with an undesiderd increase of the volume. Even worse, when the voice is only one, the note-off message of the previous note stops the new note before its assigned time duration!<br>


<br>I tried to set up a strategy to avoid this, but with no results.  Any idea?<br><br>thanks,<br><font color="#888888">athos<br>                                                                                                                                                                                                                                                                                                                       </font><br>


_______________________________________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br>