$0.00 0

YOUR CART
Checkout

SUBTOTAL
DISCOUNT
VAT
TOTAL
Checkout
Banner
In this tutorial, I'll be starting the creation of a framework for the use of arrays in...

In this tutorial, I’ll be starting the creation of a framework for the use of arrays in Reaktor. Arrays are a part of the Core environment, and as such the reader should have a decent familiarity with Core. There is a series of tutorials here to help you get your feet wet.

As is often the case, Part I of this series is a little slow, as I explain the purpose of the project and the problems we will encounter. Next week we’ll pick up the pace some, I promise!

CORE ARRAYS

An array is a module that can be used to store a large number of values. Arrays can have any number of uses, but a common one is storing incoming audio into a buffer for later use, such as in a delay line.

In Reaktor, there a number of ways to store large amounts of data – the Event and Audio Tables, the Tapedeck modules, and Core Arrays. While the other modules have their purposes, Core Arrays are more powerful than their Primary counterparts in that they allow for multiple access points of data, and can force an order of operations that would be difficult to replicate in Primary. We’ll get into why that’s important in just a bit.

[aside title = “Pro Tip”]Core Arrays can be more powerful than their primary counterparts[/aside]

There are several ways that a programmer may wish to manipulate data in an array. Examples include adding new values, deleting old ones, inserting values in between existing values, sorting data (such as from highest to lowest), etc.

Unfortunately, shortcomings within the Reaktor environment make many of these basic operations quite difficult. It is my intention to create a simple framework to manipulate data in this tutorial series. Eventually, I hope to use the framework to create a multi-breakpoint envelope, where the array holds information about the number of stages the user has specified.

It will be necessary to allow the user to delete and insert data points at will for this project, which makes it a perfect fit for the data framework I would like to build. If you are unfamiliar with the concept of a multi-breakpoint envelope, you can check the macro “Multi-BP Env” in Reaktor, or if you have Absynth, the envelopes in that are another example. There is also a tutorial series on envelopes here that fully outlines the different stages of an envelope.

Let’s tackle the different types of data operations one by one.

ADDITION

Adding a new element to an array can be done in any number of ways. There is a distinction between adding a new element to the end of an array (called adding) and adding a new element somewhere that another element is already stored (called insertion).

Adding is the simplest of our data operations, so we’ll tackle it first. I often like to start such a project by imagining a ‘black box’ macro that has inputs for each piece of information I need to accomplish something, and whatever outputs are necessary:

To add a new element, we need the value we want to add to the array, the current number of elements stored, and access to the array itself. The outputs are simply updated versions of the Idx and Data inputs. If data operations need to be done in a specific order, the outputs can be used to control the inputs of other macros, as we shall see eventually.

Now let’s think about what the inside of this macro should look like. We have a value (Idx) that gives the current number of objects stored in the array. We want to store the data in that index, and then increase the value of Idx by 1 – for example, if there are no elements currently stored, we store at index 0, then add 1 so the next element will be added at index 1.

Each event arriving at the value input will store to a new point in the array. One caveat is that the array must be large enough such that the value of Idx is not out of bounds. If Idx is greater than the array size, the data will overwrite the last element.

The easiest solution to this is simply to create an array way larger than you need – for example, if the array can hold 5000 elements, it seems unlikely that anybody would take the time to create that many stages of a multi-breakpoint envelope. If, for whatever reason, this is not a workable solution, you can also modify the structure slightly:

In this example, if there is no space left in the array, the input is simply ignored. Another common way to handle this problem is to simply wrap around the structure, so if the index is too large, simply start writing over the beginning of the array again. This type of array write is used quite commonly, especially with delay lines.

Despite being very similar, these are three distinct macros that can be used for different purposes. Any one of them can be connected like so:

CONCLUSION

This week we covered the easy stuff. Next time, we’ll be working with Primary iterators to control some more exciting and complex data operators. There are other problems to be solved as well, such as storing our arrays into Primary Snap Value Arrays, to allow them to be saved as snapshots.

Have a Question or Comment About This Tutorial?

Want to ask a question about this tutorial or perhaps you have something to add?

Click through to our forum post about this tutorial and join the conversation!

Visit: Arrays in Reaktor, Part I

RELATED COURSES

Building in Reaktor for Beginners

ADSR Courses

Add to cart
SAVE 40%

Sequencer Modules in Reaktor

ADSR Courses

Add to cart
SAVE 40%

FFT (Fast Fourier Transform) with Reaktor

ADSR Courses

Add to cart
SAVE 40%

Reaktor Core Masterclass

ADSR Courses

Add to cart
Waveform Loaded
Waveform Played
×
PLAYLIST
Clear all
WISHLISTS
Create an account to use wishlists
×
SAVE TUTORIALS
Create an account to save tutorials
×
FOLLOW YOUR FAVORITES
Follow your favourite labels, formats and genre's and ADSR will show what's new in those on your next visit.
×
  • Create product wishlist
  • Save your favorite tutorials
  • Regular discounts and exclusives
  • Never miss a sound! Follow your favorite labels.
Sign up to My ADSR to ensure you're ahead of the pack. Save your favorite content and be notified of new content. You'll never miss a thing!
Create your account now!
CREATE ACCOUNT
Sign up to My ADSR to ensure you're ahead of the pack. Save your favorite content and be notified of new content. You'll never miss a thing!
  • Get days all ADSR courses free
  • Create product wishlist
  • Save your favorite tutorials
  • Regular discounts and exclusives
Create your account now!
SIGN IN
adsrsounds.com login Video streaming login
Remember me
Forgot your password?
DON'T HAVE AN ADSR ACCOUNT?
Create your account
FORGOT PASSWORD

Send info
  1. Enter your email address
  2. Click "Send info"
  3. Check your inbox for an activation link
  4. Visit activation link and enter set new password
Sign in
DON'T HAVE AN ADSR ACCOUNT?
Create your account
IMPORTANT: Is this product compatible with your system? Please check the product system requirements tab before purchasing. To proceed with this purchase you must check the box to confirm you have checked the requirements.


I have read the system requirements and agree to the return policy. I understand that refunds will not be given due to limitation of my software or operating system.

I don't agree
, you have loyalty credit available. To redeem click the button to claim !
Claim
Claim your free sounds

For every $5 you spend on ADSR receive 1 free credit for Sample Manager.

Even better, we have back-dated this so any purchases you made since 2017 have also been credited to your account!

Click the button below to claim your free credit.

Get my free credits
Loyalty credits
1Every purchase you make on ADSR* now earns you 1 loyalty credit for every $5 spent
2Once you make a purchase your credits are added to your account
3Credits can be redeemed in ADSR Sample Manager to download individual loops and samples
4To redeem simply download ADSR Sample Manager and/or log into Sample Manager with your ADSR login details
5Credits will have been automatically added to your account
6Loyalty credits expire 30 days after initial purchase
* Not including video subscriptions