Hello Geoff!
Just read your reply, working with javascript i can't see the necessity, but then again my sequenser is not midicompatible although it will import midifiles to play.
I can show you what is sent out to a port using javascript, and this works fine for every type of event i can find even bankchanges. You can see below it is silly simple dealing with it.
Only thing to realise that some messages 2 bytes instead of three, "program change, note off".
I just look at the range to determine the type of event, so do not need to split the byte.
Thanks again for the help Geoof, i think to Cristmas i will have a somewhat functional midisequenser load save edit and so on, i probably should have a timeview and a FPS view instead of just a barview. But the barview did seem most easy to start with.
Looking at the code below i do realise now i split, but i still think a decimal range is easier handled then pairing two 4-bit hexvalues.
Thanks again for the help Geoff!
function sendProgram() {
//Set program on the track
programNbr = document.getElementById("prog_sel"

.value;
//Set channel
midiCh = 192 + trackMidiCh-1;
//Build message for midi synth
settingChange = [midiCh, programNbr];
outportarr[outportindex].send(settingChange);
}
function setVol(){
CCchan=176+trackMidiCh-1;
CCtype=7;
CCvol=document.getElementById("volID"

.value;
settingChange=[CCchan,CCtype,CCvol];
outportarr[outportindex].send(settingChange);
}
function setPan(){
CCchan=176+trackMidiCh-1;
CCtype=10;
CCpan=document.getElementById("panID"

.value;
settingChange=[CCchan,CCtype,CCpan];
outportarr[outportindex].send(settingChange);
}
function setRev(){
CCchan=176+trackMidiCh-1;
CCtype=91;
CCrev=document.getElementById("revID"

.value;
settingChange=[CCchan,CCtype,CCrev];
outportarr[outportindex].send(settingChange);
}
function setChor(){
CCchan=176+trackMidiCh-1;
CCtype=93;
CCchor=document.getElementById("chorID"

.value;
settingChange=[CCchan,CCtype,CCchor];
outportarr[outportindex].send(settingChange);
}
function setMod(){
CCchan=176+trackMidiCh-1;
CCtype=1;
CCmod=document.getElementById("modID"

.value;
settingChange=[CCchan,CCtype,CCmod];
outportarr[outportindex].send(settingChange);
}
function setHold(){
CCchan=176+trackMidiCh-1;
CCtype=64;
CChold=document.getElementById("holdID"

.value;
settingChange=[CCchan,CCtype,CChold];
outportarr[outportindex].send(settingChange);
}