$0.00 0

YOUR CART
Checkout

SUBTOTAL
DISCOUNT
TOTAL
Checkout
Welcome to the second instalment of Anatomy of a Reaktor Project. In this tutorial, I'll...

Reaktor Tutorials

Anatomy of a Reaktor Project, Part II

Welcome to the second instalment of Anatomy of a Reaktor Project. In this tutorial, I’ll begin to show some of the implementations I designed for the project I outlined last week.

MONOPHONIC MIDI HANDLER

Last week, I outlined the beginnings of a MIDI handler for the project. We need something that can provide us with 32+ voices of MIDI information in an instrument with only 4 voices. To get around this, I chose to create a monophonic MIDI handler and use it to control 8 polyphonic MIDI handlers with 4 voices each.

The monophonic handler must send data every time pitch and gate data are received (something that the built-in MIDI handlers will not do in mono mode). After trying several configurations, I settled upon a brute force method that is not exactly elegant, but it gets the job done:

Anatomy of a Reaktor Project, Part II - ADSR

This macro receives as inputs a value, N, which controls which pitch value will be sent whenever an event arrives at the other input, In. In is fed by a Selective Gate module with the Note set to the same value as N in properties. The outputs of the macro, N, P, and G, hold values for the next macros N input, and pitch and gate values, respectively.

I use the N value for one macro to compute the N value for the next macro for the sake of simplicity – it means I can create the macro once, duplicate it, and not have to define the index of each macro by hand.

A structure that gives an octave worth of MIDI notes looks like this:

Anatomy of a Reaktor Project, Part II - ADSR

I simply duplicated the macro 12 times and merged the pitch and gate outputs. We can’t do all 128 MIDI notes in a single macro even if we wanted to because Merge modules are limited to 40 inputs.
Then, the entire structure in the second picture can be encapsulated as well:

Anatomy of a Reaktor Project, Part II - ADSR

Unfortunately, I went to the effort of doing all of this work before noticing a bug. In this particular instance, the bug is not due to any coding error on my part, but rather a bug in Reaktor itself.

There is a problem with the Sel. Gate module, which is that it sends two events instead of one for every gate off event. This is the sort of bug that can be particularly insidious, since everything may seem to work fine, and in most instances it will cause no trouble at all (which is probably why they have not bothered to fix it yet).

This is an instance that really drives home my point in previous tutorials about always checking to make sure things do what you think they do before committing to them. When attempting to transform this signal into a polyphonic signal, I kept running into strange errors that I could not explain. It wasn’t until then that I hooked this early work up to EventWatcher to see what was happening.

Fortunately, the fix is simple:

Anatomy of a Reaktor Project, Part II - ADSR

However, since there are 128 of these macros, it is still pretty annoying.

POLYPHONIC MIDI HANDLER

I won’t have time to conver the entire polyphonic MIDI handler, but we can at least get started. The general idea is, on a new MIDI note, the ensemble will read through the MIDI setting of all visible ‘cells’ to see which, if any, are triggered by that note. The pitch/gate data is then sent to the polyphonic MIDI handler for the proper sound engine.

It’s our job to take that monophonic stream and convert it to polyphonic so we can have each sound engine playing multiple sounds at once. Since the structure will be duplicated 8 times, it’s also somewhat important to keep the CPU usage as low as possible.

When new data arrives to the polyphonic handler, we want to choose the voice that has been off for the longest period of time. Things get a little complicated here, but let’s start as small as possible.

Anatomy of a Reaktor Project, Part II - ADSR

This macro actually requires the output of our entire structure in order to function properly, but it is still a good starting point conceptually. The accumulator at the end of the chain counts the number of display clock ticks have occurred since the gate on that voice was last turned on.

When the gate is turned on (the On input), the display clock gets multiplied by 0, so the accumulator stops increasing. When the gate is turned off, the display clock begins accumulating again.

On either a gate on or gate off event (the G input) the accumulator is set back to 0. Essentially what this does is create a stream where the largest value among the voices is the note that has been off the longest.

Finally, the ‘LoadBang’ macro is a simple design of my own that outputs a value of 1 on a Global Reset Event, and at no other time. This is useful to make sure the accumulator starts counting when the ensemble is first loaded. This is the first step of our polyphonic MIDI handler. Unfortunately, it’s only a small piece of the finished product so we’ll have to cover the rest next time.

CONCLUSION

As you can no doubt see, re-configuring MIDI in Reaktor is quite complex and requires a lot of planning ahead. In the next tutorial, I’ll try to finish up talking about our MIDI handlers.

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: Anatomy of a Reaktor Project, Part II

RELATED COURSES

Building in Reaktor for Beginners

ADSR Courses

Add to cart

Sequencer Modules in Reaktor

ADSR Courses

Add to cart

FFT (Fast Fourier Transform) with Reaktor

ADSR Courses

Add to cart

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 7 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