assurance-tunnel
assurance-tunnel
assurance-tunnel
assurance-tunnel

Displaying live polling results from a website via Isadora



  • i'm working on a project in which during intermission the audience will be able to vote via their cell phones for certain outcomes in the 2nd act.

    we would love these results to be displayed live for the audience via the video design.
    i was hoping to keep the transition from the video design of the show into the live polling website inside my Isadora programming so that there isn't an awkward change of computer, or screen, or whatnot. 
    i feel there are options outside isadora, but all would be inelegant with the resources available on this project.
    is there anyway to integrate a web browser/website into isadora?

  • Tech Staff

    Yes there is - but it's mac only - so we need more information about your system.

    But this is one way: https://code.google.com/p/cogewebkit/
    You do need the Isadora Core upgrade which is a small additional fee. 

  • Tech Staff

    You can make Tcp-ip get requests, and parse the data directly for display.
    Essentially making Isadora a real-time system integrated solution.
    This approach will give you a lot of control within Isadora, for example animations could be triggered with every new chunk of data received.


  • Tech Staff

    That would be a great tutorial @DusX hehe cough hint cough splutter

    I'd love to know how to do this as my TCP-IP knowledge is limited. 

  • Tech Staff

    Funny.. I was thinking the same as I was writing it..


  • Tech Staff

    hehe!



  • @DusX: offering a Pizza & Beer in exchange for a tutorial ;)


  • Tech Staff

    I spent an hour going thru some notes and doing a few test today.. looks like I will have the basics of a 'Retrieving data from webservices' in the very near future.. I might spend the evening putting this together.. its really as much for my own reference as it is for all of you... the TCP actors are powerful/tricky
    A part 2 will have to deal with Oauth connections (Facebook and Twitter) as this requires server side scripting (at least this is the only way I have done it)




  • Tech Staff

    I took a first pass at this last night. see: http://dusxproductions.com/blog/web-apis-in-isadora-part-1/

    The next ones will go faster and be more useful, but this puts the ground work in place I think.
    If anyone catches any mistakes please let me know... I wasn't all awake while writing this.

    @eight I will have to take a look at the node osc server... how have you tried to use it? I guess you could code via node to connect to any webservice, and then spit data out as OSC to Isadora.



  • Brilliant! Thankx DusX, very understandable tutorial!

    By the way, it made me realize how 'easy' the parser can be... Next time I won't write a plugin to just explode a string :-)
    I'm eager to read the next parts as I still don't see precisely yet what kind of data it could be interesting to retreive...


  • @DusX

    I just played with this module. It took me about 10 min to setup a _Hello OSC_ app talking to Isadora starting from scratch. Here is the writeup for OSX.
    1\. Install node.js by either building from source or downloading a current *.pkg file from _http://nodejs.org/dist/latest/_
    2\. Install dependencies: in terminal execute consecutively 
    _npm install osc-min_
    _npm install jspack_
    _npm install node-osc_

    3. Create a hello-osc.js file with the following content:

    _var http = require("http");_
    _var osc = require('node-osc');_
    _var client = new osc.Client('127.0.0.1', 3333);_

    _http.createServer(function(request, response) {_

    _  ** client.send('/isadora/1', "Hello OSC");**_

    _  response.writeHead(200, {"Content-Type": "text/plain"});_

    _  response.write("Hello OSC");_

    _  response.end();_

    _}).listen(8888);_

    4\. In terminal, run the _hello-osc.js_ in _node.js_ server like so:
    _node hello-osc.js_

    5. In Isadora patch add a OSC Listener actor, set the message type to text.

    6\. Point your browser to http://localhost:8888
    7\. Observe the _Hello OSC_ message both in browser and Isadora's _OSC Listener actor_.
    --8

  • Tech Staff

    A organized listing of many available web API's: http://api-portal.anypoint.mulesoft.com/apis



  • OK, now I think I'm starting to see the point. I also suppose an interesting thing to work on is building your own API on your own site, thus being able to display user posts with Izzy. Exciting!



  • i'm working on a project at the moment - by this time next month we should have a system that enables an audience to collaborate in the creation of a dance work, and then control the lighting, sound and video - all from a web app running in their phones' browsers. its some Javascript node library to OSC into Isadora.


  • Tech Staff

    @DusX
    Thanks a lot for the tutorial.

    Best
    Michel


  • Tech Staff

    Thanks @DusX!!



  • @DusX wait for part two, nice one.

    Has anyone tried OSC PHP, and develop interactive Web browser control.html, unidirectional….  it works. :)

    thx


  • Tech Staff

    I currently have been using a php Framework 'silverstripe', it allows the quick creation of a REST api, for any data types defined.
    In this manner, Isadora has a mySQL backend. Moving to a node.js solution might be the way I go for future works though.


  • Tech Staff

    Another thing I want to test, but haven't yet, is using tcp as a method of launching other executables locally. I imaging the possibility to launch for instance OpenFrameWorks projects, via tcp (python script) and closing them when finished. Perhaps one scene uses Duration, and it needs to be opened. I am hoping to test this in the near future.