http get – taking samples off a database

Nov 24, 2009 at 1:06pm

http get – taking samples off a database

Hey I am trying to get something together for a college project involving grabbing audio samples off a database. Whats the best way to go about this? Any ideas? XML to send http get?

Nov 26, 2009 at 10:49am

Have a look at [jit.uldl], [jit.textfile] and [jit.str.regexp] which can download files from http or ftp. There’s a good example called “parser/downloader” in the latter’s help file which might be of use to you.


Nov 27, 2009 at 12:37pm

Cheers for the reply luke, will give that a go.

Dec 3, 2009 at 5:11pm

Hey I managed to get this working so I can manually load a file into the buffer after it downloads. Is there a way to get the file name from jit.uldl and then append it to the save directory information so it can be automatically loaded into a browser?

Dec 3, 2009 at 10:18pm

I’m not exactly sure what you mean. If you have the sound files in [buffer~]s you could always use [info~] to get the file name. By loading into a browser to you mean uploading a document to your web host from max?


Dec 8, 2009 at 8:57pm

the jit.udl object downloads the file to a specified location. Is there a way to get the file name and chosen download location from the udl so I can automatically load it into the buffer, without having to manually load it in??

Dec 9, 2009 at 12:40am

If you’re downloading the file with [jit.uldl] I imagine you’re using the “download” message so you can just grab the filename from there. You should be able to do it with [regexp] there’s some good pointers on the forum if you need help with that. There’s an example included below for illustration. The “getdefaultdir” message will output the download location.


– Pasted Max Patch, click to expand. –
Dec 9, 2009 at 6:24pm

Thats great cheers, got it now. Thanks a lot!

Dec 26, 2009 at 2:01pm

Another question! Is it possible to pull down a list of everything on the database and put it in a table so users can click on entries in the table to download?

Also if each sound on the database is tagged, is it possible to add these tags to the table?

Basically I want to have a table with :

column 1 : sample file name (click on this to load into buffer)
column 2+ : sample attributes (eg source, genre, etc)

Thanks a lot for the help!!

Dec 26, 2009 at 3:17pm

That would depend entirely on how your database is organised. Is it a proper SQL database, a list of links in an HTML document or something else entirely? It probably isn’t impossible but it’s difficult to make suggestions without knowing a bit more. You might want to look at [jit.cellblock] for creating a table in max. The extra columns could be done if the information is stored in the database, not entirely sure how you’d go about if you want to read ID3 tags from the files themselves.


Dec 27, 2009 at 1:04pm

Sorry, was a bit braindead when I posted there! Yep its going to be a proper SQL database. I’m gonna include tags on the database with the files as opposed to using ID3 tags (although is this a possible alternative?).

I will check out jit.cellblock, still getting my head ’round jitter after coming from vvvv!

Thanks a lot for all your help, much appreciated!


You must be logged in to reply to this topic.