-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathredis_control.html
118 lines (101 loc) · 2.96 KB
/
redis_control.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.slidecontainer {
width: 70%;
}
.slider {
-webkit-appearance: none;
width: 90%;
height: 10px;
border-radius: 5px;
background: #d3d3d3;
outline: none;
opacity: 0.7;
-webkit-transition: .2s;
transition: opacity .2s;
}
.slider:hover {
opacity: 1;
}
.slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 25px;
height: 25px;
background: #4CAF50;
cursor: pointer;
border-radius: 50%;
}
.slider::-moz-range-thumb {
width: 25px;
height: 25px;
background: #4CAF50;
cursor: pointer;
}
</style>
</head>
<body>
<center>
<h1>Redis Param Control</h1>
<div class="slidecontainer">
<input type="range" min="2" max="32" step="1" value="8" class="slider"
id="base" oninput="update(this)" onpageshow="update(this)">
<p>Numeric base: <span id="base_val">2</span></p>
</div>
<div class="slidecontainer">
<input type="range" min="1" max="128" step="1" value="31" class="slider"
id="mul" oninput="update(this)">
<p>Multiplier: <span id="mul_val">31</span></p>
</div>
<div class="slidecontainer">
<input type="range" min="5" max="32" step="1" value="14" class="slider"
id="wrap" oninput="update(this)">
<p>Wrap (modulus): <span id="wrap_val">14</span></p>
</div>
<div class="slidecontainer">
<input type="range" min="1" max="128" step="1" value="47" class="slider"
id="div" oninput="update(this)">
<p>Divide (denominator): <span id="div_val">47</span></p>
</div>
<div class="slidecontainer">
<input type="range" min="1.0" max="2.0" step="0.001" value="1.727" class="slider"
id="chaos" oninput="update(this)">
<p>Chaos: <span id="chaos_val">1.727</span></p>
</div>
<div class="slidecontainer">
<input type="range" min="-17" max="17" step="1" value="0" class="slider"
id="mode" oninput="update(this)">
<p>Mode offset: <span id="mode_val">0</span></p>
</div>
<div class="slidecontainer">
<input type="range" min="1" max="64" step="1" value="16" class="slider"
id="euclid_numerator" oninput="update(this)">
<p>Euclid numerator: <span id="euclid_numerator_val">16</span></p>
</div>
<div class="slidecontainer">
<input type="range" min="1" max="64" step="1" value="6" class="slider"
id="euclid_denominator" oninput="update(this)">
<p>Euclid denominator: <span id="euclid_denominator_val">6</span></p>
</div>
<div class="slidecontainer">
<input type="range" min="1" max="99" step="1" value="10" class="slider"
id="gate" oninput="update(this)">
<p>MIDI gate length: <span id="gate_val">10</span></p>
</div>
</center>
<script>
function update(object) {
object_id = object.id
object_val = object.value
val_id = object.id + "_val"
document.getElementById(val_id).innerHTML = object_val;
var xhttp = new XMLHttpRequest();
xhttp.open("GET", "/send_value?" + object_id + "=" + object_val, true);
xhttp.send();
}
</script>
</body>
</html>