You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
890 B
JavaScript
33 lines
890 B
JavaScript
// const osc = require('osc-min');
|
|
// const dgram = require('dgram');
|
|
|
|
// const oscHost = '192.168.2.1'; // IP address of the OSC destination
|
|
// const oscPort = 8080; // Port number of the OSC destination
|
|
|
|
// // Function to send the OSC message
|
|
// function sendOSCMessage() {
|
|
// // Create the OSC message
|
|
// const oscMessage = osc.toBuffer({
|
|
// address: '/blink',
|
|
// args: [1]
|
|
// });
|
|
|
|
// // Create a UDP socket
|
|
// const udpSocket = dgram.createSocket('udp4');
|
|
|
|
// // Send the OSC message
|
|
// udpSocket.send(oscMessage, 0, oscMessage.length, oscPort, oscHost, (err) => {
|
|
// if (err) {
|
|
// console.error('Error sending OSC message:', err);
|
|
// } else {
|
|
// console.log('OSC message sent successfully');
|
|
// }
|
|
|
|
// // Close the UDP socket
|
|
// udpSocket.close();
|
|
// });
|
|
// }
|
|
|
|
// // Call the function to send the OSC message
|
|
// sendOSCMessage();
|