adzialocha / osc-js

OSC library for Node.js, Electron, Chrome Apps, Webpages or any other JS application. It comes with a customizable Plugin API for WebSocket, UDP or bridge networking
https://adzialocha.github.io/osc-js
MIT License
258 stars 30 forks source link

C++ OSC receiver #3

Closed brucelane closed 7 years ago

brucelane commented 7 years ago

Hi, Thank you for the ES6 update! I plan to use it with my C++ Cinder project. I tryed osc.js it the past, unfortunately it was sending a \0 character, which was interpreted as a "end of string" if my c++ app. So I switched to websockets nodejs ws npm module... I will try osc.js again and let you know if this is fixed.

adzialocha commented 7 years ago

Hi @brucelane! Thank you for this! Im curious to hear about this one. Can you maybe give some input on your implementation (with code samples?). Makes sense to write a test for this case

brucelane commented 7 years ago

if you're curious, my videodromm project is here: https://github.com/videodromm nodejs-router project is the old one I did with osc.js a year ago, not updated since... netdromm projectis the websocket server videodromm-livecoding project is the C++ Cinder app videodromm-controller-web is the new web project I'm building with React, ES6, netdromm ws client( socket.io is not compatible, so I use ws)

the osc and websocket files are here: https://github.com/videodromm/Cinder-Videodromm/blob/master/src/VDRouter.cpp#L46

brucelane commented 7 years ago

ah I forgot, I was planning to use osc.js with LiveOsc for Ableton Live, but since Ableton Live 9.6 LiveOSC doesn't work anymore...

adzialocha commented 7 years ago

I have written my own Max for Live device for these purposes which I add to the channels I need to control, its quite easy to do since Max for Live gives full control on all Ableton Live controls, then its just about getting the udp data and routing it to the right place

brucelane commented 7 years ago

With Max for Live, can you send you info like master meter, tempo, current measure outside ableton using osc or websockets?

adzialocha commented 7 years ago

Yes, look here: https://docs.cycling74.com/max5/refpages/m4l-ref/m4l_live_object_model.html, for example tempo or signature_denominator. The docs are from Version 5, could be a little bit different for newer versions but Ableton comes along with many examples

adzialocha commented 7 years ago

I checked back the current osc-js implementation with the OSCListener sample of Cinder and it worked, can you confirm @brucelane?

brucelane commented 7 years ago

it's Colin Clark osc.js repo I was using, I will try yours in some weeks...

adzialocha commented 7 years ago

@brucelane alright, I checked the Cinder OSC library against the osc-js es6 version at I cant find any issues, there must have been a problem with the older implementation, it also based on different string encoding before. Thank you for posting that issue anyways! Please post another one with an example if you find any problems :+1: