Canvas

February 15, 2013 in Electronic, Music, Video, Visual

An hour long audio/visual work created and performed by Cole Ingraham. The original video is 4 screen 1080p and this version maintains the same aspect ratio which is why this version is so narrow. Video created using Processing. Music is a combination of SuperCollider, Moog Guitar, and Roland VG-99. Premiered on 2/15/2013 at the University of Colorado ATLAS black box theater. This version features the Orava String Quartet performing Aether at 7’43″ whereas the live performance is played with SuperCollider and iPad using my custom OSC interface Un:Limit.

Canvas from Cole Ingraham on Vimeo.

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

“Chromatic” Just Intonation – fast version

January 26, 2013 in Music, Tutorials

About a month ago I talked here about the math required to take a set of ratios and generate a set of +/- 50 cent alterations for tuning a chromatic scale to any 12-tone just tuning. There were quite a number of steps and a lot of math as I wanted to show how to do it in a way that could be applied to any programming language (or done by hand if you are feeling masochistic). Now I’m going to show a shortcut if you are specifically using SuperCollider.

SuperCollider has a method called ratiomidi that takes a ratio and converts it to the float MIDI number version. This replaces the need to multiply the ratios by a fundamental and mod 12 it as, because all our ratios are within an octave, everything will be from 0.0 through 11.99. In other words: it gives us tuned versions of pitch classes. This one simple method removes 2 of the previous steps.

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

gives us

[ 0, 1.0495540950041, 2.0391000173077, 3.1564128700055, 3.8631371386483, 4.9804499913461, 6.1748780739571, 7.0195500086539, 8.1368628613517, 9.3312909439626, 9.6882590646912, 10.882687147302 ]

Now that we have that, like before we need to get the cents in the +/- 50 cents, here in decimals. Once again we just need to subtract a series of integers from 0 to 11 like so:

( [1,17/16,9/8,6/5,5/4,4/3,10/7,3/2,8/5,12/7,7/4,15/8].ratiomidi – (0..11) ).round(0.01);

which gives us

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

Great, that was easy! Now, you may notice by comparing it to the result we got from the other post that although the numbers are all the same, they aren’t in the same order. That is because before we based the tuning on A being the fundamental/tonic. Here C (array slot or pitch class 0) is the tonic. This is fine if you want C to be the tonic but what if you don’t? Simple! Arrays in SuperCollider also provide a method called rotate(numPlaces) which, as you might guess, shifts items left or right by a number of slots. So for our final version of this:

( [1,17/16,9/8,6/5,5/4,4/3,10/7,3/2,8/5,12/7,7/4,15/8].ratiomidi – (0..11) ).round(0.01).rotate(9);

gives us

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

which is exactly what we got in the old example. Why are we using 9? If you prefer to think about this as a transposition operation then T9 = A. You could also put a -3 in there and you would get the exact same result. Totally depends on how you want to think about it.

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