Poslji midi tudi nazaj, ciscenje
parent
d243b18f59
commit
40130ed08e
37
kegel2.js
37
kegel2.js
|
@ -91,33 +91,13 @@ oscWS.on('message', ({ address, args }) => {
|
|||
? 24 + Math.round((accval / 2.5) * 36)
|
||||
: 48 + Math.round((accval / 2.5) * 72)
|
||||
|
||||
//const visina = rotVisina
|
||||
|
||||
//console.log('posiljam midi', [144, visina, 127])
|
||||
/*
|
||||
oscWS.send({
|
||||
address: '/midi',
|
||||
args: [192, 0, 127]
|
||||
})
|
||||
*/
|
||||
/*
|
||||
oscWS.send({
|
||||
address: '/midi',
|
||||
args: [midiKanal, visina, 127]
|
||||
})
|
||||
*/
|
||||
console.log('posiljam midi', [midiKanal, visina, 127])
|
||||
mo.send([midiKanal, visina, 127])
|
||||
|
||||
// Ugasni cez en cas
|
||||
let izklop = razponTona[0] + Math.random() * (razponTona[1] - razponTona[0])
|
||||
console.log('izklopim', midiKanal, visina, 'cez', izklop)
|
||||
setTimeout(() => {
|
||||
/*
|
||||
oscWS.send({
|
||||
address: '/midi',
|
||||
args: [midiKanal, visina, 0]
|
||||
})
|
||||
*/
|
||||
mo.send([midiKanal, visina, 0]);
|
||||
console.log('izklopi', midiKanal, visina)
|
||||
}, izklop * 1000)
|
||||
|
@ -138,12 +118,6 @@ oscWS.on('message', ({ address, args }) => {
|
|||
: 72
|
||||
console.log("UTISAJ", index)
|
||||
for (let i = visina; i < visina + visina_razpon; i++) {
|
||||
/*
|
||||
oscWS.send({
|
||||
address: '/midi',
|
||||
args: [midiKanal, i, 0]
|
||||
})
|
||||
*/
|
||||
mo.send([midiKanal, i, 0])
|
||||
}
|
||||
utisaj_c[index] = 0
|
||||
|
@ -162,8 +136,13 @@ oscWS.on('message', ({ address, args }) => {
|
|||
|
||||
mi.on('message', (deltaTime, message) => {
|
||||
console.log(`midi in: ${message} d: ${deltaTime}`);
|
||||
const args = [150, message[1], message[2]]
|
||||
mo.send([150, message[1], message[2]])
|
||||
const args = message
|
||||
|
||||
mo.send(message)
|
||||
oscWS.send({
|
||||
address: '/midi-in',
|
||||
args: message
|
||||
})
|
||||
|
||||
// Ugasni cez en cas
|
||||
let izklop = razponTona[0] + Math.random() * (razponTona[1] - razponTona[0])
|
||||
|
|
Loading…
Reference in New Issue