Csound Csound-dev Csound-tekno Search About

Socket.io and Csound PNaCl: The code from the presentation

Date2015-10-05 19:46
From"Ashvala Vinay"
SubjectSocket.io and Csound PNaCl: The code from the presentation
AttachmentsNone  None  
Hey Csounders!

The code I presented and demoed at the conference is now up and available for download on Github: 
https://github.com/Ashvala/ICSC2015

In short, this is a Socket.io interface for Csound PNaCl. You can use this to build interactive systems and more using Csound PNaCl and node.js. 

As it stands, you can connect up multiple instances of Csound PNaCl and pass around orchestras, score messages, channel messages between them and even have them all work with a static orchestra. You can even use the dynamic orchestra example as a means to control Csound PNaCl from a smartphone or a device/browser incapable of running Csound PNaCl (aka, non-chromium platforms). 

Let me know if you isolate a bug, need help setting up or if you have any suggestions.

Thanks!

Regards, 
Ashvala







Date2015-10-05 21:07
FromTarmo Johannes
SubjectRe: Socket.io and Csound PNaCl: The code from the presentation
AttachmentsNone  None  

Hi, Ashvala, thanks for sharing the code!

 

I followed your presentation from St. Peterburg, it was very interesting.

I have done work in the similar direction, if you are interested to have a look, there is an early demo for similar orchestra sending / recompilation using Csound pnacle (and a python written server) on

 

http://tarmo.uuu.ee/varia/failid/cs/nacl/fm-game.html

http://tarmo.uuu.ee/varia/failid/cs/nacl/websocket-server.py

http://tarmo.uuu.ee/varia/failid/cs/nacl/ws-functions.js

 

And all my recent sound-games are based on communication over web-sockets

https://github.com/tarmoj

Those are written in Qt (C++ and partly QML )

 

I also suggest that for some applications and if you need to make non-web page applications that are beautiful and cross-platform, QML is very good - it has supoort for both WS-client and beginning from Qt 5.4 also for Ws-server and the usage is rather simple:

 

http://doc.qt.io/qt-5/qml-qtwebsockets-websocketserver.html

http://doc.qt.io/qt-5/qml-qtwebsockets-websocket.html

 

Example: http://doc.qt.io/qt-5/qtwebsockets-qmlwebsocketserver-qml-qmlwebsocketserver-main-qml.html

 

For the latency issues I belive, using some kind of UDP messages for sending CSound Event messages is better - Websockets are based on TCP and that is very reliable but takes time over long distances due to all kind of double checking and ordering the chunks of data.

 

It would be easiest to use OSC from Csound code, but pnacle does not allow plugins (that OSC is); web browsers and javascript don't have support for UDP messages... So I don't know what a good solution is.

 

Perhaps Kita, you can give a suggestion? There is a UDP based new protocol WebRTC that should be fast, but I know nothing about it...

 

Something there though...

http://www.html5rocks.com/en/tutorials/webrtc/basics/

 

 

Please keep us posted about your further investigations and results!

 

thanks,

tarmo

 

On Monday 05 October 2015 11:46:35 Ashvala Vinay wrote:

> Hey Csounders!

>

>

> The code I presented and demoed at the conference is now up and available

> for download on Github:  https://github.com/Ashvala/ICSC2015

>

>

> In short, this is a Socket.io interface for Csound PNaCl. You can use this

> to build interactive systems and more using Csound PNaCl and node.js. 

>

>

> As it stands, you can connect up multiple instances of Csound PNaCl and pass

> around orchestras, score messages, channel messages between them and even

> have them all work with a static orchestra. You can even use the dynamic

> orchestra example as a means to control Csound PNaCl from a smartphone or a

> device/browser incapable of running Csound PNaCl (aka, non-chromium

> platforms). 

>

>

> Let me know if you isolate a bug, need help setting up or if you have any

> suggestions.

>

>

> Thanks!

>

>

> Regards, 

> Ashvala

 


Date2015-10-06 13:01
FromJohn DeBlase
SubjectRe: Socket.io and Csound PNaCl: The code from the presentation
Wow!! Thanks for this, can't wait to try this out! 

> On Oct 5, 2015, at 2:46 PM, "Ashvala Vinay"  wrote:
> 
> Hey Csounders!
> 
> The code I presented and demoed at the conference is now up and available for download on Github: 
> https://github.com/Ashvala/ICSC2015
> 
> In short, this is a Socket.io interface for Csound PNaCl. You can use this to build interactive systems and more using Csound PNaCl and node.js. 
> 
> As it stands, you can connect up multiple instances of Csound PNaCl and pass around orchestras, score messages, channel messages between them and even have them all work with a static orchestra. You can even use the dynamic orchestra example as a means to control Csound PNaCl from a smartphone or a device/browser incapable of running Csound PNaCl (aka, non-chromium platforms). 
> 
> Let me know if you isolate a bug, need help setting up or if you have any suggestions.
> 
> Thanks!
> 
> Regards, 
> Ashvala
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here