M4L noob: database and reading samples
Hey all - I've been having this idea of a sample database software for a long time - and as soon as I will free up some time, I think I'll give it a go.
I would like to create an application that can create a database of samples/sounds in given directories. Each entry can have its unique tags and it should be possible to search for/filter out certain sounds and audition them.
For example. Let's say I map up a sound effect library with sounds that span from waterfalls & birds to cars and wild animals. I want to hear only those sounds that contains the tags car, accelerating, crash. When the application have filtered out all the wrong sounds - I would like to audition the sounds that's left.
Naturally I don't want to load the samples until the audition.
I am a total beginner when it comes to M4L - and while I might be in deep waters - I am most willing to take the time to learn how to do this. But before I even begin - is it even possible?
Any replies greatly appreciated!
/Carl
Nice idea, quite do-able in Max, but I wonder if there isn't a disconnect in what you plan to do with these filenames once you get them: do you plan to implement the entire sampler in Max/Msp? If not, you have a big issue in setting the Live devices or clips to use your selected samples: I am not sure how possible or easy that would be.
Then there is the slow process of creating the descriptive tags, deciding how to associate them with the filename/paths in the db (ie: the DB design..how to key these files? Do you key by your descriptive types? Sets of these descriptions? Where do they go: into how many columns? How do you break up the descriptions into columns?)
A concatenated set of nouns are a very poor candidate for a returned values column, both nearly impossible to correctly search in db, and bad for building indexes that might speed up these searches.
There have been many attempts to build sonic databases: the best ones don't seem to use values we can manually generate, but instead are based on objective measurements of spectral content: but I think you're not looking for this...
As long as you think it through, anything that helps you is appropriate, but do think it thru,,,
yes, these are deep waters, but you being even aware of databases and their use makes you a better candidate than most. Currently I have heard of people using MySQL and HDBC (sp? an embedded java dbms persisting to flat file) in Max: and the HDBC is provided free in the Max Msp binary.
Go for it, bit think 'er through..ask ?'s, etc.etc.
G'luck,
cfb
aka
j2k
PS: i'll knock around & see if I can't get some refs of earlier work for you to check out...:)...i;m sure others could help a bit, also ) take care, cb
Have a look at http://imtr.ircam.fr/imtr/CataRT ...
might go into your direction...
;-)
_A
I've been searching for a sample database too. Didn't find one on internet yet.
Native Instruments have created a tag-system for their preset collections in Absynth, FM8 and Massive. They differentiate for a maximum of 20 attributes for the keys: Instrument, Source, Timbre, Articulation and Genre. I think this is a good starting point.
I begin to think I have to build the database myself. As a dedicated reader of the Computer Music magazine I have a vast array of samples from the CD's and DVD's. Indexing the samples with attributes will require a real relational database. As a PC user MS SQL Server comes into mind.
Until this thread I was considering a C# program as a frontend. Of course you need to use a library for playing (at least) .WAV and .AIFF. But VLC has crossed my mind because it can play so many formats with very little footprint. Perhaps the frontend can also be done with MFL. The communication with the database can be achieved using a dedicated MaxSDK device or using OSC or Http.
I think again. If someone is creating a 'sample database program' it should be targeted to all computer musicians, not just Live users. So a http / web frontend is a good choice.
Perhaps this is a bit too technical. The bottom line is that creating a robust sample databse is quite a challenge. It will take quite a few hours of planning, building and testing. I'm not sure if I'm into this because as an IT professional I don't really want to spend a lot of my free time programming. I want to make some music.
There are a lot of databases that allow you to keep track of your collection of photographs using all kinds of tags. Has nobody made something like that for samples yet?
There are a few sample librarians and while they are usable they are platform specific which make them quite restricted. From this point of view I would imagine Max to be the perfect platform. I could create a (cross platform) application in Max where you actually do the mapping, but also could search for samples. For Live users (such as myself) it would be possible to have an front end in M4L where you could do just the searching.
I think that I need to think quite a lot in order to pull through a thing like this. For an optimal use - I would create an application that could be used by others.
Thanks for the link Andreas - seriously cool. Amazing.
I wish you a lot of luck Carl as it would be amazing if you pulled that off. I'd certainly use it, but for Mac users out there you may want to try Audio Finder at http://www.icedaudio.com/ and also I own Maschine by Native Instruments which has a tagging feature for samples.
Hope you can make it so we can create our own tags to tag samples with.
Any progress on this? I've started a similar project but don't know when I'll ever have time to finish...
If you don't mind not having direct integration in m4l, and just want a way to keep your samples organized, one admittedly janky way to do it could be to use iTunes.
Uncheck the option "copy files to iTunes folder when adding to library" so that it doesn't move your files around.
Import all the desired samples into iTunes.
Tag everything you want according to genre, use descriptions, comments, composer, bpm settings, whatev.
handy little search window will get it for you, and you can drag & drop from the window into a convenient location.
also, if you're on a mac, you can implement all sorts of applescript goodness to help you organize.
i know it's not the most elegant, but saves you all the effort of having to create any sort of program, and will allow you to easily search through what you have.
hope that helps
I was just going to suggest the article pid linked to. Through JavaScript you can access the Max sqlite object and create your own databases with any sort of UI you like. In the article, there is a very simple media database example with the abilty to add metadata. A little JS and SQL knowledge will be necessary, but it's nothing that difficult (mainly just parsing and generating SQL queries).
I look forward to seeing what you come up with!
this is perfect timing. i am in a project right now where i'm running up against the limitations of coll. i didn't know about the SQL access through js.
thanks! this will be so much easier