tooll3 / t3

Tooll 3 is an open source software to create realtime motion graphics.
MIT License
3.41k stars 189 forks source link

inconsistent PickStringPart #409

Closed pixtur closed 4 months ago

pixtur commented 6 months ago

Please look at the following graph:

both should have returned different results for the two indices.

image

ylmrx commented 5 months ago

The RandomString operator only return ONE "word" string at a given time. Given a single word (when set to word), PickStringPart will issue this word (no matter the FragmentStart value):

var moduloIndex = (startFragment + index) % _numberOfChunks;

so in our case moduloIndex will always be 0 (x % 1 = 0 , no matter the value an integer x)

I think you're confusing RandomString (issue a new single word with each beat), and MockStrings (issue a collection of random words). This will behave as you intend.

pixtur commented 4 months ago

Thanks for looking into this. Kind of embarrassing really, considering I wrote that op. I think its name is pretty misleading so I will rename it to something like AnimRandomString