The memory in hardware sequencers is the positions of the stage knobs; in computer sequencers it is the values in the computer memory arrays that represent the sequencer rows. In either case, the heart of a step sequencer is its memory array. In fact, all that is needed to make a basic step sequencer is a memory array and a means of stepping through the elements of the array.
In order to use a sequencer, there also needs to be a means of setting up the values in the memory array. This can be knobs or sliders that you simply set manually, as you would with a hardware sequencer. Or it can be an automated algorithmic means of filling the array, such as filling it with random values. Or it can be a combination of the two.
Finally, there needs to be a means of addressing the current memory cell and accessing its contents. This may be built into the sequencer module, or it can be an external counter or even an algorithmically derived index value.
To summerize, the basic parts of a step sequencer are:
1. Memory to hold the sequence values.
2. Some means of setting the values to be sequenced.
3. Some means of addressing the current memory cell and accessing its contents.
Memory Storage Types
ArtWonk uses two different memory schemes, each with its advantages and disavangeges. These two storage types are represented by "sequencer modules" (red icon) and "array modules" (orange icon).
The difference between the two is sequencer modules contain their own private copy of the sequencer memory array, while array modules use the "public" general ArtWonk memory array component that can be accessed by other modules. This makes sequencer modules simpler to use but less flexible than their array module counterparts. In this tutorial we will use examples of each.
In the two modules above, the (orange icon) array module has one more input than the (red icon) sequencer module, which is the Ary# (array number) input that designates which ArtWonk array number to use. This can be any number from 0 to 999, representing which of the 1000 available arrays to use for this module. It does not matter what array number to use, it does matter to use a unique number. Or, if you do use an array currently in use by another module, you know this is what you want.
Filling Sequencer Memory
While you can create sequencers that have sliders or knobs to set the sequence values (covered later in this tutorial), often it is not necessary because the property popup of ArtWonk sequencer modules includes a comprehensive set of auto fill and modify utilities.
To use the auto fill utilities, first create a sequencer module. Most of the sequencer modules have the auto fill in their properties pop up, so you can pick just about any of them for this. To keep things simple, pick the RoRanAdr module depicted above. This module has one input, the address, and one output, the value at the stage adddressed. Later, we will use the module in a patch, but for now we only need to create it to examine the auto fill. Access the properties pop up by clicking on the module's upper right, blue-letter button.
The graphic window along the top is a graph of the array values. A numeric readout of the values is available by running the mouse cursor over the window and reading from the Index and Value boxes on the bottom left, just to the left of the Sliders button.
Use the box in the center, labeled Fill, to initialize the array. The first column of boxes, labeled Max Addr, Value, Range, Offset and Step initialize the array memory. The default sequencer array is 128 steps, addressed 0 to 127 (Max Addr is 127), with a Range of 0-127. For now, leave these settings at the defaults.
The column of option buttons in the Fill with box gives a fast, simple means of initializing sequencer memory to commonly used sequences. Select 1/f Random to generate a random walk sequence like the one depected here. Select the Make Integer check box from the next column to create whole number steps in the sequence, then click on the Update the Fill button to initialize the sequencer memory. You should see a graph of the random walk values similar to the one shown above. Now click on the OK button to exit the properties window. You should see some value other than 0 in the output of your RoRanAdr module.
To quickly scan the other values that have been initialized in the RoRanAdr module, connect a Slider widget to it:
1. Create the Slider module from the Widget group.
2. Drag the output of the Slider module to the input of the RoRanAdr module.
Move the Slider widget from the upper left corner of the Panel window to a more convienet location, and move the slider up and down. Since the Slider widget defaults to 0-127, and the RoRanAdr sequence range was set to its default of 0-127, each step of the slider corresponds to a stage of the sequencer.
Value Mapping with Sequencers
You can use this one-to-one correspondence between slider steps and sequencer stages to use sequencers in another way, as a mapping device. For example, to map the slider value of 0-127 to its reverse of 127-0, do the following:
1. Click on the Properties button of the RoRanAdr module to bring up the fill utilities
2. Select Count from the Fill with option button list. By holding mouse cursor over the option button without clicking on it, you will get a tool tip help box that says, "Fill with Count starting with Value, using Range and Step." Note that the Value in the Max Addr, etc., column is set to default 0, Range is set to 127 and Step is set to 1. Thus, the Count fill option will fill the 128 sequence steps with a count that increments by 1 from 0 to 127. Be sure the Count option is selected, then click on the Update the Fill button. The graphics display should show a diagonal line from the lower left to the upper right.
3. From the rightmost column of buttons, click on Reverse to reverse the count. You should see the results in the graphic display, with the 0th location now holding the value of 127 and counting down to the 127th location now holding the value of 0.
4. Click the OK button to exit the pop up, and move the slider widget. Now the output of the sequencer is reversed from the value of the slider. 0 is mapped to 127, 1 is mapped to 126, etc.
To digress a moment, this linear reverse mapping of 0-127 to127-0, while often useful, can be done more efficiently by simply subtracting the slider output from 127:
1. Create a Sub module from the Math module group.
2. Type 127 into the first input of the Sub.
3. Plug the output of the Slider into the 2nd, "-in" input of the Sub.
...but when you need non linear mapping, such as a pitch map, sequencer modules are often the most efficient and simplest way to go. Here is how you map a pitch table to a random number generator to get random pitches that stay within a predefined scale of your own choosing:
1. Select main menu File/New to start with a fresh patch.
2. Create a RoRanAdr module from the Sequencer module group.
3. Click on the Properties button to get the fill utility pop up.
4. Since this will be a pitch map, we will limit the range to 4 octaves. So change the default Range from 127 to 48. This will be in the first column of the Fill box in the lower center of the pop up.
5. Select Count as the Fill with type, and click on Update the Fill to do it. You shoud see an up/down line in the graph window, as the count goes up from 0 to the max 48 then down to 0, then back up again.
6. From the column of buttons 2nd from the right, click on Major to create a C-Major scale. You should see the lines in the graph take on a slight ripple.
What this button did was force any values not on the C-Major scale to the nearest value that is. This works fine, but it causes duplicates. This may be what you want as it gives a higher probability to the more harmonic values, since it will be the octave, major 3rd and 5th that is duplicated. But for this example, we will go for a linear 1:1 mapping, without duplicates:
7. From the column of buttons on the far right, click on No Dups. The graph will show a ramp quickly going up to the top of the graph, then drop to 0 for the remainder. All the duplicate values were replaced by 0, then the extra 0 values were squeezed out to the end.
At this point you have a scale mapping "curve." that will map 4 octaves to Major scale pitch values. This will work fine for pitch mapping to a Major scale, but it is overkill because there is alreay a module that will do that, the Fit Scale module in the Process group.
However suppose you want to create a modification of the Major scale. For example say you want to toss out every 7th. You can easily do this by using the built in sliders:
8. Click on the Sliders button on the bottom of the pop up, near the middle. You will see a new pop up window with a grid background and value-label sliders.
9. Move the sliders for the values you want to remove to 0, so you can use No Dups again to toss them out. This would be the 7ths (sliders currently at 11, 23, 35, 47). To get to the sliders further up the scale, use the horizontal slider bar at the bottom of the pop up window. After you have them set, click on the OK button. Notice the value graph now shows notches where you set the unwanted values to 0.
10. Click on the No Dupes button once more to squeeze out the 0 values. Click on OK to exit the Properties pop up.
Now that our sequencer memory map is set up, we need to create a little patch to test it. For this we can use a Clock and RandInt module to step the sequencer, and a MIDIVoice module to generate the MIDI.
11. Create a Clock module from the Clock group and a RandInt module from the Pattern group. Plug the Clock Out into the RandInt Strb. Plug the RandInt Out into the RoRanAdr Addr. The RandInt should be producing random values from 0 - 24, and the RoRanAdr should be mapping them to produce the values you set.
(There is one problem with this patch. The module calculation order is slightly backwards. That is, during one calculation cycle, the RoRanAdr is mapping the previously calculated value from the RandInt. While it makes no difference here, this out of order calculation can cause subtle and hard to find burbles in a more complex patch. So it is always a good idea to be aware of calculation order and fix it as you go. To do this, go to the Module Tree, and highlight the RoRanAdr by left clicking on its name in the tree, then move its calculation order to the end by right clicking on the current last module in the tree, the RandInt. Now the module order should be B: Clock, C: RandInt, D: RoRanAdr. All is well.)
12. Finally, to audition the patch, create a MIDIVoice module from the MIDI group. Type 1 into both the Play and the Lgato inputs, and connect the RoRanAdr Out to the MIDIVoice Note input. You should hear the random mapping playing.
Download this patch
Other Uses for Sequencer Memory
We have just seen how, in addition to their obvious use as a value stepper, sequencers can also be used for value mapping. In fact, because they are general memory access components, sequencer modules can have many different uses. Drum machines and rhythm generators, for example. Or very long and complex envelope generators for parameters such as volume (you can set values by drawing directly on the graphic window of the sequencer Parameter pop up), or delay lines for echo effects. Some of these non standard uses for sequencers will be covered later in this tutorial.
[Introduction Sequencer Stepping Array Sequencers]
[Return to Tutorial Page]