Hosting a web site on Max
Hi there!
It's been a while!
I'm here to ask you about hosting an website on Max.
I want to control a patch trough an web explorer, so I was thinking in the possibility of "hosting" an html code in max so that I can click on links remotely to "bang" the patch.
Is that possible in any way?
Thanks in advance!
hey Rui,
using Html won't propably take you all too far. As to what is possible, its mainly a matter of how much latency you can accept, and what possibilities of hosting you have.
Of course yo ucan always interact with max in some amount trough standard protocols (ftp://, http:// etc) with the help of jit.uldl.
The problem here is how you can quickly work with events on the website. I tried something with max downloading a simple textfile every second and checking its content - i suppose that should also be possible by acessing a file you host on the same machine as max is runnning for faster acess.
What you should look for is some application that can run on your server that can somehow directly communicate with max (e.g. through midi).
There might be possibilites to do that with a flash app or if you use php and find a way to constantly watch over changes in your database.
In the end it seems to me that it might be ciritical to expect low latency, and true on-click events might be harder to work out. But I am certain that things like toggles or the likes can work rather nicely.
If you can afford to be bleeding edge, HTML 5 can do some pretty interesting things with both audio and video (including MIDI).
whilst browsing around maxobjects I found something that should be pretty helpful: http://maxobjects.com/?v=objects&id_objet=4177&requested=interface&operateur=AND&id_plateforme=0&id_format=0
In case you want to use php, which would propably be an easy way if you accustomed to it - this can give you a connection to your MySQL database.
Thank you for your help!
I'm trying to do something, just for testing
For this experience, real time it's not important. It's something related with controlling events like open windows "real ones with glass and all" and doors, activate lights and ventilation, so... no problem with some latency
I will check your advices and I'll post something then, or maybe more questions.... hope not!
Thanks again
great, I'm working on something in a somewhat similar direction - so if you have any interesting finds to share I'd be happy to hear how things progress.
If I were doing this, I'd look at the using javascript on the webserver to send an ajax httpRequest to the Max machine (which could be the same machine). This would avoid waiting for a page load when a link/button is clicked.
If there's a max external that can listen for tcp (like udpreceive but tcp) you'd use that on the receiving end. Is there one?
If not, then something needs to sit in the middle and turn that httpRequest message over tcp into a udp message for use with [udpreceive]. A simple php script using pfsockopen() might do it, though you'd then have an additional webserver request adding latency.