torsdag 1 juli 2021 kl. 22:03:43 UTC+2 skrev Jonas Thörnvall:
To set the slidebar using reading out inputfield work fine, two lower functions.
But read out the value and mirror it to input field does not work???
I can send slidebar values to synth without problem?
Is the task to mirror value to input field to fast?
It is not even give the correct values for alerts?
function velocityslideBar(){
var slVol=document.getElementById("noteslidebar").value;
alert(slVol);
document.getElementById("NOTEVEL").value=slVol;
}
function noteslideBar(){
var slNote=document.getElementById("velocityslidebar").value;
alert(slNote);
document.getElementById("NOTEVAL").value=slNote;
}
function setvelocityBar(){
var slideVol=document.getElementById("NOTEVEL").value; document.getElementById("velocityslidebar").value=slideVol;
}
function setnoteBar(){
slideNote=document.getElementById("NOTEVAL").value; document.getElementById("noteslidebar").value=slideNote;
}
Full example to run below only work one way?
<script>
function velBar(){
var slVol=document.getElementById("notbar").value;
alert(slVol);
document.getElementById("NOTEVEL").value=slVol;
}
function notBar(){
var slNote=document.getElementById("velbar").value;
alert(slNote);
document.getElementById("NOTEVAL").value=slNote;
}
function setvelocityBar(){
var slVol=document.getElementById("NOTEVEL").value;
document.getElementById("velbar").value=slVol;
}
function setnoteBar(){
var slNote=document.getElementById("NOTEVAL").value;
document.getElementById("notbar").value=slNote;
}
</script>
<BODY>
KEYNR <input type="text" id="NOTEVAL" name="NOTEVAL" value="" onChange=setnoteBar();size=4><br>
VELOCITY <input type="text" id="NOTEVEL" name="NOTEVEL" value="" onChange=setvelocityBar();size=4><br>
KEY NUMBER <input type="range" onChange="notBar()" id="notbar" min="0" max="127" value="64" orient="horisontal"/><br>
VELOCITY </B><input type="range" onChange="velBar()" id="velbar" min="0" max="127" value="64" orient="horisontal"/><br>
</BODY>
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)