there was a missing connection in attached patch
it's corrected...

Le 12/11/2014 04:07, patrice colet a écrit :
I was thinking that storing a list of midi events is useless since [poly] can handle the whole process, but I might be confused, sorry for that...

Maybe attached patch is what you are looking for.

PS: I've replaced [zl rev] with

[swap]
|      |
[pack]

because I don't know where [zl rev] come from, it's not part of pd-vanilla.
less external in patching, less problem in porting

Anyway the particular method you are trying to do could be achieved with the help of [textfile]
Le 12/11/2014 03:20, JC Pedroza a écrit :
I understand what poly does, what I don't understand is how it helps to solve this problem.

Sorry for any confusion.

----------------------------------------
Date: Wed, 12 Nov 2014 02:15:54 +0100
From: colet.patrice@free.fr
To: nemesis4go10@hotmail.com; pd-list@iem.at
Subject: Re: [PD] How to add/remove MIDI notes from a list using MIDI in and note on/off?

I don't understand why not doing this:

[notein]
| |
[poly]

It seems to be the same thing.

from [poly] help file:

"The [poly] object takes a stream of pitch/velocity pairs and outputs
triples containing voice number, pitch and velocity.
You can pack the output and use the route object to route messages
among a bank of voices depending on the first outlet.
[poly] can be configured to do voice stealing or not (the default.)"


Le 12/11/2014 00:13, JC Pedroza a écrit :
Right now I'm handling MIDI note on/off like this:<br><br><div id="inlineImage0" style="display: inline-block"><script type="jsv#1086_"></script> <span contenteditable="true">&nbsp;</span> <div style="display: inline-block" unselectable="on" contenteditable="false" class="inlineImage" initheight="257" initwidth="377"><img src="cid:inlineImage0" height="257" width="377"></div> <span contenteditable="true">&nbsp;</span><script type="jsv/1086_"></script></div><br>(also including this file as attachment)<div><br></div><div>The idea for now is that left outlet (note on) adds the MIDI note to the list, and right outlet (note off) deletes that note from the list.&nbsp;<span style="font-size: 12pt;">That's where I'm stuck at the moment.&nbsp;</span><span style="font-size: 12pt;">&nbsp;Can [poly] help me implement that logic?&nbsp;</span></div><div><br></div><div>I'm using [list-extend] to add the notes to a list, but I can't figure out how to remove the note from the list once the key is released (note off). I think I need to use a combination of [list-find] and [list-delete], but I can't make make it work.</div><div><br></div><div><br></div><div>----------------------------------------<br>&gt; Date: Tue, 11 Nov 2014 23:23:22 +0100<br>&gt; From: colet.patrice@free.fr<br>&gt; To: pd-list@lists.iem.at<br>&gt; Subject: Re: [PD] How to add/remove MIDI notes from a list using MIDI in and note on/off?<br>&gt;<br>&gt; hi,<br>&gt; what about using [poly] instead?<br>&gt;<br>&gt;<br>&gt; Le 11/11/2014 13:53, JC Pedroza a écrit :<br>&gt; &gt; I need to populate a list with the MIDI notes that are being pressed, and remove the note from the list when the key is released.<br>&gt; &gt;<br>&gt; &gt; One idea is to use [notein], and if the velocity is&gt; 0 then add the note to the list, and if the velocity == 0 then remove the note from the list. But I have no idea of how to implement this.<br>&gt; &gt;<br>&gt; &gt; I think I need [list-extend], [list-find], and [list-delete], but I just can't figure out an implementation.<br>&gt; &gt;<br>&gt; &gt; How can I do this?<br>&gt; &gt; _______________________________________________<br>&gt; &gt; Pd-list@lists.iem.at mailing list<br>&gt; &gt; UNSUBSCRIBE and account-management -&gt; http://lists.puredata.info/listinfo/pd-list<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Pd-list@lists.iem.at mailing list<br>&gt; UNSUBSCRIBE and account-management -&gt; http://lists.puredata.info/listinfo/pd-list<br></div>

                         
_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list



_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list