Midi controlled switch index

Hi!
I’m completely new to touchdesigner and would like to make a simple video player reactive to midi input.

I have several moviefilein TOPs connected to switch and a midiinmap connected to logic to get 0/1 values for each note played.
What I would like to do is on a note hold (physically on a controller) the video with index of that note-button is being played from the beginning. When note change, the video with corresponding index plays instead. All videos should jump to first frame (reload) after their corresponding note is turned off.

I would be thankful for any suggestions as to how to achieve this behavior.

Hi there,

see attached a .toe file with a couple of similar ways on how I would approach this.

I think that the second example should be close to what you are trying to do. Just replace the buttons with your Midi note coming in TD.

Have a look and let me know if you think that this is what you were after.

Just be aware that I have changed the speed of the Movie Files for my testing.
and the names of the Movie File nodes (vid0, vid1, vid2 …) are important because that’s what I reference to pulse them (to get starting from the beginning). You will see what I mean if you look inside the Chop Execute nodes.
I’m happy to explain in more detail if anything is not clear.

cheers,
midi movie.toe (5.6 KB)