Electronic Music Algorithmic Composition

Using the power of algorithmic composition to create a complex yet cohesive piece of electronic music.

Algorithmic composition

I will use Common Music through the Grace GUI platform to program sequences for an electronic composition. There will be varying length tracks for a number of different instruments including: Drums, Bass, Lead Synth, Backing Synths, and Synth pads.

Export data to Abelton Live

I will record and export the midi data through Common Music so that it is usable in another audio editing program.

Compose piece

I will use the exported data from the composition to create a longer and more complex piece of electronic music, harnessing the power of external VSTs and by replacing studio recorded samples with some of the midi instruments.

Advantages of algorithmic composition for electronic music compositions:

  • There has been a trend in electronic music in making it sound more organic and "human". Some of the factors which lead to these qualities which can be acheived from algorithmic composition include:
    • Variation of notes (constant repetition of the same sequences sounds very "robotic")
    • Long sections of note variation. (Electronic compositions which contain variation will repeat these sequences in 16-32 bar phrases often to save time).
    • Variation in note velocity. For someone who doesn't usually use a MIDI keyboard to produce, variation in note velocity must be done manually which can be very tedious.

Sal program used to generate sequences

  • Used Sal "Jazz" example as starting out point for creating an electronic music sequence generator
  • Created generic function based on "Jazz-Piano" function which could take in notes and other parameters to create a sequence
  • Fed function parameters for Synth1 and Synth2 sequences
  • Created hatSequencer function based on "Jazz-Drums" function to make a percussion sequence
  • Created custom functions for bassline sequences
  • Created custom function for pad sequences which will play overlapped notes to randomly select harmonies
  • Sequencers only play seperately (don't need to play everything together because MIDI data will be exported afterwards anyway).
	  ;;; -*- syntax: Sal; font-size: 16; theme: "Emacs"; -*-


;; set synth instrument ;;
begin
  with piano = 11
  send("mp:instruments", piano)
end

variable scale1 = {0 4 7 11},
         alternatingnotes = {11 14}

process sequencer (scale, on, tmpo, ampl)
  with reps = odds(1, 12, 16),
       rhys = #? ((reps = 8), make-cycle( {1/2 1/2}), make-cycle( {3/4})) ,
       amps = #? ((reps = 8), make-weighting(list(make-cycle({.5 .4 .7}),
                                                  make-cycle({.6 .5 .8}))),
                              make-weighting(list(make-cycle({.5 .4 .7}),
                                                  make-cycle({.6 .5 .8})))),
       knms = make-weighting( list( list(make-heap(scale, make-weighting({1 2 3 4})),
                                        make-weighting({1 1})), "rest"))
  repeat reps
  for r = in-tempo( next(rhys), tmpo)
  for a = next(amps)
  for l = next(knms, #t)
  loop for k in l
    if (number?(k))
      send( "mp:midi", key: transpose(k, on), dur: r, amp: a * ampl * .5, chan: 0)
    end
  end
  wait r
end

;;Synth 1
begin
  with procs = {}
  loop repeat 4
    set procs &= sequencer( scale1, key("bf3"), 128, 1)
  end
  sprout( procs, {0 2 4 6})
end

;;Synth 2;;
begin
  with procs = {}
  loop repeat 4
    set procs &= sequencer( alternatingnotes, key("f4"), 128, 1)
  end
  sprout( procs, {0 2 4 6})
end



;; Hi Hat ;;
process hatSequencer (tmpo, ampl)
  with tom = 30, hat = 42,
       knums = make-weighting( list( hat, tom)),
       rhys = make-cycle( {2/3 1/3}) ,
       amps = make-weighting( {.4  {.95 :weight .1}})
  repeat 8
  for k = next(knums)
  for a = next(amps)
  for r = in-tempo( next(rhys), tmpo)
  if (number?( k))
    send("mp:midi", key: k, chan: 9, dur: r, amp: a * ampl)
  end
  wait r
end

;; Listen to Hi Hat ;;
begin
  with procs = {}
  loop repeat 9
    set procs &= hatSequencer(128, .99)
  end
  sprout( procs, {0 2 4 6 8 10 12 14})
end

;; Change Midi-Prog to Bass ;;
send("mp:prog", val: 32)

;; Bassline ;;
loop repeat 16
  for t from 0 by .250
  send("mp:midi", t, key: pick(45, 52, 57), amp: pick(.4,.8), dur: .2)
end

send("mp:prog", val: 31)

;; Alternate Bassline ;;
loop repeat 16
  for t from 0 by .250
  send("mp:midi", t, key: pick(45, 52, 57), amp: pick(.2,.3), dur: .2)
end

send("mp:prog", val: 40)

;; Pad High ;;
loop repeat 16
  for t from 0 by 1
  send("mp:midi", t, key: pick(69, 73, 76, 80, 83), amp: pick(.2,.3), dur: 2)
end
	  

Raw Midi Data (Sample of program output)

Lead Synth

Synth 2

Hats

Bassline

Pads

Transition to Abelton Live

  • Used more complex VSTs for the actual instrument sounds.
  • Re-quantized and edited main synth line to add melodic variation make a repeating sequence (the reoccuring tune in this composition).
  • Replaced hat sounds with other samples to make more "interesting" sounds.
  • Added a number of other notes with various instruments and sound effects to bring composition together as a cohesive piece of music.

Final Result: