<div dir="ltr">Sebastian's one is surely a more compact solution and probably more efficient. But it doesn't deal with repeated notes, better said repeated MIDI notes with the same MIDI note number, as the Hans' one does.<div>best</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><a href="https://elgallorojorecords.bandcamp.com/" target="_blank">www.elgallorojorecords.bandcamp.com/</a><br><div><a href="http://soundcloud.com/alfonsosantimone" target="_blank">soundcloud.com/alfonsosantimone</a></div><div><a href="http://www.facebook.com/alfonsosantimone" target="_blank">www.facebook.com/alfonsosantimone</a><br></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 7, 2021 at 12:31 PM alfonso santimone <<a href="mailto:alfonso.santimone@gmail.com">alfonso.santimone@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks Sebastian.<div>I'll check it out.</div><div>best</div><div>a.<br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><a href="https://elgallorojorecords.bandcamp.com/" target="_blank">www.elgallorojorecords.bandcamp.com/</a><br><div><a href="http://soundcloud.com/alfonsosantimone" target="_blank">soundcloud.com/alfonsosantimone</a></div><div><a href="http://www.facebook.com/alfonsosantimone" target="_blank">www.facebook.com/alfonsosantimone</a><br></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 7, 2021 at 1:54 AM Sebastian Shader via Pd-list <<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="color:black;font:10pt arial">
<div> <span style="color:rgb(0,0,0);font-family:arial;font-size:13.3333px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none;float:none;display:inline">it seems like this is the kind of situation that [bag] was created for - if the incoming velocity is 0 when the sustain pedal is held, instead of </span><span style="color:rgb(0,0,0);font-family:arial;font-size:10pt;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">sending that noteoff to the synth, add that note to the [bag] (like [64 1(). Then when the pedal is released [flush( the values from the [bag] </span><span style="color:rgb(0,0,0);font-family:arial;font-size:10pt;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">and send them to a [pack f 0] before sending them to the destination. here's a little abstraction & help patch<font size="2">.</font></span>
<div style="color:rgb(0,0,0);font-family:arial;font-size:13.3333px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><br>
</div>

<div style="color:rgb(0,0,0);font-family:arial;font-size:13.3333px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">-seb</div>
</div>

<div> <br>
</div>

<div style="font-family:helvetica,arial;font-size:10pt;color:black">-----Original Message-----<br>
From: alfonso santimone <<a href="mailto:alfonso.santimone@gmail.com" target="_blank">alfonso.santimone@gmail.com</a>><br>
To: <a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a> <<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>><br>
Sent: Wed, Jan 6, 2021 3:23 pm<br>
Subject: Re: [PD] Polyphonic voice allocation and sustain pedal<br>
<br>

<div id="gmail-m_-7432699093027856677gmail-m_-2605705859354526982yiv0169872725">
<div>
<div dir="ltr">Probably should cause a problem if a MIDI Note Number 0 is received.
<div><br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr"><a rel="nofollow noopener noreferrer" shape="rect" href="https://elgallorojorecords.bandcamp.com/" target="_blank">www.elgallorojorecords.bandcamp.com/</a><br clear="none">
<div><a rel="nofollow noopener noreferrer" shape="rect" href="http://soundcloud.com/alfonsosantimone" target="_blank">soundcloud.com/alfonsosantimone</a></div>

<div><a rel="nofollow noopener noreferrer" shape="rect" href="http://www.facebook.com/alfonsosantimone" target="_blank">www.facebook.com/alfonsosantimone</a><br clear="none"></div>
</div>
</div>
</div>
</div>
</div>
<br clear="none"></div>
</div>
<br clear="none">
<div id="gmail-m_-7432699093027856677gmail-m_-2605705859354526982yiv0169872725yqt05943">
<div>
<div dir="ltr">On Wed, Jan 6, 2021 at 10:28 PM alfonso santimone <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:alfonso.santimone@gmail.com" target="_blank">alfonso.santimone@gmail.com</a>> wrote:<br clear="none"></div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Thanks again Hans for sharing this, it works just fine!
<div>Probably there's a little "error" and i wonder why it work fine anyway at least at a quick test.</div>

<div>In the middle branch (the leftmost one of the pedal off case with the "bagoff const 0" message) after the [until] you took the reading index for "bagoff" array from the [+ 1] object.</div>

<div>So this way the index goes from 1 to 128. Shouldn't the index come from the [f ] object in the counter so the index goes from 0 to 127?</div>

<div>just curious.</div>

<div>thanks</div>

<div>a.</div>

<div><br clear="none"></div>

<div><br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr"><a rel="nofollow noopener noreferrer" shape="rect" href="https://elgallorojorecords.bandcamp.com/" target="_blank">www.elgallorojorecords.bandcamp.com/</a><br clear="none">
<div><a rel="nofollow noopener noreferrer" shape="rect" href="http://soundcloud.com/alfonsosantimone" target="_blank">soundcloud.com/alfonsosantimone</a></div>

<div><a rel="nofollow noopener noreferrer" shape="rect" href="http://www.facebook.com/alfonsosantimone" target="_blank">www.facebook.com/alfonsosantimone</a><br clear="none"></div>
</div>
</div>
</div>
</div>
</div>
<br clear="none"></div>
</div>
<br clear="none">
<div>
<div dir="ltr">On Wed, Jan 6, 2021 at 6:30 PM alfonso santimone <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:alfonso.santimone@gmail.com" target="_blank">alfonso.santimone@gmail.com</a>> wrote:<br clear="none"></div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Thanks Hans!
<div>i'll take a look in the next days.</div>

<div>a.</div>

<div><br clear="all">
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr"><a rel="nofollow noopener noreferrer" shape="rect" href="https://elgallorojorecords.bandcamp.com/" target="_blank">www.elgallorojorecords.bandcamp.com/</a><br clear="none">
<div><a rel="nofollow noopener noreferrer" shape="rect" href="http://soundcloud.com/alfonsosantimone" target="_blank">soundcloud.com/alfonsosantimone</a></div>

<div><a rel="nofollow noopener noreferrer" shape="rect" href="http://www.facebook.com/alfonsosantimone" target="_blank">www.facebook.com/alfonsosantimone</a><br clear="none"></div>
</div>
</div>
</div>
</div>
</div>
<br clear="none"></div>
</div>
<br clear="none">
<div>
<div dir="ltr">On Wed, Jan 6, 2021 at 9:11 AM <a rel="nofollow noopener noreferrer" shape="rect" href="mailto:info@hansroels.be" target="_blank">info@hansroels.be</a> <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:info@hansroels.be" target="_blank">info@hansroels.be</a>> wrote:<br clear="none"></div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  
<div>
    
<div>hello,</div>

    
<div>Here is a vanilla patch simulating a
      sustain pedal. It stores the note-offs while the pedal is down and
      releases them when the pedal is lifted.</div>

    
<div><br clear="none">
    </div>

    
<div>best, Hans<br clear="none">
    </div>

    
<div><br clear="none">
    </div>

    
<div>On 1/3/21 7:55 PM, alfonso santimone
      wrote:<br clear="none">
    </div>

    <blockquote type="cite">
      
      
<div dir="ltr">Let's see...if any other Pure Data fellow will test
        your [else\voices] and [else\suspedal] externals i guess we can
        have more test cases and see what's going on.
        
<div>In the meantime i'll still try to find the simplest way to
          show my findings while testing this particular Else objects
          ;-)</div>

        
<div><br clear="none">
        </div>

        
<div>best!</div>

        
<div><br clear="none">
        </div>

        
<div>
          
<div>
            
<div dir="ltr">
              
<div dir="ltr">
                
<div>
                  
<div dir="ltr"><a rel="nofollow noopener noreferrer" shape="rect" href="https://elgallorojorecords.bandcamp.com/" target="_blank">www.elgallorojorecords.bandcamp.com/</a><br clear="none">
                    
<div><a rel="nofollow noopener noreferrer" shape="rect" href="http://soundcloud.com/alfonsosantimone" target="_blank">soundcloud.com/alfonsosantimone</a></div>

                    
<div><a rel="nofollow noopener noreferrer" shape="rect" href="http://www.facebook.com/alfonsosantimone" target="_blank">www.facebook.com/alfonsosantimone</a><br clear="none">
                    </div>

                  </div>

                </div>

              </div>

            </div>

          </div>

          <br clear="none">
        </div>

      </div>

      <br clear="none">
      
<div>
        
<div dir="ltr">On Sun, Jan 3, 2021 at 7:42 PM
          Alexandre Torres Porres <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>> wrote:<br clear="none">
        </div>

        <blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          
<div dir="ltr">
            
<div dir="ltr"><br clear="none">
            </div>

            <br clear="none">
            
<div>
              
<div dir="ltr">Em dom., 3 de jan. de
                2021 às 07:18, alfonso santimone <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:alfonso.santimone@gmail.com" target="_blank">alfonso.santimone@gmail.com</a>>
                escreveu:<br clear="none">
              </div>

              <blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                
<div>
                  
<div>I'm doing some experiment with
                    [else/voices] and [else/suspedal] to. Alexandre
                    Torres Porres is doing a very good work with Else
                    lib. </div>

                </div>

              </blockquote>
              
<div><br clear="none">
              </div>

              
<div>but unfortunately I can't reproduce your bug and
                understand what you need :( I'll gladly work on a
                solution with that when the picture is clear ;)</div>

            </div>

          </div>

        </blockquote>
      </div>

      <br clear="none">
      <fieldset></fieldset>
      <pre>_______________________________________________
<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a rel="nofollow noopener noreferrer" shape="rect" href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a>
</pre>
    </blockquote>
    
<div><br clear="none">
    </div>

    
<div>-- <br clear="none">
    </div>

  </div>


_______________________________________________<br clear="none">
<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br clear="none">
UNSUBSCRIBE and account-management -> <a rel="nofollow noopener noreferrer" shape="rect" href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br clear="none">
</blockquote></div>

</blockquote></div>

</blockquote></div>
</div>
</div>
</div>

<div id="gmail-m_-7432699093027856677gmail-m_-2605705859354526982yqt59627">_______________________________________________<br clear="none"><a shape="rect" href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br clear="none">UNSUBSCRIBE and account-management -> <a shape="rect" href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br clear="none"></div>
</div>
</div>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br>
</blockquote></div>
</blockquote></div>