Last time we looked at the Roux Sequencer we examined the Snap Array module, how it retains values and how it feeds them to the Event Table module when you change snapshots. In this post we finish up by focusing on how the Mouse Area module allows you to add and change the sequencer’s values.
First, the index: each step in the step sequencer is represented by a place in the index. The index is controlled by the X value coming from the Mouse Area module, which is a panel control. It becomes visible as a hazy rectangle when you click the wrench icon on the instrument toolbar. This lets you visually set its size (in the properties for the module) and its placement. Here, I’ve made it visible and dragged it off center so you can see what I mean.
The X value – that is to say, the right-to-left position of your mouse pointer on the Mouse area – determines which index or step gets its value adjusted. Since the Mouse Area has an X range of zero to one by default, we multiply its value by the number of steps in the sequence – the sequence length – to write the value into the correct step. This is why the clock macro has a Len(gth) output. The clock is already keeping track of the sequence length internally, in order to reset to the beginning at the end of the sequence and loop. Therefore, all we have to do is add an out port to send this value somewhere else in the instrument. There are also wireless ways to do this, with Send / Receive and IC Send / Receive terminal modules.
Why are we adding 0.5 to the index value? Because the Snap Value Array module rounds to the nearest integer. Every index has to be a whole number. So values from 0.5 to 1.5 go to the first index, values from 1.5 to 2.5 go to the second position, and so on. Try wiring directly between the multiplication module to the Idx input, bypassing the addition of 0.5 in the instrument, and see what happens.
That takes care of the index – now what about the value? The value comes from the Y or top-to-bottom position of your mouse on the mouse area. This goes into the input of a Value module, which spits out the value when it receives an event at the Trig input. The Trig input is triggered by any change in the X or Y position when you click on the mouse area – a Merge module merges the event streams from the X and Y outputs on the Mouse Area module.
This way, a change in the X or left-to-right position of the mouse sends the current Y or top-to-bottom position to the W input on the Snap Value Array. Again, the best way to see why it’s there is to bypass it temporarily and see what happens. Wire the Y output on the mouse area directly to the W input on the Snap Value Array and see what happens. You’ll find that clicking and sweeping the mouse from left to right doesn’t work the same way any more.
As for the SeqDriver macro – its internals should be comprehensible to people who’ve done the clock demo tutorial. There are a couple of subtle modifications in here – if you have any questions, ask away – I’m listening.
Some readers may protest that all this fiddliness – having to add 0.5 to the Index, the trickery with the merge and value modules – is cumbersome and complicated. But let me assure you, dear reader, that it is precisely this fiddliness that makes Reaktor useful and versatile. I’ve spoken to instrument developers about feature requests and many times the response is “Huh?! Why on earth would you want to do that?!” Ugh. What an attitude. Why on earth would you want to dictate how and why your users should use your software? But this is often the way with smart developers and smart software, where all the low level decisions are made for you.
Fortunately, Reaktor is “stupid” enough to be flexible – it has less policy and fewer preconceptions built into it than higher-level software. Of course, you have to give it precise instructions, like the old lesson about teaching a computer to make a peanut butter and jelly sandwich. But if you have specific sandwich ideas – if you want a triple decker pomegranate jam and almond butter sandwich with sardines and black olives, then this is one of the ways you can do it without having to argue with the waiter. There are a lot of recipes waiting to be discovered, and some of them begin with a humble Roux.
In the days ahead I’ll have a few ideas for you on how to hot rod your instruments (or someone else’s) with this tasty little devil.