How to replace string in video location with midi note number?

mbira's picture

Hi folks, I'm brand new here. I recently moved from PC and Visual Jockey to QC, and I've been poking around on QC for the last week trying to get our stage show videos to work.

I have some marginal experience coding in PHP, so I've been thinking of the most optimized way to do what I'm trying to do.

I'm attaching an image of a block diagram of what I'm trying to do.

Basically, I want to receive MIDI notes from Ableton, and when those notes have a velocity of 127, then that note name would be passed through as a string and replace the Movie Location string. IE:

If C3 with velocity of 127 was played, the movie location would be: /Media/C3.avi

If D#4 was played, the location would change to: /Media/D#4.avi

This seems-with my non-existent QC experience like it would be much less processor intensive than having every movie loaded up and ready to go-and it'd also keep the patch extensible...

Now-any ideas on how to build it? :-D

PreviewAttachmentSize
Optimised-video-playback.jpg
Optimised-video-playback.jpg11.24 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

dust's picture
Re: How to replace string in video location with midi note ...

you need a video off state as well so connect the velocity to a conditional patch that has a movie for when the velocity is greater than equal to 100 then connect this to a multiplexer index and set to type string. you would also have to do this for your note numbers and use then use the logic patch for note number and velocity. there are other ways like putting your strings into a structure and indexing out your paths. actually thats a better way to do it. just put all your clips into a folder and use the image movie downloader patch this will give you a list of all your movie locations. if you have 127 movie clips in that folder then you have a clip for every midi note. so use the midi note number to index your file location structure. that will be a lot faster to do but you can just use multiplexor set to string as well as js etc...

mbira's picture
Re: How to replace string in video location with midi note ...

Thanks for the reply. I don't see an "image movie downloader" in my patch library. Is that a kineme thing I need to get? I'm running snow leopard on 64 bit...

Thanks!

dust's picture
Re: How to replace string in video location with midi note ...

my bad its called image importer and directory scanner in snow.

with a combination of these two things you can load all your clips from index via midi note.

its a stock patch.. kineme has a patch called image downloader blocking.

mbira's picture
Re: How to replace string in video location with midi note ...

Thanks for your help, Dust. I'm slowly getting there, but like any new programming language, I just don't know the basics enough to achieve what I'm trying to do. I started with your idea and als found this tutorial on the directory scanner: http://www.vimeo.com/8804233

I'm attaching the quartz composition I have so far.

I am able to iterate through my directory using the math plugin, but I'm not doing it right because the second operand is passed through to the "Structure Index Member" right when it's hooked up.

I'm attaching the non-working example of what I have so far. Problem at this point is I don't know how to keep the movie playing until next video is triggered, and I don't know how to iterate to the next index with the next midi note triggering.

PreviewAttachmentSize
using directory scanner.qtz4.33 KB

mbira's picture
Re: How to replace string in video location with midi note ...

Ugh, this sucks :( I'm having no luck here. It's so frustrating that there is so little documentation on the different patches. The hardest part is to know exactly what you need to have happen, but not being able to figure out how to make such a simple thing work :-(

For example-yesterday, I know at one point I set up something (I thought it was the global midi note receiver) and I was able to visually see the midi note number as it was played. I thought that would be a great value to send as a key for the index to trigger the structure, but now I can't figure out how to make that work...