Button Text Display

Hi, I’m an absolute beginner with TouchDesigner.
I’m following the tutorial “Audio Analysis | AME 394 | TouchDesigner” by Matthew Ragan on YouTube. (I cannot embed a link here)

In the tutorial, he is customizing the text to be displayed on the button. The Button COMP that he had looks different from the Button COMP I have (attached). Looks like the one in tutorial, the text is in purple frame so I think it’s a TOP. So I tried to add my own Text TOP to my Button COMP but I cannot manage to display the text I put in Text TOP on the button. It can only show the original Text COMP.

It wasn’t an issue for the beginning of the tutorial but later in the tutorial he is connecting a table to the button to show the text from the table. And then I cannot connect the table data to Text COMP I had to connect it to Text TOP. Then I cannot make the table text appeared on the button.

I want to replicate the Button TOP menu that he had but I’m too new to TouchDesigner that I don’t know how can I add the missing components. If anyone knows how I can solve the issues or how can I display the same Button menue as in the tutorial that will be much appreciated!!

Hi @karen0317 - matthew here. The button COMP in the current version of TouchDesigner has replaced the old text TOP approach with a new Text COMP approach instead. You can use a little conditional python and a table DAT to get back some of the old mechanics:

We can determine our table lookup with a little CHOP math:

And then use a table to look-up that value with a little python:

We can also do this all with python:

Attached are both examples for you to see:
button-with-state-labels.tox (1.8 KB)

Hi @raganmd, Thank you so much for the reply!! I didn’t realize it is because of the update of the TouchDesigner interface.

I tried with the table + lookup one, and I was wondering in this case will the clone of the button still work with the counting digits on the table to show the data automatically?
In the YouTube tutorial, the DAT table is outside of the Button COMP so when it reads the table it will follow the digits that are set in the Button COMP. But with this version when we use lookup inside the button, the clone of the button seems to not work with the digits as the DAT table is now inside the Button COMP.

Karen

You’ll probably want to use a slightly different technique here - are you just following the tutorial or are you working on something in particular?

If you’re just following the tutorial, I’d change the technique here and instead use the text parameter that’s in the button component. That didn’t exist back when that tutorial was recorded, so it’s a little easier to make those kinds of interfaces now. Referencing the table in the button’s parameter will still work with a replicator, and won’t require you to make the button into a clone.

Here’s a quick example of what that would look like:
button-replicator.toe (4.8 KB)

1 Like

Yes, I was trying to follow the tutorial (and I also thought the button part might be helpful for future projects when I want to switch things).

Now I’m a bit clearer with the interface after playing with TD for a few days! Thanks a lot for the clarification and the patience in explaining all the steps :slight_smile:

1 Like