|
simple comp to display lines of text from fileThis quartz composition reads text from a file and then displays it one line at a time over and over. Intended to be brought into Resolume and manipulated. I'm just getting started with QC, looked around for other posted compositions and patches for doing this and never really saw quite this. Hopefully this is useful to others. I couldn't figure out how to split s string on newlines natively in QC so used javascript patch. This probably is a performance hit, I would think, so if anyone knows a better way... (I want the input file to be able to be just plain text, i don't want to have to convert to XML or some other format.) cheers, steev |
Using the String Components patch with a separator, I believe option-return is a valid symbol to use line breaks as separators.
nope, option-return as a separator in String Components doesn't appear to work. i've also tried, without luck, \n and \r and \n\r and \r\n, which are how'd you represent newlines and carriage returns in most programming languages.
works for me.
huh. maybe we're running different versions of QC and it's a bug they fixed? i'm only on OS X 7 so i can only run QC 4.6.
afaik, option-return has always worked, so i don't know.... i'm currently on 10.9 running the newest Graphics Tools / QC 4.6.
This is odd, I opened up your composition and cut-and-pasted your instance of the string components patch into my comp, and now it works. but when i was typing option-return in myself it wasn't. oh well. i also saw you were using interpolator, which seemed more straightforward than wave generator, so i switched to that. so thank you on 2 fronts.
thanks man! this helped me put subtitles to a live show! you rock!!!