<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Nice one!<br>
    <br>
    <div class="moz-cite-prefix">Le 12/11/2014 04:17, Alex a écrit :<br>
    </div>
    <blockquote
cite="mid:CAOGs2RB60CEzuFTh1NDPHFJDJDjC_EBzun0s=1Fk_eSeTGx9yQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>I couldn't resist creating my own approach.<br>
            <br>
            I used a table with 2048 entries and just store the velocity
            for each note, I add 128 * channel number to each note
            number to achieve multiple channels.<br>
            <br>
          </div>
          In order to find which notes are down you just see which
          entries in the table are greater than 0.<br>
          <br>
        </div>
        -Alex<br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Tue, Nov 11, 2014 at 6:40 PM, JC
            Pedroza <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:nemesis4go10@hotmail.com" target="_blank">nemesis4go10@hotmail.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">I
              finally solved this. <br>
              <br>
              Used a combination of [list-extend], [list-find],
              [list-delete] for the list dynamics and [notein] for MIDI
              input. The patch first separates the MIDI note messages by
              velocity (0 velocity is note-off). If note-on then it adds
              the note to the list, if note-off it removes the note from
              the list. <br>
              <br>
              When the patch receives a bang, it outputs the list with
              all the keys (MIDI notes) that are being pressed.<br>
              <br>
              I'm including the patch as attachment. You can also get it
              at: <a moz-do-not-send="true"
href="http://raw.githubusercontent.com/JCPedroza/puredata/master/tools/MIDI_io/list-MIDInoteon.pd"
                target="_blank">http://raw.githubusercontent.com/JCPedroza/puredata/master/tools/MIDI_io/list-MIDInoteon.pd</a><br>
              <br>
              There are two important subpatches. [pd on_off_route]
              routes the MIDI-note-on notes to one side, and
              MIDI-note-off notes to the other. [pd list-deletevalue]
              deletes a value from a given list, outputs the list
              unchanged if the value was not found.<br>
              <br>
              It surely can be improved. Let me know if you find
              something. <br>
              <br>
              Thanks everyone for your time and help, I really
              appreciate it. <br>
              <div class="hm HOEnZb"><br>
                ----------------------------------------<br>
                > From: <a moz-do-not-send="true"
                  href="mailto:ingo@miamiwave.com">ingo@miamiwave.com</a><br>
                > To: <a moz-do-not-send="true"
                  href="mailto:nemesis4go10@hotmail.com">nemesis4go10@hotmail.com</a>;
                <a moz-do-not-send="true"
                  href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a><br>
                > Subject: AW: [PD] How to add/remove MIDI notes from
                a list using MIDI in and note on/off?<br>
                > Date: Tue, 11 Nov 2014 14:43:33 +0100<br>
              </div>
              <div class="HOEnZb">
                <div class="h5">><br>
                  > If you are on Pd-extended I would suggest using
                  [cyclone/coll].<br>
                  > That's what I am using. Much easier than working
                  with regular lists.<br>
                  ><br>
                  > Ingo<br>
                  ><br>
                  ><br>
                  >> -----Ursprüngliche Nachricht-----<br>
                  >> Von: Pd-list [mailto:<a
                    moz-do-not-send="true"
                    href="mailto:pd-list-bounces@lists.iem.at">pd-list-bounces@lists.iem.at</a>]
                  Im Auftrag von JC<br>
                  >> Pedroza<br>
                  >> Gesendet: Dienstag, 11. November 2014 13:54<br>
                  >> An: <a moz-do-not-send="true"
                    href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a><br>
                  >> Betreff: [PD] How to add/remove MIDI notes
                  from a list using MIDI in and<br>
                  >> note on/off?<br>
                  >><br>
                  >> I need to populate a list with the MIDI notes
                  that are being pressed, and<br>
                  >> remove the note from the list when the key is
                  released.<br>
                  >><br>
                  >> One idea is to use [notein], and if the
                  velocity is> 0 then add the note<br>
                  >> to the list, and if the velocity == 0 then
                  remove the note from the list.<br>
                  >> But I have no idea of how to implement this.<br>
                  >><br>
                  >> I think I need [list-extend], [list-find],
                  and [list-delete], but I just<br>
                  >> can't figure out an implementation.<br>
                  >><br>
                  >> How can I do this?<br>
                  >>
                  _______________________________________________<br>
                  >> <a moz-do-not-send="true"
                    href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a>
                  mailing list<br>
                  >> UNSUBSCRIBE and account-management -><br>
                  >> <a moz-do-not-send="true"
                    href="http://lists.puredata.info/listinfo/pd-list"
                    target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
                  ><br>
                                                            </div>
              </div>
              <br>
              _______________________________________________<br>
              <a moz-do-not-send="true"
                href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a>
              mailing list<br>
              UNSUBSCRIBE and account-management -> <a
                moz-do-not-send="true"
                href="http://lists.puredata.info/listinfo/pd-list"
                target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
              <br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <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>