...
 
Commits (2)
......@@ -5,8 +5,15 @@ for (let input of allInputs) {
input.addEventListener('input', function(event) {
let item = event.target;
setBadgeValue(item, item.value);
sendMessage(item.name, item.value);
});
// Initialize badges
if (input.type = "range") {
setBadgeValue(input, input.getAttribute('default'));
}
}
for (let select of allSelects) {
......
......@@ -213,6 +213,18 @@ function sendMessage(control, value) {
}
}
function setBadgeValue(inputRange, value) {
if (inputRange.getAttribute("zero")) {
value = value - inputRange.getAttribute("zero");
}
try {
inputRange.previousElementSibling.previousElementSibling.innerText = value;
} catch(err) {
console.log(err);
}
}
function setLFO(data, lfo) {
// Fade mode
var fadeOut = 16;
......
This source diff could not be displayed because it is too large. You can view the blob instead.