1. First steps in Reaktor Core - Native Instruments
1. First steps in Reaktor Core - Native Instruments
1. First steps in Reaktor Core - Native Instruments
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
4.4. Build<strong>in</strong>g an event accumulator<br />
The event accumulator module that we want to build now is go<strong>in</strong>g to have two<br />
<strong>in</strong>puts: one for the event values to be accumulated, and one for resett<strong>in</strong>g the<br />
accumulator to zero. There is also go<strong>in</strong>g to be one output, which outputs the<br />
sum of the accumulated events.<br />
We are go<strong>in</strong>g to build this module <strong>in</strong> the form of a core macro, which would<br />
be easy to use <strong>in</strong>side an event core cell:<br />
This is what the <strong>in</strong>side of our macro looks like:<br />
Obviously the accumulator module needs to have an <strong>in</strong>ternal state where<br />
it’s go<strong>in</strong>g to store its current accumulated value. We are go<strong>in</strong>g to use Read<br />
and Write modules to build the accumulator loop. They can be found <strong>in</strong> the<br />
Built-In Module > Memory submenu:<br />
The module which you see on the left (with an arrow po<strong>in</strong>t<strong>in</strong>g outwards) is<br />
the Read module and the module on the right (arrow po<strong>in</strong>t<strong>in</strong>g <strong>in</strong>wards) <strong>in</strong> the<br />
Write module.<br />
In response to an <strong>in</strong>com<strong>in</strong>g event, the accumulator loop should take the current<br />
value and add the new value to it. Therefore, we have to use a Read module<br />
to retrieve the current state, use an adder to add the new value, and use a<br />
Write module to store the sum.<br />
REAKTOR CORE – 75