Home

Week 11: Interface and Application Programming

This week, I made a proof of concept for my final project. I built an interface between my development board and a TouchDesigner custom program.


For my final project, I plan to control arrays of addressable LEDs through a TouchDesigner interface. The idea is to use sound to parameterize designs and communicate instruction to an ESP32 board wirelessly.


As a proof of concept, I decided to interface a microphone through a serial port to my Macbook. I was inspired by this youtube tutorial: https://www.youtube.com/watch?v=V_Q_fDukTI0&t=640s&ab_channel=P.G.Lucio.


The first step was to set up the board. My goal was to interface the system through a wired serial connection. I based myself off of the sketch I had built for input week. I addapted it to the new ESP32 board and quickly had it running. I decided to do a straight serial write of microphone values and to do modifications in TouchDesigner. In the future, I might have to do some data processing in the arduino code; I will finalize this part in my final project.


I was quickly able to get values from the analog mic in the arduino interface. Those values would then be communicated through the FDPI to USB interface to TouchDesigner. One thing I learned is that only one instance can read the serial values at once on my computer. It is thus important to close the Arduino IDE before trying to read the serial input in TouchDesigner.



It was my first time using TouchDesigner and I was quite intimidated by the program. I had never used such a programming interface and was not sure I could do it. However, the process was quite straightforward. There are a few systems to understands, but it makes for an intuitive programming experience.


Following the youtube I mentionned earlier, I designed a 3d sphere of orange color. I adapted the code to the needs of my propject, changing the ultrasonic input for a mic input and adapting the mathematical transformation of the data. I used values between 2000 and 4000 and transformed them into values between 0 and 1 (what was required for the sphere shape.)


The program I built was able to respond to music pretty well. The below video shows how the system works together.


This proof of concept shows that I will be able to use analog inputs for my final project. Next steps are to test the output link from TouchDesigner to my board and to power LED strips.


Download the files and build your own!