Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #35298

Re: Pair matching algorithm "hard?"

Newsgroups comp.lang.javascript
Date 2018-06-24 09:17 -0700
References <81af6402-843a-4d3a-a888-81d9776e6bbe@googlegroups.com> <1740bf3f-993a-4546-8e60-1f246499e39e@googlegroups.com> <13th7ihqnys6m.1py2jfza3m6y2.dlg@40tude.net> <tjnfx3qu3mm2.12e6bqr1lkr2i$.dlg@40tude.net>
Message-ID <df96b044-5afd-4a89-a604-7c2958f7d2ac@googlegroups.com> (permalink)
Subject Re: Pair matching algorithm "hard?"
From Jonas Thörnvall <jonas.thornvall@gmail.com>

Show all headers | View raw


Den onsdag 20 juni 2018 kl. 15:37:30 UTC+2 skrev JJ:
> On Wed, 20 Jun 2018 20:31:22 +0700, JJ wrote:
> > 
> > You forgot to take account of the MIDI channel.
> [snip]
> 
> Also... do not assume that a MIDI track is exclusively for a specific MIDI
> channel. A Channel event may exist in any MIDI track. MIDI tracks are simply
> a separation of MIDI events in a `MID` file format. They do not exist in the
> MIDI protocol.

Well i took the 15 munutes to fix it today, i think it is correct. But it also check what output port the midievent use. So this sequensers tracks can use both different mididevices and midichannels on same track.

function listTrackMain(z){
  console.log(z);
  eventlist="";var j=0;y=80;x=20;
  containerMain();
  listMainSetting();
  for (var i=0;i<track[z].midiMess.length;i++){
   eventlist="";
   //Generate textstring eventlist
   if(track[z].midiMess[i].data0=="128"){ }
   else if(track[z].midiMess[i].data0=="144"){
       listport=track[z].midiMess[i].outport;
       listchannel=track[z].midiMess[i].midichannel;
       notenumber=track[z].midiMess[i].data1;
       note=getNote(notenumber);
       j=i+1;
       while(track[z].midiMess[j].data1!=notenumber && listport!=track[z].midiMess[j].outport && listchannel!=track[z].midiMess[j].midichannel){
         j++;       
       }
       duration=track[z].midiMess[j].time.toFixed(3)-track[z].midiMess[i].time.toFixed(3);
       eventlist+=note+"  t="+track[z].midiMess[i].time.toFixed(3)+"  Duration "+duration+"  Vel "+track[z].midiMess[i].data2+"\n";
       printEventMain(eventlist,x,y);
       y=y+20;
    } 
  }
}

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 03:26 -0700
  Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 03:31 -0700
    Re: Pair matching algorithm "hard?" Wally W. <ww84wa@aim.com> - 2018-06-20 08:45 -0400
      Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 10:16 -0700
    Re: Pair matching algorithm "hard?" JJ <jj4public@vfemail.net> - 2018-06-20 20:31 +0700
      Re: Pair matching algorithm "hard?" JJ <jj4public@vfemail.net> - 2018-06-20 20:37 +0700
        Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 10:22 -0700
        Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 10:55 -0700
          Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 11:26 -0700
            Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 13:12 -0700
              Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 13:15 -0700
                Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 13:20 -0700
                Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 13:26 -0700
        Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-24 09:17 -0700
          Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-24 09:27 -0700
      Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 10:19 -0700
      Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 10:28 -0700
        Re: Pair matching algorithm "hard?" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-20 10:37 -0700

csiph-web