A parameter can only be linked to one source. The Audio source's Iteration Frequencies and the Internals source's Iteration# are therefore mutually exclusive on any non-transform parameter. Transforms can be chained in series, but this doesn't work for parameters like length, thickness or distortion for example.
Use case: seven instances from one Iterator, where each instance's base value is set by Iteration# (to match a fixed layout) and the per-instance audio band is added on top.
Iteration# can't be used in Globals. Globals are available to all scenes, so it would be ambiguous which Iterator they referred to. The workaround I'm using is:
- seven globals, each linked to a Custom Freq. range (log-spaced across 20 Hz to 20 kHz)
- the parameter linked to Iteration#
- an Expression using Iteration# to index into a start-value vector and a band vector
It works, but it duplicates what Iteration Frequencies already does, and it has to be rebuilt whenever the iteration count or the frequency range changes. It is also only practical for a small number of bands. Beyond about 10, creating and linking the globals and maintaining the expression becomes tedious and error-prone, and it doesn't scale to the larger band counts that the Iterator is well suited to.
Either of these would remove the need for it:
1. Allow a second source on a parameter, combined by add or multiply.
2. Make Iteration# available as a variable in the Expression modifier, so it can be combined with the linked source's value. Because it would belong to a module parameter rather than a global, it could resolve against the nearest Iterator, as the existing Iterator-based features do, which avoids the ambiguity that rules out globals.
I'm fairly sure this hasn't been requested before in the forum. It is perhaps a fairly specialised case, but I gave a presentation on Magic iterators at the TouchDesigner user group meeting in London recently and combining Iteration# with Iteration Frequencies, along with scope and parameterisation of scenes, came up as audience questions.
Using Iteration Frequencies and Iteration# on the same parameter
Re: Using Iteration Frequencies and Iteration# on the same parameter
I suppose we could add certain variables/constants to the Expression modifier, but we'd just need to enforce that other variables can't use these names.
Allowing a second source on a parameter seems more complicated.
Allowing a second source on a parameter seems more complicated.
Re: Using Iteration Frequencies and Iteration# on the same parameter
That would solve it. With a variable for the iteration number in the Expression modifier, the linked source (Iteration Frequencies in this case) arrives as x, and the iteration number can index the start values directly, which removes the per-band globals.
The iteration count with the same scope would also be useful, for example for normalising the iteration number to 0-1 or similar.
Thanks for considering it.
The iteration count with the same scope would also be useful, for example for normalising the iteration number to 0-1 or similar.
Thanks for considering it.