02.02.2013 Views

1. First steps in Reaktor Core - Native Instruments

1. First steps in Reaktor Core - Native Instruments

1. First steps in Reaktor Core - Native Instruments

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.6. Event accumulator with reset and <strong>in</strong>itialization<br />

So, <strong>in</strong> order to achieve the desired reset functionality we need to override the<br />

adder output by some <strong>in</strong>itial value. To do this we can use a Merge module<br />

(found <strong>in</strong> the Built-In Module > Flow submenu). The simplest way is to connect<br />

the second <strong>in</strong>put of the merge module to the Rst <strong>in</strong>put.<br />

Now the reset event will be immediately sent to the Merge module, overrid<strong>in</strong>g<br />

the adder output, should the accumulated event arrive at the same time. From<br />

there it goes to the output and <strong>in</strong>to the <strong>in</strong>ternal state of the accumulator.<br />

In the above structure, the value occurr<strong>in</strong>g at the Rst <strong>in</strong>put will be used as the<br />

new value of the accumulator. Maybe it’s even not such a bad idea, but then<br />

it’s not exactly a reset function, but rather a set function, as implemented <strong>in</strong><br />

the standard <strong>Reaktor</strong> event accumulator module. If we want to have a true<br />

reset function we should write only zero values <strong>in</strong>to the state, regardless of<br />

the value appear<strong>in</strong>g at the Rst <strong>in</strong>put. So what we have to do is to send a zero<br />

value to the Write module each time an event occurs at the Rst <strong>in</strong>put.<br />

Send<strong>in</strong>g an event with a particular value <strong>in</strong> response to an <strong>in</strong>com<strong>in</strong>g event is<br />

a quite common operation <strong>in</strong> <strong>Reaktor</strong> <strong>Core</strong>, and we suggest us<strong>in</strong>g the Latch<br />

library macro for that. Expert Macro > Memory > Latch:<br />

As we have already described, the Latch module has a value <strong>in</strong>put (top) and<br />

a clock <strong>in</strong>put (bottom). We need to connect the Rst <strong>in</strong>put to the clock <strong>in</strong>put<br />

of the latch to trigger the send<strong>in</strong>g of an event to the output of the latch, and<br />

we also need to connect a zero constant to the value <strong>in</strong>put of the latch, because<br />

we want the output events to always be zero. Or we can remember that<br />

disconnected <strong>in</strong>puts are considered to be zero constants (unless otherwise<br />

specified), and we can leave the value <strong>in</strong>put of the latch disconnected:<br />

78 – REAKTOR CORE

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!