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


Groups > comp.lang.javascript > #35055

Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API?

Newsgroups comp.lang.javascript
Date 2018-05-21 02:28 -0700
References <c740cb7b-afa5-40b8-9762-f6d69814ba54@googlegroups.com> <87c5b6a8-3c61-4115-9357-f2972fa7c4af@googlegroups.com> <5f588ffe-2a39-420b-9d84-289afd9d23ec@googlegroups.com>
Message-ID <6862a231-cbdc-486e-8f74-efcbe20441ca@googlegroups.com> (permalink)
Subject Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API?
From Jonas Thörnvall <jonas.thornvall@gmail.com>

Show all headers | View raw


Den måndag 21 maj 2018 kl. 11:24:52 UTC+2 skrev Jonas Thörnvall:
> Den måndag 21 maj 2018 kl. 11:16:03 UTC+2 skrev Jonas Thörnvall:
> > Den måndag 21 maj 2018 kl. 10:49:30 UTC+2 skrev Jonas Thörnvall:
> > > I get errors when i run the code that slip thru on XP using windows 10, it is probably not the same version of browser and javascript API. 
> > > 
> > > TypeError: Cannot read property 'send' of undefined"
> > > 
> > > Suddenly it says that the midi output port is not defined when i try to reach it, "there is more code but i just show the active where the fail occure. 
> > > 
> > > After ports are read in output should be defined, it is global? But i get error message when i try to send any type of message by using output.send() to port.
> > > 
> > > Well it sure is defined when XP running the code, but it would be nice move over to windows 10.  
> > > 
> > > if (navigator.requestMIDIAccess) {
> > >     navigator.requestMIDIAccess()
> > >         .then(success, failure);
> > > }
> > > 
> > > function failure () {
> > >     console.error('No access to your midi devices.'+ + msg )
> > > }
> > > 
> > > 
> > > function success (midi) {
> > >     mid=midi;
> > >     inputs = midi.inputs.values();
> > >     // inputs outputs are Iterators
> > >     for (input = inputs.next(); input && !input.done; input = inputs.next()) {
> > >        // each time there is a midi message call the onMIDIMessage function
> > >        input.value.onmidimessage = onMIDIMessage;
> > >     } 
> > >     InitTime= setInterval(init,1000);
> > > }
> > > 
> > > function init(){
> > >  clearInterval(InitTime);
> > >  selectPorts();
> > >  sendProgram();
> > > }
> > > 
> > > function sendProgram(){
> > >     //Set program on the track
> > >     programC=document.getElementById("prog_sel").value;
> > >     sysexC=192+channelC-1;
> > >     output = mid.outputs.get(outportindex);
> > >     settingChange = [sysexC,programC];
> > >     output.send(settingChange);
> > > }
> > > 
> > > function selectPorts(){
> > >    outputs = mid.outputs.values();
> > >    inputs = mid.inputs.values();
> > >    for (output = outputs.next(); output && !output.done; output = outputs.next()) {
> > >        var deviceOut = output.value.name;
> > >        console.log(deviceOut);
> > >        var optout = document.createElement("option");
> > >        optout.text = deviceOut;
> > >        document.getElementById("out_portsel").add(optout);
> > >    }
> > >    //output = mid.outputs.get(outportindex);
> > >    for (input = inputs.next(); input && !input.done; input = inputs.next()) {
> > >            var deviceIn = input.value.name;
> > >            var optin = document.createElement("option");
> > >            optin.text = deviceIn;
> > >            document.getElementById("in_portsel").add(optin);
> > >   }
> > 
> > https://3d16zci4vuzyxt8hxvovrg-on.drv.tw/Website/midi.html
> > Well here is the full code, you may have to reload to get ports initiated, of course you need some midi ports in/out.
> > 
> > As you may see there is an error when i try send messages to port, it isn't there in XP browser.
> 
> I realise you guys probably do not have any midi in device, so it may be a bit hard to check.

I am not even sure that windows 10 show up outport Microsoft GS Wavetable synth, but there is a fix you can install Coolsoft midimapper to get Microsoft GS outport selectable.

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


Thread

Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 01:49 -0700
  Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 02:15 -0700
    Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 02:24 -0700
      Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 02:28 -0700
        Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 02:30 -0700
  Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-21 12:13 +0200
    Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 03:47 -0700
    Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 03:48 -0700
    Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 04:02 -0700
    Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 04:24 -0700
      Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 04:46 -0700
        Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 05:11 -0700
          Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 05:21 -0700
            Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 05:21 -0700
              Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 05:27 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 05:30 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 05:48 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 08:13 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? John G Harris <niam@jghnorth.org.uk.invalid> - 2018-05-21 18:27 +0100
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 12:42 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 12:53 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 12:58 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 13:07 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-21 23:42 +0200
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 21:53 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-22 10:11 +0200
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 22:02 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 23:09 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 23:50 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-21 23:57 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-22 00:03 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-22 00:28 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-22 00:43 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-22 00:57 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-22 01:05 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-22 10:28 +0200
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-22 02:01 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-22 02:14 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-22 02:20 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-05-23 00:08 -0700
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-22 10:15 +0200
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-22 10:14 +0200
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-22 10:13 +0200
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-22 10:13 +0200
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-22 10:12 +0200
                Re: Script work with windows XP, "opera,chrome" but not in Windows 10 something changed in the midi API? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-05-22 10:11 +0200

csiph-web