Forums > MaxMSP

Simple question: detect usb stick

March 24, 2010 | 8:39 pm

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!


March 25, 2010 | 12:26 pm

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!


March 25, 2010 | 1:45 pm
– Pasted Max Patch, click to expand. –

March 29, 2010 | 1:12 pm

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

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