Vecja midi obcutljivost

main
Jurij Podgoršek 2022-05-05 18:12:46 +02:00
parent 4a805e782c
commit b6858405b2
1 changed files with 3 additions and 3 deletions

View File

@ -242,15 +242,15 @@ const sendAll = (msg, info, oscWS, osclients) => {
}
if (msg.address == '/accel') {
if (msg.args[1] > 5000) {
if (msg.args[1] > 2000) {
console.log("SEND MIDI!")
const visina = Math.round((msg.args[1] - 5000) / 100)
const visina = Math.round((msg.args[1] - 2000) / 100)
midiNotes[visina] = true
mo.send([144, visina, 127])
midiOn = true
}
if (msg.args[1] < 5000 && midiOn) {
if (msg.args[1] < 2000 && midiOn) {
Object.keys(midiNotes).forEach(visina => {
mo.send([128, visina, 127])
})