How to display one character at a time

Hi all. I’m looping through a table DAT via constant and limit CHOPs to output each row to screen one by one but what I’d like to actually have is for each character (of each row) to display one at a time as well. So it’d be like H (wait a few milliseconds), E (few milliseconds), L (few ms), L (few ms), O. Hope this makes sense. Any tips? Thanks.

You could do this a little more elegantly with some python, but if you’re after an operators only approach, this kind of idea should do the trick:

base_build_text_over_time.tox (1.3 KB)

1 Like

Thanks for the response. Honored to have my ever first derivative forum post answered by the (in)famous Matthew Ragan! I actually tried something similar to this using your Constant CHOP -> Limit CHOP row iteration technique but my question is how would I get the typing to go just once and stop since Limit’s Loop and ZigZag types both cycle?

You can use Clamp on the limit CHOP instead of zig-zag.

To get this to run you’d need to then also re-init / re-start your timer.

Also - Thanks for the :heart: !
Always happy to be answering questions on the forum when I have the bandwidth. :slight_smile:

I switched the limit to clamp and used a DATexec to pulse the timer.par.start and this worked like a charm! Thank you sir.

1 Like

hi all,

just to share different approaches, here is another solution i came up with when working on a project last year.


typeWriting.tox (2.0 KB)


Thanks Gallo. Really appreciate the simplicity of your approach. TD is a never ending journey of exploration and discovery.

Is there an easy way to adjust the speed of the characters typing though? Messing with the LFO params doesn’t seem to do anything.

hi. Yes, reducing the frequency of the LFO should get you there. If not i would say there is a bug to track !

In Gallo’s example you can also set the count limit to “Loop Min/Max” so you wouldn’t need the expression or the timer.

The other limitation you might be seeing with regard to speed is that you are limited to fps/2 characters per second because the counter must wait for the lfo to go from 1 to 0 back to 1. You could double that by also checking “on to off” in the CountCHOP, or you could increase the step value by adding a constant to Input 2 of the Count CHOP with a number > 1.

Or as Matthew said, you could go with straight Python by putting this expression in the TextTOPs ‘Text’ field:

op('text1').text[:int(absTime.frame *.5 % len(op('text1').text))]

where “.5” would be a speed multiplier.

And for fun you can also put negative numbers as Python’s array index and make it backspace everything away

op('text1').text[:-int(absTime.frame *.5 % len(op('text1').text))]

or make it delete all the text from the beginning

op('text1').text[int(absTime.frame *.5 % len(op('text1').text)):]

And yes, playing with negative array indexes is what’s now considered fun on a Friday Night 6 months into a pandemic. I really wish there were something to do :tada: