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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

It is important to understand that turn<strong>in</strong>g the process<strong>in</strong>g mode<br />

of an operation to <strong>in</strong>teger and convert<strong>in</strong>g of a float<strong>in</strong>g po<strong>in</strong>t result<br />

of the same operation to an <strong>in</strong>teger is not the same. Let’s consider<br />

an example. Here we are add<strong>in</strong>g two numbers 2.4 and 4.3<br />

as floats. The result is clearly 6.7, which when converted to <strong>in</strong>teger<br />

will produce 7. So the output of the follow<strong>in</strong>g structure is 8:<br />

Now if we change the mode of the first adder to <strong>in</strong>teger, <strong>in</strong>stead<br />

of add<strong>in</strong>g 2.4 and 4.3 we will add their rounded versions<br />

which are 2 and 4 respectively, produc<strong>in</strong>g 6. So the result is 7:<br />

Clock <strong>in</strong>puts completely ignore their <strong>in</strong>com<strong>in</strong>g values, therefore they are normally<br />

always floats. Furthermore, signal type conversion will not be performed<br />

for the signals that are used only as clocks:<br />

Here the clock <strong>in</strong>put of the Read module is still float although the module has<br />

been set to <strong>in</strong>teger mode (the OBC ports look the same regardless whether<br />

they are float or <strong>in</strong>teger).<br />

Integer feedback is automatically resolved <strong>in</strong> the same way as float<br />

feedback – by <strong>in</strong>sert<strong>in</strong>g an <strong>in</strong>teger mode Z^-1 module (of course no<br />

denormal cancel<strong>in</strong>g is needed here).<br />

7.3. Build<strong>in</strong>g an event counter<br />

Let’s build an event counter macro. The function of this macro is similar to an<br />

event accumulator, but <strong>in</strong>stead of summ<strong>in</strong>g the values of events, this one will<br />

just count them. Integer signal type seems a logical choice for count<strong>in</strong>g:<br />

114 – REAKTOR CORE

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

Saved successfully!

Ooh no, something went wrong!