Website to Max (send data from a webpage to Max from any device, from anywhere)

Ben Johansen's icon

Hi all

In summary = I would like users from around the world to be able to simply send data directly from a website => to Max running on my personal computer.

I would like to start by adding a button to a webpage that when pressed (by anyone in the world), would trigger a bang in Max on my laptop. Once I get that figured out, I'd like to add sliders and other user interfaces.

Searching Google leads me to believe that the solution will include many dependencies (Node.js, Socket.io, AJAX, Ruby, PHP, JSON, Javascript, etc.) ... but is there an elegant solution with few dependencies? ... a solution that works on all devices and all browsers that has fewer "moving parts" that can potentially fail? (possibly using MaxURL?)

For whatever it is worth, the reason I ask for help with this is so that I can allow the audience to manipulate my saxophone and Max improvisational performances even if they are not connected to the wifi network in the location in which I am performing.

Thank you so much for reading this!
Ben
Max7, Mac OSX 10.10

Jan M's icon

Hi Ben,
take a look at this: https://cycling74.com/tools/jm-pubnub/
it uses a push service and can be implemented with just a few javascript lines.

j

Ben Johansen's icon

J,

Thank you for replying! This very well may inspire a free solution (I'm afraid I don't want to pay for PubNub = it looks as if I will have to pay if I want more than 20 people to interact with me during a concert ... but I may be reading it wrong!!!)

Thanks!
Ben

Jan M's icon

Hi Ben,
you are right, this is the downside of pubnub. the time i wrote this java class the dev account regulations were more flexible. i haven't found a free push service yet unfortunately...

oli larkin's icon
Ben Johansen's icon

Oli and Jan -

I tried a number of your tools before posting my initial question above (because you two obviously have awesome brains!). My problem is that I cannot figure out how to do what I want to outside of a single network (for example: I cannot figure out how not to use "localhost" on Oli's very cool ol.wsserver solution). I really appreciate your posts and I most likely will utilize your tools in future projects ... any other ideas for making this work? I ignorantly put the "web_root" folder on my ftp server for my website and tried it out ... but I know I need to do more than modify the path when starting the server in the ol.wsserver help patch.

Thanks!
Ben