Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #34419 > unrolled thread
| Started by | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| First post | 2018-01-02 00:44 -0800 |
| Last post | 2018-01-04 01:15 -0800 |
| Articles | 2 on this page of 22 — 2 participants |
Back to article view | Back to comp.lang.javascript
Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-02 00:44 -0800
Re: Reach MIDI ports using Javascript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-02 11:46 +0100
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-02 07:14 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-02 07:23 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-02 13:53 -0800
Re: Reach MIDI ports using Javascript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-02 22:59 +0100
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-02 15:22 -0800
Re: Reach MIDI ports using Javascript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-03 00:30 +0100
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-02 16:06 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-02 16:39 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-02 16:42 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-02 16:57 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-03 01:21 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-03 09:49 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-02 15:26 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-03 11:38 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-03 12:22 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-03 12:31 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-03 12:32 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-03 12:37 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-03 18:00 -0800
Re: Reach MIDI ports using Javascript Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-04 01:15 -0800
Page 2 of 2 — ← Prev page 1 [2]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-03 18:00 -0800 |
| Message-ID | <2e303d2b-c598-4b94-9ece-43f86de5bec1@googlegroups.com> |
| In reply to | #34441 |
Den onsdag 3 januari 2018 kl. 21:37:12 UTC+1 skrev Jonas Thörnvall:
> Den onsdag 3 januari 2018 kl. 21:32:35 UTC+1 skrev Jonas Thörnvall:
> > Den onsdag 3 januari 2018 kl. 21:31:19 UTC+1 skrev Jonas Thörnvall:
> > > Den onsdag 3 januari 2018 kl. 21:22:46 UTC+1 skrev Jonas Thörnvall:
> > > > Den onsdag 3 januari 2018 kl. 20:38:48 UTC+1 skrev Jonas Thörnvall:
> > > > > Den tisdag 2 januari 2018 kl. 09:45:04 UTC+1 skrev Jonas Thörnvall:
> > > > > > Hello i found a couple of sites that let you select windows multimedia MME? MIDI ports. Is there an api that let you do that?
> > > > > >
> > > > > > If so can i make a local script "application" that generate and trigger "midi note on off by mouse press", any link to API or a simple script that just trigger a "note on, note off" using a midiport, would be highly appreciated.
> > > > > >
> > > > > > For those who wonder what i talk about, take a look at Midi in/out on this page.
> > > > > > Is it using an api to list the ports?
> > > > > >
> > > > > > http://www.multiplayerpiano.com/
> > > > >
> > > > > I managed to send note data to correct midi out port, but i do not know howto echo midi in to midi out, can someone helpout?
> > > >
> > > > Now i manage to grab and play notes, but that is not what i do want. I just want to echo the in port to the outport and get sustain and other data when play notes. Anyone?
> > > >
> > > > function playnote(message){
> > > > console.log(message.data[1]);
> > > > output = mid.outputs.get(outportindex);
> > > > var noteOnMessage = [0x90, message.data[1], 0x7f];
> > > > //Can play a note now but how can i echo the input.value.onmidimessage to output?
> > > > output.send( noteOnMessage ); //omitting the timestamp means send immediately.
> > > > console.log("was here");
> > > > }
> > >
> > > Did it done for today
> > >
> > > function playnote(message){
> > > console.log(message.data[1]);
> > > output = mid.outputs.get(outportindex);
> > > var noteOnMessage = [message.data[0], message.data[1], message.data[2]];
> > > //Can play a note now but how can i echo the input.value.onmidimessage to output?
> > > output.send( noteOnMessage ); //omitting the timestamp means send immediately.
> > > console.log("was here");
> > > }
> >
> > Program and bankchanges tomorrow.
>
> And midichannel maybe i manage to make something that can load play and save record the midi timed events tomorrow that would be nice.
I try send my own program change data but i guess the mididata have a format, and i do not know is so of course i get message undefined. Can someone help me out howto create a midimessage from scratch rather then copy.
To be honest i don't really know what the midi message object/data? look like.
I call change program from an option select list with a number.
Here is how i copy the note on midimessage data to outport.
output = mid.outputs.get(outportindex);
//0 is message type, 1 is note, 2 is volume "these are copied from message //generated by keyboard example noteOnMessage = [0x90, 60, 0x7f];
var noteOnMessage = [message.data[0], message.data[1], message.data[2]];
output.send( noteOnMessage );
I do know that program change is 0xC0; and i know howto pick the integer program select. See below.
But i am clueless how to get them into the message ?object?
It isn't defined global...
"i admit i have a hard time with to deal with scopes of objects/variables and tend to make them global" maybe i learn some day.
I could need some help create the "send message object" from the midi message data that i know howto handle.
function changeProgram(){
message.data[0]=0xC0;
message.data[1]=document.getElementById("prog_sel").selectedIndex;
output = mid.outputs.get(outportindex);
var proChange = [message.data[0], message.data[1]];
output.send( proChange );
}
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-04 01:15 -0800 |
| Message-ID | <aabb9e90-e497-4ff5-a375-cbee593c4848@googlegroups.com> |
| In reply to | #34442 |
Den torsdag 4 januari 2018 kl. 03:00:24 UTC+1 skrev Jonas Thörnvall:
> Den onsdag 3 januari 2018 kl. 21:37:12 UTC+1 skrev Jonas Thörnvall:
> > Den onsdag 3 januari 2018 kl. 21:32:35 UTC+1 skrev Jonas Thörnvall:
> > > Den onsdag 3 januari 2018 kl. 21:31:19 UTC+1 skrev Jonas Thörnvall:
> > > > Den onsdag 3 januari 2018 kl. 21:22:46 UTC+1 skrev Jonas Thörnvall:
> > > > > Den onsdag 3 januari 2018 kl. 20:38:48 UTC+1 skrev Jonas Thörnvall:
> > > > > > Den tisdag 2 januari 2018 kl. 09:45:04 UTC+1 skrev Jonas Thörnvall:
> > > > > > > Hello i found a couple of sites that let you select windows multimedia MME? MIDI ports. Is there an api that let you do that?
> > > > > > >
> > > > > > > If so can i make a local script "application" that generate and trigger "midi note on off by mouse press", any link to API or a simple script that just trigger a "note on, note off" using a midiport, would be highly appreciated.
> > > > > > >
> > > > > > > For those who wonder what i talk about, take a look at Midi in/out on this page.
> > > > > > > Is it using an api to list the ports?
> > > > > > >
> > > > > > > http://www.multiplayerpiano.com/
> > > > > >
> > > > > > I managed to send note data to correct midi out port, but i do not know howto echo midi in to midi out, can someone helpout?
> > > > >
> > > > > Now i manage to grab and play notes, but that is not what i do want. I just want to echo the in port to the outport and get sustain and other data when play notes. Anyone?
> > > > >
> > > > > function playnote(message){
> > > > > console.log(message.data[1]);
> > > > > output = mid.outputs.get(outportindex);
> > > > > var noteOnMessage = [0x90, message.data[1], 0x7f];
> > > > > //Can play a note now but how can i echo the input.value.onmidimessage to output?
> > > > > output.send( noteOnMessage ); //omitting the timestamp means send immediately.
> > > > > console.log("was here");
> > > > > }
> > > >
> > > > Did it done for today
> > > >
> > > > function playnote(message){
> > > > console.log(message.data[1]);
> > > > output = mid.outputs.get(outportindex);
> > > > var noteOnMessage = [message.data[0], message.data[1], message.data[2]];
> > > > //Can play a note now but how can i echo the input.value.onmidimessage to output?
> > > > output.send( noteOnMessage ); //omitting the timestamp means send immediately.
> > > > console.log("was here");
> > > > }
> > >
> > > Program and bankchanges tomorrow.
> >
> > And midichannel maybe i manage to make something that can load play and save record the midi timed events tomorrow that would be nice.
>
> I try send my own program change data but i guess the mididata have a format, and i do not know is so of course i get message undefined. Can someone help me out howto create a midimessage from scratch rather then copy.
>
> To be honest i don't really know what the midi message object/data? look like.
> I call change program from an option select list with a number.
>
> Here is how i copy the note on midimessage data to outport.
> output = mid.outputs.get(outportindex);
>
> //0 is message type, 1 is note, 2 is volume "these are copied from message //generated by keyboard example noteOnMessage = [0x90, 60, 0x7f];
>
> var noteOnMessage = [message.data[0], message.data[1], message.data[2]];
> output.send( noteOnMessage );
>
> I do know that program change is 0xC0; and i know howto pick the integer program select. See below.
>
> But i am clueless how to get them into the message ?object?
> It isn't defined global...
> "i admit i have a hard time with to deal with scopes of objects/variables and tend to make them global" maybe i learn some day.
>
> I could need some help create the "send message object" from the midi message data that i know howto handle.
>
> function changeProgram(){
> message.data[0]=0xC0;
> message.data[1]=document.getElementById("prog_sel").selectedIndex;
> output = mid.outputs.get(outportindex);
> var proChange = [message.data[0], message.data[1]];
> output.send( proChange );
> }
Sorry i was a bit tired and had a vodka to much, there is no problem create a program change message.
function changeProgram(){
sysexC=0xC0;
programC=document.getElementById("prog_sel").selectedIndex;
output = mid.outputs.get(outportindex);
var programChange = [sysexC,programC];
output.send( programChange );
}
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.javascript
csiph-web