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.

Alternatively, we could have clipped the <strong>in</strong>put value (to a different range,<br />

of course), and that is generally a little bit better, because float values<br />

which are out of the range of <strong>in</strong>teger representation can produce arbitrary<br />

<strong>in</strong>teger values, <strong>in</strong> which case we would no longer get true clipp<strong>in</strong>g.<br />

Now, we use another macro to compute the read <strong>in</strong>dex from the RecordPos<br />

and Distance:<br />

Obviously, the playback position must be the Distance <strong>in</strong> samples beh<strong>in</strong>d the<br />

record position; therefore, we subtract one from the other:<br />

The distance value is latched because it is produced by a control signal <strong>in</strong>put,<br />

which potentially can receive events at any time, and we do not want the<br />

subtraction happen<strong>in</strong>g at times other than at audio-clock events.<br />

If we just subtract, the difference can turn out to be less than zero because<br />

our array is not a loop; its ends are not connected together. So we need to<br />

wrap the result:<br />

-1 must become N-1,<br />

-2 must become N-2,<br />

-3 must become N-3,<br />

and so on.<br />

132 – REAKTOR CORE

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

Saved successfully!

Ooh no, something went wrong!