Forums > MaxMSP

possible metadata solution

June 12, 2006 | 7:27 pm

thought someone might find this useful

In the past, I have asked about and discussed adding metadata to
sound files. No one really came up with much. Among the easy and
useful things I found out how to do via the included link, I found
that you can use UNIX (the shell object) to add spotlight attributes
to files and run spotlight searches

http://www.matisse.net/OSX/darwin_commands.html

I know I’ll be working on a system to derive, store, search, and
recall metadata for sound files..


June 13, 2006 | 4:25 am

Hrm. The spotlight metadata store is from my understanding not adding
metadata to the file, but simply to metadata stores that the OS
associates with the file.

If you add metadata to an AIFF under OS X, move the file to a Windows/
Linux/Solaris/OS 9 box, and then back, your metadata doesnt follow
the file.

For what its worth, there are a few really nice front ends to xattr
(http://arstechnica.com/reviews/os/macosx-10.4.ars/7) to do this
manually and create custom smart folders for the Finder.

Ive also used the kick ass open source getID library for PHP to
handle metadata parsing for websites (its modular, and supports
almost every container format and codec) (the mostly finished content
management system I developed at http://sharecms.sf.net has the code
in there that uses it).

But again the issue is you can add all the metadata you want in your
system, but it doesnt walk with the file (usually) … fucking pain…

v a d e //

http://www.vade.info
abstrakt.vade.info


June 13, 2006 | 2:50 pm

*hangs head in disappointment and shame*


June 13, 2006 | 4:13 pm

Dont do that! Its a difficult problem and no one has a really good
solution except for introducing new file formats with room for
metadata and static fields. If you are building stuff for yourself
and friends and can share the metadata stores, its perfectly useful.
What did you have in mind?

v a d e //

http://www.vade.info
abstrakt.vade.info


June 13, 2006 | 4:45 pm

Why not use something like that mxj SQL databas that was posted by
Nick Rothwell some time ago?

wes


June 13, 2006 | 6:04 pm

On 12-Jun-2006, at 21:27, matthew aidekman wrote:
> I know I’ll be working on a system to derive, store, search, and
> recall metadata for sound files..

To this reader the obvious (and entirely Mac-centric, with possibly
only a limited lifetime) approach would be to use Resource Forks.

Specify a custom resource type, add your data to it, and go. Data
stays with the file on copy, on disk images, there are dozens of
tested solutions for transferring double-fork files from Mac file
systems to Unix, MS-DOS, etc.

I know (yes, I really do know) that Apple is encouraging developers
not to use resource forks, but this is one legacy part of the Classic
Mac OS that still seems to be supported quite thoroughly on OS X,
even up to Tiger.

Just an idea.

– Peter

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter

iCE: Sequencing, Recording & |home | chez nous|
Interface Building for |bei uns | i nostri|
Max/MSP Extremely cool http://www.castine.de

http://www.dspaudio.com/


June 13, 2006 | 10:45 pm

I always liked this resource idea (and still have to get rid of them in
my externals), but I met so many users complaining about "sound files
that don’t work on my PC" that I wouldn’t encourage this anymore…

Although it isn’t as convenient as with resources, it is allowed to
create custom data chuncks in WAVE and AIFF files, as long as their
identifier don’t interfere with the standard ones (the rule is to
ignore data chunck with an unknow identifier). This is also the reason
why these formats (and expecially .wav) are so chaotic.

Coding this in C or Java is quite easy. Check RIFF specs.

p


June 14, 2006 | 3:23 am

honestly, the discovery of the spotlight thing rekindled my interest
in the project. I think I might just use a file by the same name
with a txt extension. the files ability to be moved around and
retain their metadata is imperative. I find it odd that mac os x
appeared to be embracing metadata and in a way rejected it by
creating its own database. I have a email in the spotlight-
developers list. I wish I knew more about this stuff. It really
seems that this would be a big step forward.

As for the wav spec, I’ll look into working with it but I’ve never
ANYTHING like reading /writing file formats before.

sorry to keep annoying the list with the same old junk.
-matt


June 14, 2006 | 8:57 am

Well, the OS X way to keep multiple files together is the Bundle.

To the file system, a Bundle is a subdirectory hierarchy with any
number of files.

To the user a Bundle is a single item.

I don’t know that Bundles are any more MS-DOS/Windows-friendly than
Resource forks, but they work well on OS X.

Just another idea — Peter


June 14, 2006 | 3:34 pm

bundles are indeed a great idea. I found the apple guide to
"document packages" apparently, I would need to alter the Info.plist
for every application that wanted to use these .wavs. unfortunately
it doesn’t seem that max has one

sorry for [ot]ness

-matt
reference:
http://developer.apple.com/documentation/CoreFoundation/Conc eptual/
CFBundles/Concepts/DocumentBundles.html#//apple_ref/doc/uid/ 20002128


October 3, 2007 | 9:02 pm

dear aidekman and others,

did this trail below get followed?

i am looking for a way to build a spotlight-like-live-search for
folder content in max.

any ideas to get started ?

thanks,
t.

Am 12.06.2006 um 16:27 schrieb matthew aidekman:

> thought someone might find this useful
>
> In the past, I have asked about and discussed adding metadata to
> sound files. No one really came up with much. Among the easy and
> useful things I found out how to do via the included link, I found
> that you can use UNIX (the shell object) to add spotlight
> attributes to files and run spotlight searches
>
> http://www.matisse.net/OSX/darwin_commands.html
>
> I know I’ll be working on a system to derive, store, search, and
> recall metadata for sound files..


Viewing 11 posts - 1 through 11 (of 11 total)