Forums > Jitter

Bypass of non-existant movies.

March 28, 2011 | 6:14 pm

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?

Here is the poly~ patch used:

– Pasted Max Patch, click to expand. –

Thanks in advance,

James


March 28, 2011 | 7:47 pm

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.


March 28, 2011 | 10:59 pm

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?


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