QC Number Pad / Iterator Workout
The QuartzComposer (closed) group on Facebook has been getting a decent amount of action, and last night someone asked a question that got me thinking about something I'd done before for art, but wanted to polish the logic off for in a more obvious way.
Basically, the guy wanted to have a number pad, and depending on where they hit on the window, generate that number.
I setup logic to create a grid and track the index of each. If you click on a square, the last value clicked will show up, via the "processor" iterator, while the grid is displayed via the "consumer" iterator.
If you wanted to assign a different value to each, you would do some math in the iterator to offset (add 1 to the result, for example, to have the keys start on 1). Remember to propagate changes to both iterators, so that they are doing similar calculation, if you want to retain the last value.
With some additional sampling and holding of values, and a math object with the operator controllable, one could probably make a calculator. At the moment, it's a decent setup for making a grid to trigger media. It's not really refined, just slapped together yesterday quickly, so there may be subtle ways to improve performance (or not).
The output of the processor iterator is hooked to the enable of a Billboard for some quick monitoring of the output. You can disable/delete.