Add subtitles triggered letter by letter to video
Hi! I am a complete beginner with Max and especially Jitter, so I hope someone here might be able to give me some advice.
I'm trying to create a patch that triggers subtitle text one letter at a time using jit.gl.text (overlaid on a pre-recorded video using [jit.movie]). Using [fzero~] I want to detect pitch from a live input (clarinet) and build words on the fly by having a specific pitch trigger a particular letter. So far the closest I have come is to bang each new letter message into another message [append $1], which sends to [jit.gl.text] so that each new letter that is triggered is added to the previous one, building words. The main problems with this method is that there are spaces between each letter and if I actually want to add a space to signal a new word, I am not sure how to do this (I thought maybe I could just send the message [""] or [" "] to the append $1 to signify a space but no luck! I have attached the patch. Can anyone offer advice about how I might trigger words and spaces in a more controllable subtitle format? One more thing I'm wondering is how I can automatically display multiple lines of text when the first line is reaching the perimeters of the jitter display window. I'd ideally like it to happen automatically but it's much easier to manually trigger a new line, a bit like pressing return / enter, that would be fine too!