Iteration and order module

gentleclockdivider
gentleclockdivider Member Posts: 243 Helper
edited January 13 in Reaktor

Question about the iteration

Let's say we have a iteration module that spits out the stream of nr's ranging from 1-8

I want to use these to (rapidly ) change the appearance of a multidisplay (with 8 elements and thus 8 separate x1-x2,y1,y2 ,rgb values for each element )

For that , the index of the element needs to be selected first , and then the parameters ( the order of the parameters are not important as long as they appear after the index is selected )
So ..(long rant ) my question :

If the stream of nr's from the iteration go out the first outlet of the order , it should happen like this ( disregarding outlet 3 for purposses sake )

outlet 1 : value 1

outlet 2 : value 1

outlet 1 : value 2

outlet 2 value 2

outlet 1: value 3

outlet 2 : value 3

And NOt like this

outlet 1 : value 1,2,3,4,5,6,7,8

outlet 2 : value 1,2,3,4,5,6,7,8

If it would happen like thelast example we can't possible adjust the parameters for each separate element of md .module .
I' m a bit at loss
It's also mighty difficult to debug things like these , the console view in other packages are a godsend

Comments

  • Studiowaves
    Studiowaves Member Posts: 656 Pro

    Can you latch each iteration value in between clocks? Doesn't the iterator send out a stream of values that aren't clocked at the sample rate. It might be possible to use a comparator followed by a latch that only latches when the number is equal to the ones coming out of the iterator. If this = that then router will switch following the comparator will switch on a trigger the latch as it passes the number to be latched.

  • colB
    colB Member Posts: 1,017 Guru

    Can you latch each iteration value in between clocks?

    You need to be more specific. What do you mean by 'latch'? (you seem to be in Primary mode, but latches only exist in core)

    what do you mean by 'clocks'?

    Doesn't the iterator send out a stream of values that aren't clocked at the sample rate

    Yes, assuming 'limited speed' is unchecked in the properties. The iterator pumps out events as fast as it can. It is limited by the fact that each one must be processed to completion to the end of processing chain, and any 'children' of that chain… i.e. if/when order modules or similar are introduced. Only when all that is completed can the next iteration be generated.

    Iterator is an event process, so separate form the Primary audio engine.

    It might be possible to use a comparator followed by a latch that only latches when the number is equal to the ones coming out of the iterator. If this = that then router will switch following the comparator will switch on a trigger the latch as it passes the number to be latched.

    I can't follow your explanation here. Maybe explain what you are trying to achieve.

    Also try to build your own little sketches to prove to yourself whether your ideas work or not. It's really not so difficult. Using numeric displays, lamps, and ACEW when things get complicated. You can create experimental examples to test your theories.

  • Studiowaves
    Studiowaves Member Posts: 656 Pro

    Yeah that's a head full there. I was thinking of using a comparator to trigger a latch. The latch should then hold the current value coming out of the iterator. It seems possible if the output of the iterator values are also events. I guess the sample rate isn't important because the iterator acts independently. The comparator is only needed to direct an expected iteration value to the holding cell or latch, whichever you want to call it. I guess if you want to latch all of the iteration values within a time frame you'd have to have a stepper to step thru the latches, one latch captures and holds the first iteration then the second latch would hold the second iteration and so on.

  • colB
    colB Member Posts: 1,017 Guru

    It happens like you are hoping…

    In Primary each event is processed to its ultimate conclusion before the next is generated, or processed.

    So if you have an iterator generating events i1, i2 and i3, and those are sent into an order module with 3 outputs, you get this order

    the first event i1 from the iterator is generated and goes into the order module

    the order spits out three events in order: i1o1, i1o2 & i1o3 (each of these must wait until the previous one has been completely processed, including all forks caused by more downstream order modules and similar)

    then once those are all done, the iterator generates i2 and sends that to the order module

    the order spits out three events in order: i2o1, i2o2 & i2o3…

    And so on.

    Seems like this is explained better in the old R5 manual than in the R6 manual

    For what it's worth, I gave up trying to drive multi-displays this way many years ago, all the order modules you end up needing, just obfuscate the code and make it a nightmare to debug. I always use a core cell instead.

    For example, here is a simple lamp:

    inside the core cell looks like this:

    multiple outputs from a core cell that all originate from the same input event are processed in order from top to bottom, so this just works, and always works. It make simple stuff like this really simple, and also enables some really complex processing, sending iterators into the corecell for fancy ******.

    Here's the driving code for the visualization graphics in my 'Noise Bleed' Block

    It's complex in core, but would be a total nightmare in Primary with all those order/value/merge module combos that would be required. And I can't imagine trying to debug and maintain that kind of Primary code. This core version went through multiple changes and updates pretty much trouble free.

  • Studiowaves
    Studiowaves Member Posts: 656 Pro

    What are some common uses for the iterator? In this case I think he wants to customize the appearance of a display. Kind of a feed forward idea, yet iteration typically means to redo something, possibly for better resolution of a math answer.

  • colB
    colB Member Posts: 1,017 Guru

    What are some common uses for the iterator?

    Updating multiple objects in a multidisplay. Each iteration, you update a different object in the display.

Back To Top