<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I would try and catch this before your [makenote] is triggered
(assuming you're using [makenote]) Maybe something like this:<br>
<br>
<tt>[random 127]<br>
|<br>
[t f f]   [r oldnote]<br>
|     |   |<br>
|     [!= ]<br>
|      |<br>
[spigot]<br>
|<br>
[t f f]<br>
|     |<br>
|     [s oldnote]<br>
|<br>
[makenote]<br>
<br>
</tt>.mmb<tt><br>
<br>
</tt>Athos Bacchiocchi wrote:
<blockquote
 cite="mid:18380900.2289041257738870760.JavaMail.defaultUser@defaultHost"
 type="cite"> hi,<br>
  <br>
i'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
"midi" 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's not a trouble, since i  can handle it with [poly],
eventually set to 1 voice and with voice stealing to force a
"monophonic" melody. <br>
  <br>
The problem appears if the new note coming has the same pitch than the
previous one. This is impossible for a "real" 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>
athos<br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list
UNSUBSCRIBE and account-management -&gt; <a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>
  </pre>
</blockquote>
<br>
</body>
</html>