usb key content

piet's icon

Hello.
I'm a new user of max and jitter,
After several days of tutorial training, I'm starting a little projet:
for the moment,I'd desire to make max "listen" to what's plugged in the usb ports of the mac...
So I would need to have a little clue to do that.
is there any object capable of telling me what's connected to a specific port?
sorry for this noob question, and thanks for any helpful answer.

jko's icon

Take a look at the [hi] object.

Best, Joerg

o s's icon

piet wrote on Wed, 25 February 2009 18:00I'd desire to make max "listen" to what's plugged in the usb ports of the mac...

If you want to examine the contens of your usb-stick and you are
on a mac you may also take a look at the [shell] or the [aka.shell] objects (you will find them under maxobjects.com) so you can use standard unix commands like "diskutil list"

hth

ole

marcc's icon

and serial objects?

piet's icon

thanks for your help,
I'm trying with shell object.

piet's icon

HI,
still learning basic Unix commands, I got my usb drive content thanks to the " cd /Volumes/KEY " command in the terminal..
but when I try to paste this command in the aka.shell example,
max window returns aka.shell:no result..
any idea of the problem?
thank you

o s's icon

piet wrote on Mon, 02 March 2009 12:37HI,
still learning basic Unix commands, I got my usb drive content thanks to the " cd /Volumes/KEY " command in the terminal..
but when I try to paste this command in the aka.shell example,
max window returns aka.shell:no result..
any idea of the problem?
thank you

try (as given in the example) cd /Volumes/KEY;ls

you can also use ls /Volumes/KEY directly...

KEY must be the name of your stick

hth

ole

piet's icon

ok, thanks.
each of my directory path should end with a ""?
does aka.shell equaly understand unix commands and apple script?

Peter Castine's icon

No, you need the backslash in order to include the semicolon in a message. Semicolon (and some other characters) have special meanings to the Max parser. The backslash tells the Max parser "do not treat the following character as a special token but include it literally in the message".

piet's icon

ok
so much things to discover...
thanks

piet's icon

so now that i'm able to do what I desired with the drive content, I'm looking for a way to know when any new usb drive is plugged.
Indeed, for my project, different usb drive will be plugged and unplugged successively
how could i list the content of a new usb key considering I don't know its name?
Is there a way in unix to call data from a usb fixed port?
I mean getting data according to a special path and not according to usb drive names (that I can't predict)?
thanks again for your help..

o s's icon

piet wrote on Tue, 03 March 2009 01:13so now that i'm able to do what I desired with the drive content, I'm looking for a way to know when any new usb drive is plugged.
Indeed, for my project, different usb drive will be plugged and unplugged successively
how could i list the content of a new usb key considering I don't know its name?
Is there a way in unix to call data from a usb fixed port?
I mean getting data according to a special path and not according to usb drive names (that I can't predict)?
thanks again for your help..

this maybe a start (assuming that your internal hard disk name is MacHD):

Max Patch
Copy patch and select New From Clipboard in Max.

hth

ole

piet's icon

thanks a lot...