Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #37529
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2019-10-12 10:31 -0700 |
| References | <73c2a298-a543-4096-a642-47c5c9a19a84@googlegroups.com> <qnsn4u$vjo$1@gwaiyur.mb-net.net> |
| Message-ID | <93e5326f-a355-43c6-aa85-d5d637dfd395@googlegroups.com> (permalink) |
| Subject | Re: Signal boundary problem and how to correct it. |
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
Den lördag 12 oktober 2019 kl. 16:15:00 UTC+2 skrev Jan Bruns:
> Jonas Thörnvall:
>
> > This is an on and off problem. The general rule for midi is there should
> > be an on "for the specific note, before there is an off for it".
> > Otherwise weird things happen when you playup. One other thing to know,
> > it is the interval between on and off that is played.
> >
> > This problem is due to the musician "user", may push midi notes outside
> > the boundaries of the specified recording time/ slot .
>
> var t=track[rectrack].midiMess;
>
> while (t[i].data0 || undefined && (t[i].data0==144 && t[i].time>=rs)){
>
>
> // So for any midi event related to controller 0, you append a note-off
> event for controller 0, after previous attempts to stop after the first
> non-Note-On Message for Controller 0 (found in a backwards search)
> revealed that you didn't catch many cases?
>
>
>
>
> var savetime=t[0].time;
> var i=0;var j=0;
> earlyfound=false;
>
> while (t[i].time<t[i+1].time && i<t.length-2){
> console.log("savetime "+savetime+"> midimess "+t[i+1].time);
> i++;
> }
>
> if (savetime>t[i+1].time) {earlyfound=true;console.log("found early");}
>
> // earlyfound==(t[0].time>t[t.length-1].time)
>
> j=i+1; // == length-1
> i=0;
> if (earlyfound==true){
> console.log("found early note");
> while (i<j) {
> t[i].time=rs+1;
> i++;
> }
> }
>
> // So, if the last Message in MidiMess has a timestamp before the first
> Message in MidiMess, all Messages except the last get the same timestamp?
Oh, sorry right now i crossed out the function calls i think?, and for some reason i can not upload updates to host. Refuse me to login.
But as i said code to scroll thru all must be written i though i done that, but not sure.I do not think i have because you would have to have an array with all "notes" and cross them of after you matched. I think i just do the early cases the ones before any note on....
So i think i know what is wrong, it just took a time to realise that "starting" off notes could come anywhere in stream.
Implementing it well not that fun, because i have to keep track of which one that is cleared....
Was a long time since i did a matching with a conditional loop looking into extra array "if in cleared notes do nothing" else "early case fix it".
And it have to be done from both side, Start "offs" and end "ons"
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Signal boundary problem and how to correct it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-09 08:48 -0700
Re: Signal boundary problem and how to correct it. Jan Bruns <ebay@abnuto.de> - 2019-10-12 14:14 +0000
Re: Signal boundary problem and how to correct it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-12 10:19 -0700
Re: Signal boundary problem and how to correct it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-12 10:31 -0700
Re: Signal boundary problem and how to correct it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-12 10:34 -0700
Re: Signal boundary problem and how to correct it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-12 23:26 -0700
Re: Signal boundary problem and how to correct it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-12 23:55 -0700
Re: Signal boundary problem and how to correct it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-13 00:07 -0700
Re: Signal boundary problem and how to correct it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-13 00:31 -0700
Re: Signal boundary problem and how to correct it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-13 00:47 -0700
Re: Signal boundary problem and how to correct it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-17 00:30 -0700
Re: Signal boundary problem and how to correct it. Arno Welzel <usenet@arnowelzel.de> - 2019-10-17 10:34 +0200
Re: Signal boundary problem and how to correct it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-17 10:08 -0700
csiph-web