Simple question: detect usb stick

Mar 24, 2010 at 8:39pm

Simple question: detect usb stick

Hi,

I have a simple question: I would like to check whether a USB stick is placed in the computer, and use this to trigger opening a file which is not on the USB stick itself.

I tried using jit.qt.movie, which returns a 1 behind the file name in the Max window if loaded succesfully, but I don’t know how to go on from there. And I have the feeling that there should be a simpler way..

Any ideas are welcome. Thanks!

#49337
Mar 25, 2010 at 12:26pm

Maybe I should clarify my question: is there a way to receive a 1 when a file is found in a specified path, and a 0 when the file is not found? I am not really experienced with max msp, so I would appreciate any advice.

Thanks!

#177280
Mar 25, 2010 at 1:45pm
– Pasted Max Patch, click to expand. –
#177281
Mar 29, 2010 at 1:12pm

The vague answer above put me in the right direction, thought I’d share the solution for anyone else who is interested. I used a metro timer to import a file from a USB stick, using jit.qt.mov. The conformation message it gives is converted to a symbol with tosymbol, and a select object compares it to the positive and negative message. If one of them is a match, a switch is set.

Attachments:
  1. Check_USB.maxpat
#177282

You must be logged in to reply to this topic.