Random Number Limit?
Posted: Tue Sep 03, 2013 3:46 pm
hey everybody, first post! woohoo!
So, I'm working on a plug-in that will randomly load two effects and assigned parameters to an XY pad. Here's the issue I'm running into:
I have a Random prim that's time seeded and using an AfterLoad prim to trigger the generation (and thus the FX selection/assignment) when the plug-in is loaded. However, I'll only have a grand total of 12 effects to choose from, and given that the random prim generates 0-32767, a good percentage of the time it ends up just loading the last plug-in in the Selector's index. So, what can I do to limit the Random's range to something like 0-12 or anything like that?
So, I'm working on a plug-in that will randomly load two effects and assigned parameters to an XY pad. Here's the issue I'm running into:
I have a Random prim that's time seeded and using an AfterLoad prim to trigger the generation (and thus the FX selection/assignment) when the plug-in is loaded. However, I'll only have a grand total of 12 effects to choose from, and given that the random prim generates 0-32767, a good percentage of the time it ends up just loading the last plug-in in the Selector's index. So, what can I do to limit the Random's range to something like 0-12 or anything like that?