# Lists as Micro-Sequencers

On Friday, I listed nine ways in which python methodologies could be used with the @ scheduler. How would they work in a real-world musical context? Today, I’m showcasing the List as a super convenient micro-sequencer.

When the @ scheduler is given a list of numbers, every value in the list is used to schedule an event; This saves keystrokes and increases legibility. Let’s see this applied to a simple four-beat rock groove with 8th note hats:

```@[0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5] hat()
@[1, 3]                           snare()
@[0, 2]                           kick()
```

That plays hat() eight times, and snare() and kick() twice each. This beats having to type out 12 events.

Alternatively, an identifier can point to a predefined list, thus, a sequence can be reused multiple times. The following stores a complex hi-hat pattern in identifier p, and then plays it four times:

```p = [0, 0.5, 1, 1.5, 2, 2.25, 2.5, 2.75, 3, 3.75]

@0  @p hat()
@4  @p hat()
@8  @p hat()
@12 @p hat()
```

Here’s the shorthand equivalent:

```p = [0, 0.5, 1, 1.5, 2, 2.25, 2.5, 2.75, 3, 3.75]

@[0, 4, 8, 12] @p hat()
```

That’s 40 events in two lines of code, with improved legibility. If this was presented as 40 individual events, it would not be obvious that the same hat pattern is repeated four times.

Banks of Patterns

A list can be utilized as a bank of patterns, a list of lists. In the following example, an empty bank is created, filled with three patterns, and then used in a four measure sequence.

```b = []
b.append([0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5])               # x.x. x.x. x.x. x.x.
b.append([0, 0.5, 1, 1.5, 2, 2.25, 2.5, 2.75, 3, 3.75])  # x.x. x.x. xxxx x..x
b.append([0, 0.5, 1, 1.5, 2, 2.5, 2.75, 3, 3.5, 3.75])   # x.x. x.x. x.xx x.xx

@0  @b[0] hat()
@4  @b[1] hat()
@8  @b[0] hat()
@12 @b[2] hat()
```

Bonus Round — Eight Ways to Notate 8th Note Hats

Some good, some bad, some ugly. All produce the same result.

```1. @map(lambda x: x / 2.0, range(0, 8)) hat()
2. @[0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5] hat()
3. @[i / 2.0 for i in range(0, 8)] hat()
4. @[i / 2.0 for i in range(8)] hat()
5. @[0, 2] @[0, 1] @[0, 0.5] hat()
6. @[0, 1, 2, 3] @[0, 0.5] hat()
7. @range(0, 4) @[0, 0.5] hat()
8. @range(4) @[0, 0.5] hat()
```

Examples 2, 6 and 8 are my personal favorites.

# The Backlog

I’m reposting all the Csound Blog posts from the original site.  The write-ups are stored within the Csound files themselves.  I’m really looking forward to posting new content, and will hopefully have something up by the end of the week.  Without further ado:

# Step and Funny Talk for the OLPC

I spent my spare time last week developing two audio-based activity prototypes for the OLPC: Step and Funny Talk. The whole process was surprisingly quick and easy. I attribute this to Victor Lazzarini’s Csound Sugar GUI toolkit. I do a lot of Csound programming, but I’ve never actually done any GUI work for it. Using the toolkit was as simple as defining widgets and mapping them in Csound.

### Step

Flickr photo be me

Step is the first activitiy I’m developing for the XO. It’s a straight forward eight note step sequencer with synth notes, snare and kick parts. So far, I’ve probably put in about 8 hours on this. Once a user has a pattern they like, they can render the loop to an audio file, which can then be loaded in other activities. It still needs a lot of work, especially the synth engine. Though you can still take a listen if you would like: StepDemo1.mp3.

### Funny Talk

Flickr photo be me

This is my favorite of the two, as my inspiration for this activity comes from my childhood memories of the Yamaha VSS-30 keyboard. My friends and I used to spend hours playing with that keyboard. Often in a very juvenile manner. I figured if we had such a great time playing with our voices, then perhaps the target audience of the OLPC will as well. Here is “the sound of my voice” being processed with Funny Talk: FunnyTalkDemo1.mp3.

# The Beat-Bearing Sequencer

Here‘s an interesting alternate controller I’ve not yet seen: a step sequencer where one composes a pattern by placing ball bearings onto a grid.

Though I don’t exactly have one in front of me, I would imagine the sensation of manipulating the device would be similar to patching a modular synth. There must be something entirely satisfying interfacing with music in this manner, akin to eating with a well-balanced set of weighted flatware.

A tangible rhythm sequencer. Ball bearings are used to trigger drum sounds. Visual feedback is displayed from underneath to indicate the current time and the state of each ball bearing.

The brainchild behind the Beat-Bearing Sequencer is Peter Bennett.

Video posted to YouTube by peterdbennett.
Thanks to PAgent of PAgent’s Progress for sending me this link to technabob.com.

# The Infamous mcseq

I want to learn morse code. I don’t know why, I just do. So a few days ago, I made it my new year’s resolution. The first action I took to help me accomplish this goal of mine was writing the Csound instrument Morse Code Sequencer Event Generator, or mcseq for short.

### Topics

• Morse Code
• Event Generators
• Sequencers
• String Parsing

# Drum Sequencer Event Generator

Getting lost within a list of instrument events is sometimes less desirable than being able to place events on a grid or lattice. This is especially true when working with rhythms. I’m a firm believer that the interface influences the compositional process. This is why I’ve begun development on dseq, an instrument that allows me to input drum patterns in a manner that is much more user-friendly.

Topics:

• Strings
• Drums
• Sequencer
• Event Generators