missing www
This commit is contained in:
parent
5f7c61f616
commit
cfc7c70d16
131 changed files with 11126 additions and 661 deletions
284
www/auralls.html
284
www/auralls.html
|
|
@ -59,7 +59,7 @@
|
|||
</div>
|
||||
</a>
|
||||
|
||||
<a href="settings.html">
|
||||
<a href="settings2.html">
|
||||
<div class="webaudiobut">
|
||||
<div align="center" class="navled">
|
||||
Settings
|
||||
|
|
@ -115,11 +115,11 @@
|
|||
<div class="content">
|
||||
<div class="TopRackGrid">
|
||||
<div>
|
||||
<h2>
|
||||
/TL Aurora
|
||||
<h2 style="margin-bottom: 30px;">
|
||||
LJ Aurora
|
||||
<span class="shade"> </span>
|
||||
</h2>
|
||||
<webaudio-switch id="on" value="1" tooltip="Switch-B" height="35" width="85" src="knobs/switch1.png">
|
||||
<webaudio-switch id="on" value="0" tooltip="Switch-B" height="30" width="90" src="knobs/power.png">
|
||||
</webaudio-switch>
|
||||
</div>
|
||||
<div class="webaudiobut">
|
||||
|
|
@ -473,6 +473,14 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
|
||||
let type = "simu";
|
||||
|
||||
// green (1) PLAYING / cyan (2) PREPARE / blue (3) IDLE
|
||||
let acks = new Array ( "0","PLAYING", "PREPARE", "IDLE");
|
||||
|
||||
// green (1) ACK / yellow (4) INVALID / orange (5) FULL / (6) no connection
|
||||
let stts = new Array ("0", "ACK", "2", "3", "INVALID", "FULL", "no connection");
|
||||
|
||||
var LJ = websocket_uri
|
||||
|
||||
|
||||
|
|
@ -548,30 +556,50 @@
|
|||
newlaser(res[1])
|
||||
break;
|
||||
|
||||
case "/simul":
|
||||
pl = e.data.slice(7);
|
||||
//console.log(pl)
|
||||
pl2 = eval(pl.replace(/[()]/g, ''));
|
||||
break;
|
||||
|
||||
//case "/simul":
|
||||
// pl = e.data.slice(7);
|
||||
// pl2 = eval(pl.replace(/[()]/g, ''));
|
||||
// break;
|
||||
case "/lack/":
|
||||
console.log("/lack "+res[1])
|
||||
//console.log("/lack "+res[1])
|
||||
document.getElementById(res[0].slice(1)).value = res[1];
|
||||
break;
|
||||
|
||||
case "/lstt/":
|
||||
console.log("/lstt "+res[1])
|
||||
//console.log("/lstt "+res[1])
|
||||
document.getElementById(res[0].slice(1)).value = res[1];
|
||||
break;
|
||||
|
||||
case "/point":
|
||||
if (type === 'settings') {
|
||||
//console.log("buffer display"+res[1]);
|
||||
document.getElementById(res[0].slice(1)).value = res[1];
|
||||
}
|
||||
break;
|
||||
|
||||
case "/simul":
|
||||
if (type === 'simu') {
|
||||
//console.log("simul "+res[1]);
|
||||
pl = e.data.slice(7);
|
||||
//console.log(pl)
|
||||
pl2 = eval(pl.replace(/[()]/g, ''));
|
||||
//document.getElementById(res[0].slice(1)).value = res[1];
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
//console.log("default "+res[0].slice(1)+" "+res[1]);
|
||||
//document.getElementById(res[0].slice(1)).value = res[1];
|
||||
//_WS.showstatus(e.data);
|
||||
var element = document.getElementById(res[0].slice(1));
|
||||
if(typeof(element) != 'undefined' && element != null){
|
||||
console.log("default handler for "+res[0].slice(1)+" "+res[1]);
|
||||
document.getElementById(res[0].slice(1)).value = res[1];
|
||||
_WS.showstatus(res[0].slice(1)+" "+res[1])
|
||||
} else{
|
||||
console.log("default handler for "+res[0].slice(1)+" "+res[1]+' : does not exist!');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
onError: function (e) {
|
||||
_WS.showstatus('<span style="color: red;">ERROR:</span> ' + e.data);
|
||||
},
|
||||
|
|
@ -654,8 +682,7 @@
|
|||
}
|
||||
|
||||
function newlaser(id) {
|
||||
|
||||
console.log("newlaser " +id)
|
||||
console.log("newlaser " +id);
|
||||
var laserid = 24+ parseInt(id,10);
|
||||
lasernote = "noteon "+laserid;
|
||||
console.log("laser "+lasernote);
|
||||
|
|
@ -664,7 +691,7 @@
|
|||
|
||||
var x = document.getElementById(lasernote);
|
||||
x.value = 1 ;
|
||||
laser = id
|
||||
laser = id;
|
||||
}
|
||||
|
||||
function nolaser() {
|
||||
|
|
@ -726,42 +753,37 @@
|
|||
|
||||
|
||||
function Dump(e) {
|
||||
var str="";
|
||||
str=e.type + " : " + e.target.id + " : " + e.target.value + " ";
|
||||
console.log(str);
|
||||
log.unshift(str);
|
||||
log.length=1;
|
||||
str="";
|
||||
|
||||
for(var i=19;i>=0;--i) {
|
||||
if(log[i])
|
||||
str+=log[i]+"<br/>";
|
||||
|
||||
var str="";
|
||||
str=e.type + " : " + e.target.id + " : " + e.target.value + " ";
|
||||
console.log(str);
|
||||
log.unshift(str);
|
||||
log.length=1;
|
||||
str="";
|
||||
|
||||
for(var i=19;i>=0;--i) {
|
||||
if(log[i])
|
||||
str+=log[i]+"<br/>";
|
||||
}
|
||||
|
||||
//console.log("have sent "+"/" + e.target.id + " " + e.target.value)
|
||||
//_WS.send("/" + e.target.id + " " + e.target.value);
|
||||
|
||||
var res = e.target.id.split(" ");
|
||||
//console.log(res)
|
||||
|
||||
// on off
|
||||
if (e.target.id === "on" && e.type === "change") {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
//console.log("have sent "+"/" + e.target.id + " " + e.target.value)
|
||||
//_WS.send("/" + e.target.id + " " + e.target.value);
|
||||
|
||||
var res = e.target.id.split(" ");
|
||||
//console.log(res)
|
||||
|
||||
|
||||
// on off
|
||||
if (e.target.id === "on" && e.type === "change") {
|
||||
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
|
||||
// Go to index
|
||||
if (e.target.id === "index" && e.type === "change") {
|
||||
|
||||
window.location.assign("index.html");
|
||||
}
|
||||
|
||||
|
||||
// Fx
|
||||
if (res[0].substring(7,9) === "fx" && e.type === "change") {
|
||||
|
||||
if (res[0].substring(7,9) === "fx" && e.type === "change") {
|
||||
nofx();
|
||||
_WS.send("/"+res[0]+laser+ " "+ res[1]+ " " + e.target.value);
|
||||
var x = document.getElementById(e.target.id);
|
||||
|
|
@ -770,52 +792,45 @@
|
|||
console.log("FX sending " + res[0]+laser+ " "+ res[1]+ " " + e.target.value);
|
||||
}
|
||||
|
||||
|
||||
// Colors
|
||||
if (res[0].substring(7,9) === "co" && e.type === "change") {
|
||||
|
||||
nocolor();
|
||||
_WS.send("/"+res[0]+laser+ " "+ res[1]+ " " + e.target.value);
|
||||
var x = document.getElementById(e.target.id);
|
||||
x.value = 1 ;
|
||||
//_WS.showstatus("Laser "+laser+ " "+ res[1]);
|
||||
console.log("colors sending "+res[0]+laser+ " "+ res[1]+ " " + e.target.value);
|
||||
}
|
||||
|
||||
if (res[0].substring(7,9) === "co" && e.type === "change") {
|
||||
nocolor();
|
||||
_WS.send("/"+res[0]+laser+ " "+ res[1]+ " " + e.target.value);
|
||||
var x = document.getElementById(e.target.id);
|
||||
x.value = 1 ;
|
||||
//_WS.showstatus("Laser "+laser+ " "+ res[1]);
|
||||
console.log("colors sending "+res[0]+laser+ " "+ res[1]+ " " + e.target.value);
|
||||
}
|
||||
|
||||
// Lasers
|
||||
if (res[0] === "noteon" && e.type === "change") {
|
||||
//console.log(e.target.id);
|
||||
//console.log(res);
|
||||
//console.log(res[1] - 24)
|
||||
newlaser(res[1] - 24);
|
||||
_WS.send("/" + e.target.id + " " + e.target.value);
|
||||
|
||||
//nolaser();
|
||||
//nofx();
|
||||
//_WS.send("/" + e.target.id + " " + e.target.value);
|
||||
//var x = document.getElementById(e.target.id);
|
||||
//x.value = 1 ;
|
||||
//laser = res[1] - 24;
|
||||
//console.log("laser "+laser);
|
||||
|
||||
}
|
||||
//console.log(e.target.id);
|
||||
//console.log(res);
|
||||
//console.log(res[1] - 24)
|
||||
newlaser(res[1] - 24);
|
||||
_WS.send("/" + e.target.id + " " + e.target.value);
|
||||
//nolaser();
|
||||
//nofx();
|
||||
//_WS.send("/" + e.target.id + " " + e.target.value);
|
||||
//var x = document.getElementById(e.target.id);
|
||||
//x.value = 1 ;
|
||||
//laser = res[1] - 24;
|
||||
//console.log("laser "+laser);
|
||||
|
||||
}
|
||||
|
||||
// Knobs
|
||||
if (res[0].slice(-1) !== "/" && res[0] !== "noteon") {
|
||||
if (res.length == 1) {
|
||||
console.log("knobs sending "+res[0]+" "+laser+ " " + e.target.value);
|
||||
_WS.send("/" + res[0]+" "+laser+ " " + e.target.value);
|
||||
if (res.length == 1) {
|
||||
console.log("knobs sending "+res[0]+" "+laser+ " " + e.target.value);
|
||||
_WS.send("/" + res[0]+" "+laser+ " " + e.target.value);
|
||||
|
||||
}
|
||||
else {
|
||||
console.log("knobs sending "+res[0]+" "+laser+ " "+ res[1]+ " " + e.target.value);
|
||||
_WS.send("/" + res[0]+" "+laser+ " " + res[1]+" "+ e.target.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else {
|
||||
console.log("knobs sending "+res[0]+" "+laser+ " "+ res[1]+ " " + e.target.value);
|
||||
_WS.send("/" + res[0]+" "+laser+ " " + res[1]+" "+ e.target.value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -829,79 +844,54 @@
|
|||
//
|
||||
// Simulator canvas : store Reference To The Canvas & Set Context
|
||||
//
|
||||
|
||||
|
||||
var canvas = document.getElementById("canvas");
|
||||
var ctx = canvas.getContext("2d");
|
||||
var lastpoint = { x: 0, y: 0, color: 0};
|
||||
ctx.clearRect(0,0,400,400);
|
||||
var zoom = 0.5;
|
||||
//ctx.save
|
||||
|
||||
|
||||
// Todo : laser point will have black points to go from a polyline to another. Need to discard those black points.
|
||||
|
||||
// Draws every segment received, except black colored target ones
|
||||
function draw() {
|
||||
|
||||
|
||||
// Clear Canvas At The Start Of Every Frame
|
||||
//ctx.restore
|
||||
|
||||
if (pl2.length > 0)
|
||||
{
|
||||
|
||||
// Begin a new path
|
||||
// 0.7 reduces max coordinates in a more browser compatible resolution.
|
||||
ctx.clearRect(0,0,400,400);
|
||||
ctx.beginPath();
|
||||
|
||||
ctx.moveTo(pl2[0]*zoom, pl2[1]*zoom);
|
||||
lastpoint.color = pl2[2];
|
||||
|
||||
// Draw n Lines
|
||||
for (var i = 0; i < pl2.length/3; i++)
|
||||
{
|
||||
|
||||
// New point has the same color -> add a new line to the new point
|
||||
if (pl2[2+(i*3)] === lastpoint.color)
|
||||
{
|
||||
ctx.lineTo(pl2[i*3]*zoom, pl2[1+(i*3)]*zoom);
|
||||
}
|
||||
|
||||
// New point has different color -> stroke with previous color
|
||||
if (pl2[2+(i*3)] != lastpoint.color)
|
||||
{
|
||||
ctx.strokeStyle = "#"+(lastpoint.color + Math.pow(16, 6)).toString(16).slice(-6);
|
||||
ctx.stroke();
|
||||
ctx.closePath()
|
||||
//ctx.restore
|
||||
ctx.beginPath();
|
||||
//ctx.clearRect(0,0,400,400);
|
||||
|
||||
ctx.moveTo(pl2[i*3]*zoom, pl2[1+(i*3)]*zoom);
|
||||
}
|
||||
|
||||
// Last point -> stroke with current color
|
||||
if (i === (pl2.length/3)-1 )
|
||||
{
|
||||
ctx.moveTo(pl2[i*3]*zoom, pl2[1+(i*3)]*zoom);
|
||||
ctx.strokeStyle = "#"+((pl2[2+(i*3)]) + Math.pow(16, 6)).toString(16).slice(-6);
|
||||
ctx.stroke();
|
||||
|
||||
ctx.closePath()
|
||||
//ctx.restore
|
||||
//ctx.clearRect(0,0,400,400);
|
||||
}
|
||||
|
||||
// store point for comparison
|
||||
lastpoint.x = pl2[i*3];
|
||||
lastpoint.y = pl2[1+(i*3)];
|
||||
lastpoint.color = pl2[2+(i*3)];
|
||||
}
|
||||
|
||||
}
|
||||
// Call Draw Function Again To Create Animation
|
||||
window.requestAnimationFrame(draw);
|
||||
if (pl2.length > 0)
|
||||
{
|
||||
ctx.clearRect(0,0,400,400);
|
||||
lastpoint = {
|
||||
x:pl2[0],
|
||||
y:pl2[1],
|
||||
color:pl2[2]
|
||||
}
|
||||
for (var i = 0; i <= pl2.length; i+=3)
|
||||
{
|
||||
point = {
|
||||
x:pl2[i],
|
||||
y:pl2[i+1],
|
||||
color:pl2[i+2]
|
||||
}
|
||||
// console.log(lastpoint,point)
|
||||
// if the target is black, skip drawing
|
||||
if( point.color != 0){
|
||||
ctx.beginPath()
|
||||
ctx.shadowOffsetX = 0;
|
||||
ctx.shadowOffsetY = 0;
|
||||
ctx.shadowBlur = 5;
|
||||
ctx.shadowColor = 'rgba(255, 255, 255, 1)';
|
||||
ctx.lineWidth = 2;
|
||||
ctx.stroke.width = 1;
|
||||
ctx.strokeStyle = "#"+(point.color + Math.pow(16, 6)).toString(16).slice(-6);
|
||||
ctx.moveTo(lastpoint.x * zoom, lastpoint.y * zoom);
|
||||
ctx.lineTo(point.x * zoom, point.y * zoom);
|
||||
ctx.stroke();
|
||||
ctx.closePath()
|
||||
}
|
||||
lastpoint = point
|
||||
}
|
||||
}
|
||||
|
||||
// Call Draw Function Again To Create Animation
|
||||
window.requestAnimationFrame(draw);
|
||||
}
|
||||
|
||||
// Initialize The Draw Function
|
||||
draw();
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue