Patterns, Gestures and Behaviors

Patterns, Gestures and BehaviorsThink if an electric guitar as if it were a Csound instrument, metaphorically speaking. Potential ways in which someone can interact with this guitar include: pick, fingers, ebow, power drill, slide, capo, etc. While the guitar is always a guitar, the output changes with the way a person interfaces with it. This concept is every bit as true for digital instruments as physical ones.

The original Splice and Stutter came with a single loop-based sample engine, aptly named SampleEngine. This engine is played with three interface instruments (Basic, Stutter and Random) each with its own unique musical behavior. Today’s example leaves SampleEngine exactly as is, and continues to demonstrate interface versatility with three new instruments: RandomPhrase, Swell and Flam.

The designs of these new instruments were influenced by the original Splice and Stutter score. After I had completed the demo, I noticed some gestures/phrases/effects that were translatable into instrument behaviors.

Download: splice_and_stutter_v2.csd. BT Sample Pack (13.2 MB)


If you look at the end of the score in the original splice_and_stutter.csd, you’ll see a 32 line long phrase using the Random instrument. With the exception of the start times, the p-fields for each line are identical.

i $Random 32.25 1 0.25 0.333 100
i $Random +     . .    .     .
i $Random +     . .    .     .

That is a pattern, and patterns are translatable into behaviors. RandomPhrase achieves this by generating multiple events of over an interval of time, specified in p-field 4, with events spaced evenly apart by the value in p-field 5.

i $RandomPhrase 32.25 1 32 1 0.25 0.2 100

In the new score, the original 32 lines of code are consolidated into a single call to RandomPhrase. This means less code to maintain, while giving the loop-based sampler a new behavior for me to play with.

Important note. RandomPhrase generates events for instrument Random, which generates events for instrument SampleEngine, which produces the sound. You can create new interfaces out of other interfaces.


Another pattern revealed itself with this gesture:

i $Stutter 7    1 0.25 0.5     100 12 [1 / 12]
i $Stutter 7.25 1 0.25 0.25    100 .  [1 / 12]
i $Stutter 7.5  1 0.25 0.125   100 .  [1 / 12]
i $Stutter 7.75 1 0.25 0.06125 100 .  [1 / 12]

Unlike the randomly generated notes from the previous example, p-field column 5 (amplitude) uses various values for each note event in this phrase. Upon closer inspection, these particular values themselves have a pattern. Each successive amplitude is halved. This p-field pattern, and others like it, can be translated into a behavioral instrument.

The Swell instrument lets users specify a multiplier to change the amplitude values for each successive note in p-field 6. What’s good for amplitude is good for other things, so I applied the same basic principle to the stutter window, expanding the usefulness of the instrument. A swell gesture looks like this in the new score:

i $Swell 7 1 1 0.5 0.5 0.25 12 100 [1 / 12] 1


In the original score code, I created a flam effect with two Basic events:

i $Basic 11    1 0.5 0.6 100 7
i $Basic 11.02 1 0.5 0.2 100 1

One could miss the intention of these two lines while reading the score. By creating an instrument that creates a flam, the score becomes easier to read. Also, a flam effect is musically interesting enough to justify having an instrument dedicated to it.

i $Flam 11 1 0.25 0.3 100 7 0.02 2 0

Comments are closed.