Bypass of non-existant movies.

OhDaeSu's icon

Hi all,

Im currently creating a patch to trigger video through Ableton -

My patch consists of a poly~ object containing a sprintf function and jit.qt.movie in order to read movies from the disk, by sending an integer value into the poly~.

For example, if the integer in would be 12, sprintf would read movie12.mov

This all works fine, however, while the poly~ object runs from (for example) 1 to 30, there isnt neccessarily a movie1.mov... right through to movie30.mov in the directory.

This means that when a movie is playing, and a non-existant movie is called via sprintf, the movie playing freezes on the current frame.

I wondered if anyone knows of a way to disregard a read movie message if the movie does not exist?

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

Here is the poly~ patch used:

Thanks in advance,

James

Rob Ramirez's icon

lots of ways to handle this.
you can output the contents of your movie folder, using the "folder" object, and store them in a "coll" object. then you can test if the current movie exists by checking if it's in the coll object.

alternatively, you can test the "read" notification output from the rightmost outlet of jit.qt.movie. if notification sends out the message "read filename.mov 0" it means there was a problem reading the movie, implying the file does not exist. you could test for a successful read this way, and if unsuccessful, read back in the previously playing movie, or however you want to handle that case.

OhDaeSu's icon

Thanks for the response. I think the folder/coll option is the way to go, however, my folder object doesnt seem to output my video folder. If I drop a folder with .maxpat files its fine, if its wavs or .mov files it just gives me a count of 0. Ive done a search around the forums, not sure if this is a max for live or windows 7 bug?