How to use Logic Pro X with TouchDesigner to control projectors with midi data

I’m new to TD, and want to know if I can use it along with Logic Pro X to trigger images using midi data for an upcoming concert performance of a composition I finished for String Quartet and recorded tracks.
The idea is to have percussion instrument images show up as the recorded tracks play, using midi points to trigger the appearance and fade out of these images throughout the live music performance.
Would this be a complicated set up? Is it at all possible?
Any suggestions would be greatly appreciated.
Thank you in advance for your time and consideration in this matter.
Sincerely,
Algae592009

Hi @algae592009,

first you would have to find a way to route the midi data coming from Logic Pro into TouchDesigner.
TouchDesigner has Midi DATs and Midi CHOPs to read the incoming data.

If it’s static images, you can load these in with Movie File In TOPs, switch between them using a Switch TOP and create the Fade Out effect utilizing perhaps a Trigger CHOP as well as a Level TOP.

For a general understanding how you might approach this, I would recommend going through our curriculum - it will give you a good understanding on how TouchDesigner works and in what way the operators can be controlled.

cheers
Markus

Thank you Markus for your reply. I have been watching and trying out some of the curriculum content.
A question coming up for me is: Can TouchDesigner playback an imported midi file by itself, or does it need to be playedback on a DAW, which then is picked up by a midi in chop?

Hi @algae592009,

the Midi In CHOP has the option to load whole Midi files by switching the MIDI Source parameter to “File”. These can then be played back either using a TimeSlice CHOP or a Lookup CHOP to better control the playhead.

Hope this helps
cheers
Markus

OK. I found how to load the midi file I generated from my DAW.
Then I’ve been reading and watching videos about using the TimeSlice & Lookup Chops, but so far haven’t found anything explaining how to set any of them to trigger the midi file to playback.
Is there a chop that shows midi data when played, so I can know it’s actually playing?

Hi @algae592009,


attached are 2 examples on how you might choose to play through the midi file. The Timeslice CHOP will lock the midi file to the Timeline’s current frame while the LFO CHOP together with the Lookup works more like specifying an index in the midi file to read.

Hope this helps
Cheers
Markus
base_midiPlayback.tox (14.9 KB)

Well I looked at the download you sent me. I can see what you described and still am missing how to start/stop the playback of any midi/audio file.
Searching around I found this .tox file that seems to do what I’m wanting. The issue is that it only plays 600 events and then stops or repeats, vs playing the whole file to the end (about 6 minutes in length).

Here’s the file:
MIDI_AUDIO_SYNCER_v1.5.1.1.toe (50.6 KB)

Any idea why it won’t go to the end of the file?

Hi @algae592009,

there could be various reasons:

  • first, your timeline is set to play only once and has a length of 600 frames, so it will always stop after these 600
    image

  • the other reason might be that the example is syncing midi and audio - so it will depend on the length of the audio track.

If you look at the example you send, you can also see that it is using the lookup I had recommended earlier and taking the current audio file playback fraction as the index into the lookup (/MIDI_AUDIO_SYNCER/MIDI_PLAYBACK)

Otherwise the question would be how do you want to trigger the playback of the midifile? Is it a button or an event? And what does “stopping” mean? Does a Stop pause the playback or reset it to the beginning?

If you just want to have a Button that controls playback put down a Button COMP and connect it to a Count CHOP which can increment while the input is “on”. Divide this by the length of the Midi File (use the Info CHOP to retrieve this) and use the result as the index to the Lookup instead of the LFO.

Have a look at OP Snippets of all the operators to see some more examples on their usage.

cheers
Markus

Hi Markus,
I discovered how to extend the length by changing the 600 number in the End & Rend fields to the bottom left of the screen.

I recreated the network you show in your last reply and I found in the infoCHOP the length of the midi file.
I was aware that the Range limit was on Once; I changed that because ideally the midi file needs to be played once.
I’m so far thinking I want to “press” a button to start the playback and let it play to the end of the file.

I really don’t get what you state here. I just assume it has something to do with calculating mathematically something.

Forgive my ignorance: I recreated your network in the top layer, where the perform & local nodes are. The midi is connected to the local. When I press the button node, nothing seems to happen. The midi node also has the yellow triangle alert.

Another challenge I have is that I need the timeline to follow the tempo changes of the piece, which are in the midi file. I got the impression that your second example using an LFO CHOP might just help with that?

In any case, I realized today that I have until the end of September to figure out this interface w/TD. until then, I’ll keep trying or find someone interested in building this for me and I’d pay for the work. So if you know of anyone interested and that understands midi and visual connectivity, let me know.
I appreciate all your feedback.
Alex

Hi @algae592009,

Currently I believe we are not supporting tempo changes in the Midi In CHOP. Could you share an example of a midi file that incorporates this. I tried finding something online but didn’t succeed.

On the other points:

maybe think of it a bit differently: TouchDesigner is a real-time environment, so the timeline could be called a relict from the old days of rendering. This is a bit a mouthful and surely the timeline has a very valid use also nowadays, but I’d like to make the point that you should right now not pay attention to it - it should just always be running and it shouldn’t matter how long it is :slight_smile:

So the idea would be: you start your TouchDesigner project and some time later - or at a certain event - you want the Midi File to start playing. As we import Midi Files only as a whole, we need to create a playback system that reads the values from the full file at a certain time.
Here again I tripped over something: I downloaded a midi file that stated to be 30 sec but came in as a length of 44 seconds… So perhaps it would be best currently to solve this with a Timer CHOP where I can easily specify the length of the playback.

Attached is a little component which includes the network screenshoted above. You can specify it’s Midi File length on a Custom Parameter on the outside and also attach a Midi In CHOP to it’s input. A start button will trigger playback over the specified length.

Regarding getting help: Please post in the Jobs Category here:

Cheers
Markus
base_midiPlayback.tox (4.1 KB)