Brakhage Center Experimental Stream

January 20, 2013 in News

Since this past summer I have been helping to setup an experimental audio stream for works by artists from the University of Colorado at Boulder. It is currently up (although in beta for pardon any bugs). They also have a nice profile of me and the other artists currently featured. Take a listen sometime!

http://brakhagecenter.com/?page_id=83

Post to Twitter Post to Facebook Post to Google Buzz Send Gmail

Nothing Happens

January 18, 2013 in Electronic, Music

Nothing Happens was made to accompany a 2 channel video installation by Sieglinde Van Damme titled “Things change and then nothing happens.”

Post to Twitter Post to Facebook Post to Google Buzz Send Gmail

Double Sided

January 5, 2013 in Electronic, Music

Double Sided is a drone work for Moog guitar and SuperCollider. The guitar sustains two tones that rock back and forth between two microtonal versions of a major second. This is then entered into a feedback loop in SuperCollider in which short clicks gradually increase in density.

Post to Twitter Post to Facebook Post to Google Buzz Send Gmail

Notes Between “Chromatic” Just Intonation

December 31, 2012 in Music, Tutorials

Yesterday I talked about how I’ve been taking MIDI note numbers and remapping them to different tunings here. If you only need to deal with discreet chromatic pitches this is enough; but what about if you are using pitch bends? Say you are bending a pitch up a half-step. If you simply add the bend amount to the initial note, you’ll get a sudden jump by the difference in tuning when you hit the next step. Let me illustrate this:

Starting Pitch: middle C + 16 cents (60.16)
Ending Pitch: C# – 14 cents (60.86)

If we have our pitch bend data so that it gives +1.0 is a half-step and add it to the MIDI note look what happens:

Starting Pitch + Bend up 0.25: 60.41
Starting Pitch + Bend up 0.5: 60.66
Starting Pitch + Bend up 0.75: 60.91 <- higher than our desired ending pitch
Starting Pitch + Bend up 1.0: 61.16 <- even higher

This is because here pitch bend is being treated as an alteration to the note rather than to the index of our tuning. The trick is that rather than linear bending across a linear range, we now want linear bending across a non-linear range (since each step is not a different distance from its neighbors). We need to take a few additional steps to make this work correctly. Here we go (in SuperCollider again):

First, to make our pitch bends map to floats where a delta of 1.0 = a half-step, you need something like this:

bend.linlin(8192,8874,0.0,1.0,nil).round(0.01) // .linlin maps a linear range to an other linear range

The first two arguments depend on what format your pitch bend data is in. In my case, it’s a 14-bit integer where 8192 is no bend and 8874 is up a half-step. The 0.0,1.0 is the new range these numbers will be. nil tells it to not clamp values (so this works with higher and lower values than those given). Finally .round(0.01) rounds the output to the nearest cent (you could skip that if you’d like).

Now for some magic! Arrays in SuperCollider have a method called blendAt() which takes a float as an index and spits out a linearly interpolated value between the neighbors around it. Here’s an example:

a = [ 2, 3];
a.blendAt(0.5); // returns 2.5 since the index 0.5 is half way between index 0 (2) and index 1 (3)

This behavior can be easily implemented in other languages as well of course but it’s nice that it’s just there in SuperCollider.

(
var tuning, note, bend, val, tunedNote;

tuning = [ 0.16, -0.14, -0.02, 0.17, 0.02, 0.14, 0.33, -0.31, -0.12, 0, 0.05, 0.04 ]; // our tuning
note = 60; // starting pitch
bend = 1.0; // bend amount

val = note + bend; // add the note and the bend

tunedNote = val + tuning.blendAt( val % 12, ‘wrapAt’ ).round(0.01); // magic!
)

Here’s what’s happening. We start by adding the pitch bend to the note like before (val). Next we convert that to an index by using mod 12. ‘wrapAt’ lets the last value in the array blend with the first in the array (so you can bend between 11 and 0). This spits out the correctly interpolated +/- cents for our new note. We then add this to val to get the real offset. Here’s some example output:

note = 60, bend = 0.0: 60.16 <- initial note
note = 60, bend = 0.25: 60.33
note = 60, bend = 0.5: 60.51
note = 60, bend = 0.75: 60.68
note = 60, bend = 1.0: 60.86 <- bend up a half-step
note = 61, bend = 0.0: 60.86 <- up a half-step with no bend

Now all bent values are scaled correctly and a bend of +1.0 gives the same result as just playing the next higher note with no bending.

Post to Twitter Post to Facebook Post to Google Buzz Send Gmail

“Chromatic” Just Intonation

December 30, 2012 in Music, Tutorials

I’m not a fan of 12-tone based scales in general. However sometimes in order to use some standard controllers you are stuck with it. Recently I’ve been working on ways to perform music in just intonation using MIDI input from a guitar so I’ve been forced to think in 12 step groupings, even if I intend to not use all of them (or some more than once). Here’s one solution that I’ve been playing with. The code is all SuperCollider but is pretty easy to implement in other languages.

First we need to make a “chromatic” JI scale. Honestly this could be anything depending on your needs. In my case I’m trying to keep each step within +/- 50 cents of the tempered pitch but this doesn’t need to be the case. Here’s one option:

[1,17/16,9/8,6/5,5/4,4/3,10/7,3/2,8/5,12/7,7/4,15/8]

The next step is to give it a fundamental/tonic. As usual, I’ll use A 440:

440 * [1,17/16,9/8,6/5,5/4,4/3,10/7,3/2,8/5,12/7,7/4,15/8];

Now we have all our frequencies for our A “chromatic” scale. Time to convert it to the linear MIDI number version (using floats to keep the offset). Lets also mod 12 it so that we get everything in the 0-11 pitch-class range:

((440 * [1,17/16,9/8,6/5,5/4,4/3,10/7,3/2,8/5,12/7,7/4,15/8]).cpsmidi % 12); // .cpsmidi converts frequencies to midi numbers

Almost done. The goal here is to take any MIDI number as an input, mod 12 it to get it’s pitch class as an index into our scale, and get the cent deviation in the format of +/- 0.50 so we can add that back to the original input. That may sound complicated but it will make more sense after seeing this last part. Now we need to reorder this list so that pitches are ascending (0-11), subtract the integer series 0-11 from it, and in this case round to the nearest cent:

((((440 * [1,17/16,9/8,6/5,5/4,4/3,10/7,3/2,8/5,12/7,7/4,15/8]).cpsmidi % 12).sort) - (0..11)).round(0.01); // .sort, uh, sorts it, (0..11) creates an array of 0-11 to subtract from our scale, and .round(0.01) rounds to the hundredths place

Afterwards we are left with:

[ 0.16, -0.14, -0.02, 0.17, 0.02, 0.14, 0.33, -0.31, -0.12, 0, 0.05, 0.04 ]

which are the cent deviations for all chromatic pitches from C-B. Notice how the only 0 is A (index/pitch class 9), since it’s our fundamental. Now by using MIDInumber % 12 as an index into this array, you get the cents to add or subtract to get your tuning. This is essentially what MIDI tuning tables are. Later I’ll explain how to use this along with pitch bends.

Post to Twitter Post to Facebook Post to Google Buzz Send Gmail