I am looking at creating a patch that takes images from a website and cycles through them really quickly, outputting them as a cycling images, video type installation.
I have no idea where to start with max msp in terms of getting the images from the internet, so any help would be awesome.
I can’t really use the Jweb object because it loads far too slowly for the purpose I need it for.
This could potentially work with FTP as well, drawing images from a folder on a server?
I think that [jit.uldl] can access files via FTP although I’ve never used it to do that.
Yes, I’ve been playing around with that. Not too sure how to get cycling images out of it though. I wonder if Java could be of use here, although I’ve never touched on Java before.
So basically my patch needs to download images in a folder from an FTP server into a folder on my computer. Then my patch needs to choose randomly an image from that folder to display.
This is my patch so far. The two problems are: downloading not just single files from my FTP but a whole folder of images, and displaying the images in that download folder randomly.
----------begin_max5_patcher---------- 894.3oc0XsrbaBCEcs8WACqcwnW7H65LcQ+A5pNY7fMJ1xEjnfn1MYx+dQRP BwwN1fwtNafQOP2y8n6SdZ7H64hszBaq6r9o0nQOMdzH8TpIFUOdjcZz1EIQ E5sYyoaDyWaOwrjjtUpmNkJyEVPhayJOH3xB1iT0p.fCIj.B7qWiEq+lpy4K HTyGvKSY7DpTKF3qSJJkMyBpmMKRtXEiubVNcgz.dTPfi6jJIgTu7zOgtNtV 22BO7nTMdr+ZNKJoQvFAH+aF0bT1yi3KsstWs5yiGqdL4DIGoX4xDp8dTS3d USPOUy.+F8aGs7c5BiK6mpjRKJhVRe2EcNMJtq2wfg4NFSHl6Xr5ExbgGzu6 39QJGv3eMS57aoSp3OLpkOz0h360QNB50ACD3w8CpYmJIdFNBU50rzHYNaq8 j9RYJtIaCiGK1rG+BHYXTaB1SongZ002n6PvG4XzeM5PdFUZHOQDEa8fL6to Si4QRlf6rP3vebZV47D1hYqjoISWjGwVNE6rNaYWsRvMePVNsfxkZQz1EQGX .DBUubqe7BIbltesOanO5569MPLOpOLO5XLuwnyGbIX91m8mYlG1ClG3eLlO z3t6cIX91m8+El+.obxsJS5JQh2arV2txIDMGiLFkPx4jfYPojhdPIcI8i6G j00C6.HdgPvDKrI0Kz+THlAzUbIUVlmLqyb.DNLUmAqcRPZyi5R09LFjBzif TH+ApDWMGBp8sBtkhzSeHpLQFyxs992ta5OJn4EFBasXEuPvmFSK9kTj0UlK bfZ.rppOLJDSPUwlbMlhFKxaC9KqZCaD4cs2Ir6.4cFD5.bcCBUQnLzim6sC 6TVYNoEbGYmApyxpX2Uwuwdg3WXGf6sSx9rbUa7cjZPCSpMhlFvlZOQnKTRs Onw5xj3tlRCOTMSqa0AaJBD6doZkVed1IL9t+INMjTy+VlqPTlun4fa9IZVu Bqp.wRlIIWqMo9CCs1zJVbLk29xOkEmIpLzpAwALfOYLAOALsCvu3XBb6wS6 HtCfIxUESpVtNJlvWYdBcChI7sGlzhCbLLcc86fvK.OAQDGhpAT2Vsa8lAA5 D4XfdapAma3iKgaAwnE.cE+nZj+1QCsd.tEMaOkPyfNFFD3Qb7ZJqyjLG4ip lpoSc3Yykp5yGbbCCCb7ZJV+xfaUaWCNtQA9Ng08fcR3tZvyi+G8Z3oL -----------end_max5_patcher-----------
Don’t know if you can get a whole folder at once, but you can definitely automate getting the files if you have access to the names. once you have the files it’s pretty easy to populate a dropdown menu with the names, then [prepend] the local filepath to the images so they can be loaded up.
Probably you could skip a step and do a [prepend prefix] to a umenu that accesses the files remotely, I’m not sure. Try doing this locally to see how it works with a folder of files (if you haven’t messed with this feature yet), then see if you can do it remotely, it might be possible. I’m sure it would work with a shared/mounted drive, but via FTP access I don’t know… maybe you could work with it somehow.
For another angle, dig into [jit.str.regexp], there’s a cool example subpatch which shows how to grab all the images off a webpage (like a Google Image search) and store them locally. Again, once you’ve done this, a umenu to access them (and send random index numbers to the umenu for display) is easy.
Unsurprisingly it seems you can’t download a folder via FTP however as long as you know the names of the files you’re looking for this shouldn’t be a problem. Setting up a naming convention would probably be a good idea, ie: pic_1, pic_2 etc then you could use [sprintf] and a [counter] triggered by the completion of the previous download. A [sel download] on the right outlet of [jit.uldl] would do it. You could also keep a text file somewhere in your FTP directory with a list of all the currently uploaded file names. If you do this then you could let multiple users upload photos to your project.