Ko je kegel miren, utisaj
parent
a6a8733501
commit
b8e87c8ae0
10
kegel.js
10
kegel.js
|
@ -33,6 +33,7 @@ oscWS.on('ready', () => {
|
|||
})
|
||||
|
||||
const zaznava = 0.8
|
||||
const utisaj_vse = 0.1
|
||||
|
||||
let cakaj = false
|
||||
|
||||
|
@ -113,6 +114,15 @@ oscWS.on('message', ({ address, args }) => {
|
|||
console.log('izklopi', midiKanal, visina)
|
||||
}, izklop * 1000)
|
||||
}
|
||||
|
||||
// Ce izrazito ni gibanja, utisaj vse!
|
||||
if (vsota < utisaj_vse) {
|
||||
console.log("UTISAJ")
|
||||
oscWS.send({
|
||||
address: '/midi',
|
||||
args: [120, 0, 0]
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(address)
|
||||
|
|
Loading…
Reference in New Issue