Composition Blog 3

This composition is a continuation of the small example from the scales, modes and keys tutorial. It documents incremental updates, additions and improvements while building a larger piece. The tutorial example started like this.

function Main() {
  @span = 16;
  @key += 2;
  @scale = [0, 3, 4, 7, 8, 11]; //hexatonic D F F♯ A A♯ C♯
  @octave -= 1;

  @Split(FILL(1).Then(A), FILL(1).Then(B));
  @Split(
      FILL(2).Then(i => @octave -= 1),
      FILL(@span < 1 ? 1 : 2).Then(i => @chord += @harmony % 2 == 0 ? [1,3] : [2,4])
  );
}

var motiveA = [2,1,2,1,0];
var rhythmA = [2,2,1,1,2.0];
function A() {
  @Split(2).Then(part =>
    @Split(rhythmA).Then(i => @harmony = motiveA[i] + (part.Max - part) * 3 + 1)
  );
}

var motiveB = [5,3,0];
var rhythmB = [2,2,4.0];
function B() {
  @Split(2).Then(part => {
    if (part == 0)
        @Split(8).Then(i => @harmony = i);
    else
        @Split(rhythmB).Then(i => @harmony = motiveB[i]);
  });
}
16.60 s
Search for something