Computer Music: Musc 216
In this tutorial you will learn how to program a "step sequencer."A SEQUENCER is midi jargon for a kind of "recorder" for midi commands. Since each MIDI COMMAND consists of 2 or 3 numbers, it is very easy to record these sequence of numbers and then play them back, hence a SEQUENCER. A STEP SEQUENCER is a program which allows the user to play back the individual MIDI commands in a controlled way using a TRIGGER device such as a key on the computer keyboard. Every time you press the key the next SEQUENCE of numbers which is a MIDI COMMAND is sent out (played). Consequently, the user can control the TEMPO of the sequence, playing fast or slow as desired.
STEP 1: MIDI COMMANDS
There are no new MIDI COMMANDS associated with this tutorial. Please refer to earlier tutorials for NOTE ON and NOTE OFF commands.
STEP 2: Decide on a TUNE (song) you wish to play with your StepSequencer and then write down the KEY NUMBERS for the notes of that tune.
There are several tools available to help you do this including:
As you are figuring out the notes to your tune, write them down in order. The example we will use is "Twinkle, twinkle little star" :
STEP 3: Open your current Project2Controller and ADD a new scene called, "StepSequence"
See previous tutorials if you do not remember how to add a new scene.
STEP 3: Add the Actors to the new StepSequence Scene
Here is the logic for the StepSequence Scene:
Add these actors to your new StepSequence scene:
Another group of actors should be added to this same scene which will turn OFF the current sounding note and then RESET the Integer Counter Actor back to #1. Specifically, add another Keyboard Watcher Actor and another Integer Counter actor and connect them to the above group like this:
The second Keyboard Watcher Actor should test for the SpaceBar, just like the AllNotesOff routine in an earlier tutorial.
STEP 4: Try it out!
If you have all the actors in your scene and have set the various parameter fields as shown above, your StepSequencer should work. Go ahead and press the '=' key and see if you can hear your tune play.
STEP 5: Troubleshooting (debugging)
STEP 6: Add a Comment to your Controls Window
Add a comment which will direct the user which key to press to activate the Step Sequencer. For example:
STEP 7: Save your work
When you complete this tutorial: