SoftStep Tutorial #9: Bio Sequencer

Compatibility note: This tutorial is for SoftStep Pro. If you have SoftStep Basic or SoftStep LE, then you can not create all the modules, but you can load the pre built tutorial file, and follow along with that.

For this tutorial we will create a very simple, one line playback of a BioSequence. We will not create a musical composition here because that would add another level of complexity. Please use your imagination when you hear the one line piano thumper, and think about how you could use the patterns that you will hear, if not the implementation, in your own creations.

BioSequences are binary files that contain DNA and Protein genetic sequences, plus marker flags that indicate some of the key points in the genetic data such as turn, alpha helix and beta sheet markers. You can create your own BioSequence from the raw genetic data (available as free downloads from several Internet locations) with the add on BioEditor program, available separately from Algorithmic Arts. However SoftStep already has several BioSequences built in, so the BioEditor program is only necessary if you wish to create your own BioSequences.

Start with a clear workspace, either by loading a fresh run of SoftStep or by selecting New from the menu or toolbar. Create a MIDI Voice module, a Clock module, and a Bio Sequencer module.

Connect the clock inputs of the BioSequencer and MIDI Voice to the Clock module output. The Bio Sequencer should start sequencing as soon as you connect its clock input. Try listening to the output of the Bio Sequencers directly for a moment. Plug the Note inputs of the Voice module into the Bio Sequencer output. Set the Voice Transp input to around 48. It should be wailing away on the piano in what is essentially a chromatic scale of 20 semitones. There isn't much tonality, but you should get a sense of pattern anyway.

Connect the Toolbar Run/Stop button by connecting the Hold input of the Clock, and the Reset input of the Bio Sequencer to the ~Stop Control Flag. Now clicking on the Run/Stop button in the toolbar will start/stop sound and also reset the Bio Sequencer.

Create a Number module, and connect the Bio Sequencer Seq# input to the Number output, and increment the Number until you get a pattern you want to try out. Any running sequence will do.

Create a Button, and connect it to the DNA inputs of the Bio Sequencer. Click it and the spread of some 20 pitches drops to 4 pitches. Release the button to hear the protein decoding again.

The Bio Sequencer module's protein mode output is in the range of 0-20, with 0-19 representing the 20 amino acids that generate proteins, and the 20 as the error value represented by (?) in the Bio Editor. We need to map these 21 values to some pitch scale representation. A Page24 sequencer module will work very well for this. Create one now.

Although you probably are going to want to build your own pitch tables, for now you can use the default tables that came with SoftStep. Click on the T button of the Page24 module. The Page Table Editor will pop up. Select the Load button, and if you are not already there, go to the SoftStep examples directory. Select and load the file named ProteinPitchTables.tbl. Now the first 20 slots in the table should have labels like "major scale set 1." Exit the Pitch Table Editor.

Connect the Stage (topmost) input of the Page24 module to the output of the Bio Sequencer; and connect the Note input of the Voice modules to the output of the Page24. You should now hear the Bio Sequence playing in a C major scale (if you had set the Transpose to 48), although without a clear sense of home. This is because the first scale is optimized for playing the proteins sorted. Create another button and connect it to the Sort input of the Bio Sequencer, and click on it to hear the difference.

Sort remaps the amino acid numbers so that the most frequently occurring value is given the first table position, the second most frequently occurring value the second position, and so on - so it works musically with a pitch table that is weighted for more harmonic intervals to be at the start of the table, which is how the mapping of the current pitch table was intended. Using the Sort mode gives each protein a different amino acid mapping, which is not very useful for scientific work but often is useful for musical composition.

Next, we will use the Pick24 module to select among the 20 pitch tables, and the TNames module to display the names. Create both modules now, then load the TNames labels with the pitch table names by clicking on the blue button labeled "T," to the right of its connection input, which brings up the Page Table Editor again; click on Load and load the same pitch table file as you did with the Page24 module.

Click on the Pick module's Fill button, and when the Fill utility pops up, click on the Count button, and then Exit. This will set up the Pick module with its selector buttons set to 0-23, of which we only need 0-19. Connect the Page input of the Page24 and TNames module to the Pick24 output. Now try selecting the different buttons to get different pitch mappings.

Finally, create a 3rd button, and connect it to the Anti (antisense) input of Bio Sequencer, and try that.

How it looks:

SoftStep is Copyright © 1999-2004 by John Dunn and Algorithmic Arts. All Rights Reserved.