{
   "author" : "Jonathan Coon",
   "name" : "Avant Garde - Assignment 4: Algorithmic Harp (Pluck) [musc-9-pluck]",
   "description" : "This track was created entirely out of one \"pluck\" synth in SuperCollider that I manipulated to obtain many interesting sounds. The piece was also arranged and recorded in SuperCollider.\r\n\r\nListen to the piece here: https://soundcloud.com/jonathan-coon/avant-garde-assignment-4",
   "ancestor_list" : [],
   "labels" : [
      "pattern",
      "electronic",
      "patterns",
      "supercollider",
      "code",
      "synth",
      "synthesis",
      "harp",
      "algorithmic",
      "music",
      "computer",
      "musc9pluck",
      "pluck",
      "synthesizer"
   ],
   "is_private" : null,
   "id" : "1-4WN",
   "code" : "// ---------------------------------- //\r\n// Jonathan Coon\r\n// Algorithmic Harp assignment (A4)\r\n// MUSC 9 - Intro to Electronic Music\r\n// ---------------------------------- //\r\n\r\n// -----------------\r\n// SYNTH DEFINITION\r\n// -----------------\r\n\r\n(\r\nSynthDef(\"plucking\", {arg amp = 0.1, freq = 440, decay = 5, coef = 0.1;\r\n\tvar env, snd;\r\n\tenv = EnvGen.kr(Env.linen(0, decay, 0), doneAction: 2);\r\n\tsnd = Pluck.ar(\r\n\t\tin: WhiteNoise.ar(amp),\r\n\t\ttrig: Impulse.kr(0),\r\n\t\tmaxdelaytime: 0.1,\r\n\t\tdelaytime: freq.reciprocal,\r\n\t\tdecaytime: decay,\r\n\t\tcoef: coef);\r\n\tOut.ar(0, [snd, snd]);\r\n}).add;\r\n)\r\n\r\n// -----------\r\n// ARRANGEMENT\r\n// -----------\r\n\r\n(\r\nPseq(\r\n\t[\r\n\t\t~twinkle,\r\n\t\tPpar([~drone1, ~drone2], 1),\r\n\t\tPpar([~drone1, ~drone2, ~accent], 1),\r\n\t\tPpar([~drone1, ~drone2, ~accent, ~high1, ~high2], 1),\r\n\t\t~romanianMinor,\r\n\t\t~melody,\r\n\t\tPn(a, 16),\r\n\t\tPpar([Pn(a, 4), b], 2),\r\n\t\tPpar([Pn(a, 4), b, c], 1),\r\n\t\tPpar([Pn(a, 4), d], 2),\r\n\t\td,\r\n\t\tPpar([d, Pn(e, 4)], 1),\r\n\t\tPn(f, 4),\r\n\t\tPpar([f, g], 4),\r\n\t\tPpar([Pn(a, 4), b], 2),\r\n\t\td,\r\n\t\tPpar([d, Pn(e, 4)], 1),\r\n\t\tPn(f, 4),\r\n\t\tPpar([f, g], 4),\r\n\t\tPpar([Pn(a, 4), b], 4),\r\n\t\t~mixolydian,\r\n\t\t~spanish,\r\n\t\t~egyptian2,\r\n\t\t~egyptian1,\r\n\t\t~egyptian3,\r\n\t\t~egyptian1,\r\n\t\t~freq1,\r\n\t\tPpar([~freq1, ~siren2], 1),\r\n\t\t~freq3,\r\n\t\tPpar([~freq2, ~siren3], 1),\r\n\t\tPpar([~drone1, ~drone2, ~up, ~down], 1),\r\n\t\t~twinkle\r\n\t]\r\n).play;\r\n)\r\n\r\n// ---------------\r\n// PLUCK PATTERNS\r\n// ---------------\r\n\r\n// Twinkle\r\n(\r\n~twinkle = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.major,\r\n\t\\degree, Pwhite(0,12),\r\n\t\\ctranspose, 36,\r\n\t\\amp, Pwhite(0.5, 0.9),\r\n\t\\decay, Pwhite(7, 12),\r\n\t\\coef, Pwhite(0.01, 0.1),\r\n\t\\dur, Prand([3/16, 3/8, 1/8, 1/16], 50);\r\n);\r\n)\r\n\r\n// Drones\r\n(\r\n~drone1 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\degree, 0,\r\n\t\\ctranspose, -36,\r\n\t\\amp, Pseq([Pseries(0.1,0.1,9), Pseries(0.9,-0.1,9)], 4),\r\n\t\\decay, Pseq([7, 6, 6, 5, 4, 3], inf),\r\n\t\\coef, Pseq([Pseries(0.1,0.1,9), Pseries(0.9,-0.1,9)], 4),\r\n\t\\dur, 1/8\r\n);\r\n\r\n~drone2 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\degree, 0,\r\n\t\\ctranspose, -24,\r\n\t\\amp, Pseq([Pseries(0.1,0.1,9), Pseries(0.9,-0.1,9)], 4),\r\n\t\\decay, Pseq([7, 6, 6, 5, 4, 3], inf),\r\n\t\\coef, Pseq([Pseries(0.1,0.1,9), Pseries(0.9,-0.1,9)], 4),\r\n\t\\dur, 1/8\r\n);\r\n)\r\n\r\n// Accent\r\n(\r\n~accent = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\degree, 0,\r\n\t\\ctranspose, -12,\r\n\t\\amp, 0.5,\r\n\t\\decay, 1,\r\n\t\\coef, 0.1,\r\n\t\\dur, Pseq([3/8, 3/8, 1.25], 5)\r\n);\r\n)\r\n\r\n// Highs\r\n(\r\n~high1 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\degree, 0,\r\n\t\\ctranspose, 36,\r\n\t\\amp, Pseq([Pseries(0.7,0.1,3), Pseries(0.9,-0.1,3)], 12),\r\n\t\\decay, 12,\r\n\t\\coef, Pseq([Pseries(0.1,0.1,3), Pseries(0.9,-0.1,3)], 12),\r\n\t\\dur, 1/8\r\n);\r\n\r\n~high2 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\degree, 0,\r\n\t\\ctranspose, 24,\r\n\t\\amp, Pseq([Pseries(0.7,0.1,3), Pseries(0.9,-0.1,3)], 12),\r\n\t\\decay, 12,\r\n\t\\coef, Pseq([Pseries(0.1,0.1,3), Pseries(0.9,-0.1,3)], 12),\r\n\t\\dur, 1/8\r\n);\r\n)\r\n\r\n// Romanian Minor Scale\r\n(\r\n~romanianMinor = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.romanianMinor, // choose any scale\r\n\t\\degree, Pwhite(0, 15), // think of 'white notes' of piano keyboard (0 = middle C)\r\n\t\\amp, Pwhite(0.3, 0.7),\r\n\t\\decay, Pwhite(7, 12),\r\n\t\\coef, Pwhite(0.01, 0.1),\r\n\t\\dur, Prand([0.1, 0.2, 0.4, 0.27, 0.13, 0.38], 50)\r\n);\r\n)\r\n\r\n// Melody\r\n(\r\n~melody = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\degree, Pwhite(0,5),\r\n\t\\ctranspose, -12,\r\n\t\\amp, 0.5,\r\n\t\\decay, 5,\r\n\t\\coef, 0.1,\r\n\t\\dur, Pseq([3/8, 3/8, 1, 1/16, 1/16, 1/16], 5),\r\n);\r\n)\r\n\r\n// Diddle\r\n(\r\na = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.major,\r\n\t\\degree, 0,\r\n\t\\ctranspose, -12,\r\n\t\\amp, 0.5,\r\n\t\\decay, 10,\r\n\t\\coef, 0.3,\r\n\t\\dur, Pseq([1/2], 1)\r\n);\r\n)\r\n\r\n(\r\nb = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.major,\r\n\t\\degree, 2,\r\n\t\\ctranspose, -12,\r\n\t\\amp, 0.5,\r\n\t\\decay, 10,\r\n\t\\coef, 0.3,\r\n\t\\dur, Pseq([1/4], 8)\r\n);\r\n)\r\n\r\n(\r\nc = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.major,\r\n\t\\degree, 3,\r\n\t\\ctranspose, -12,\r\n\t\\amp, 0.5,\r\n\t\\decay, 10,\r\n\t\\coef, 0.3,\r\n\t\\dur, Pseq([1/16], 16)\r\n);\r\n)\r\n\r\n(\r\nd = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.major,\r\n\t\\degree, -2,\r\n\t\\ctranspose, -12,\r\n\t\\amp, 0.5,\r\n\t\\decay, 10,\r\n\t\\coef, 0.3,\r\n\t\\dur, Pseq([3/8], 5)\r\n);\r\n)\r\n\r\n(\r\ne = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.minor,\r\n\t\\degree, -2,\r\n\t\\ctranspose, -12,\r\n\t\\amp, 0.5,\r\n\t\\decay, 10,\r\n\t\\coef, 0.3,\r\n\t\\dur, Pseq([1/4], 2)\r\n);\r\n)\r\n\r\n(\r\nf = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.major,\r\n\t\\degree, -1,\r\n\t\\ctranspose, -12,\r\n\t\\amp, 0.5,\r\n\t\\decay, 10,\r\n\t\\coef, 0.3,\r\n\t\\dur, Pseq([1/4], 2),\r\n);\r\n)\r\n\r\n(\r\ng = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.major,\r\n\t\\degree, -3,\r\n\t\\ctranspose, -12,\r\n\t\\amp, 0.5,\r\n\t\\decay, 10,\r\n\t\\coef, 0.3,\r\n\t\\dur, Pseq([1/2], 2),\r\n);\r\n)\r\n\r\n// Mixolydian\r\n(\r\n~mixolydian = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.mixolydian,\r\n\t\\degree, Pwhite(0, 15),\r\n\t\\ctranspose, 0,\r\n\t\\amp,0.8,\r\n\t\\decay, 15,\r\n\t\\coef, 0.4,\r\n\t\\dur, Pseq([1/8], 128),\r\n);\r\n)\r\n\r\n// Spanish\r\n(\r\n~spanish = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.spanish,\r\n\t\\degree, Pseq([Pwhite([-7, -3, 1, 5], [-4, 0, 4, 8]), Pwhite([5, 1, -3, -7], [8, 4, 0, -4])], inf),\r\n\t\\ctranspose, 12,\r\n\t\\strum, 0.03,\r\n\t\\amp,0.5,\r\n\t\\decay, 4,\r\n\t\\coef, 0.2,\r\n\t\\dur, Pseq([3/4, 1/4, 1/2, 1/2], 3),\r\n);\r\n)\r\n\r\n// Egyptian\r\n(\r\n~egyptian1 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.egyptian,\r\n\t\\degree, Pseq([Pwhite([-7, -3, 1, 5], [-4, 0, 4, 8]), Pwhite([5, 1, -3, -7], [8, 4, 0, -4])], inf),\r\n\t\\ctranspose, 12,\r\n\t\\strum, 0.04,\r\n\t\\amp,0.7,\r\n\t\\decay, 20,\r\n\t\\coef, 0.25,\r\n\t\\dur, Pseq([Pn(1/8, 32), Pn(8, 1), Pn(2, 4), Pn(1, 4)], 1),\r\n);\r\n)\r\n\r\n(\r\n~egyptian2 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.egyptian,\r\n\t\\degree, Pseq([Pwhite([-7, -3, 1, 5], [-4, 0, 4, 8]), Pwhite([5, 1, -3, -7], [8, 4, 0, -4])], inf),\r\n\t\\ctranspose, 12,\r\n\t\\strum, 0.06,\r\n\t\\amp,0.7,\r\n\t\\decay, 10,\r\n\t\\coef, 0.25,\r\n\t\\dur, Pn(1/4, 32),\r\n);\r\n)\r\n\r\n(\r\n~egyptian3 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.egyptian,\r\n\t\\degree, Pseq([Pwhite([-7, -3, 1, 5], [-4, 0, 4, 8]), Pwhite([5, 1, -3, -7], [8, 4, 0, -4])], inf),\r\n\t\\ctranspose, 12,\r\n\t\\strum, 0.02,\r\n\t\\amp,0.9,\r\n\t\\decay, 4,\r\n\t\\coef, 0.8,\r\n\t\\dur, Pn(1/8, 32),\r\n);\r\n)\r\n\r\n// Freq1\r\n(\r\n~freq1 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\freq, Pwhite(0, 880),\r\n\t\\amp, 0.5,\r\n\t\\decay, 50,\r\n\t\\coef, 0.1,\r\n\t\\dur, Pseq([Prand([0.51, 0.1, 0.1], 4), Pwhite(0, 4, 4), Pwhite(0, 1, 4)], 2)\r\n);\r\n)\r\n\r\n// Freq2\r\n(\r\n~freq2 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\freq, Pwhite(0, 880),\r\n\t\\amp, 0.5,\r\n\t\\decay, 50,\r\n\t\\coef, 0.1,\r\n\t\\dur, Pwrand([Prand([0.51, 0.1, 0.1], 4), Pwhite(0, 4, 8), Pwhite(0, 1, 4)], [0.9, 0.05, 0.05] , 4)\r\n);\r\n)\r\n\r\n// Freq3\r\n(\r\n~freq3 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\freq, Pwhite(0, 880),\r\n\t\\amp, 0.5,\r\n\t\\decay, 50,\r\n\t\\coef, 0.1,\r\n\t\\dur, Pwrand([Prand([0.51, 0.1, 0.1], 4), Pwhite(0, 4, 1), Pwhite(0, 1, 1)], [0.5, 0.25, 0.25] , 10)\r\n);\r\n)\r\n\r\n// Siren1\r\n(\r\n~siren1 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\degree, 0,\r\n\t\\ctranspose, Pseq([Pseries(24, 0.1, 100), Pseries(34, -0.1, 100)], 1),\r\n\t\\amp, 0.5,\r\n\t\\decay, 20,\r\n\t\\coef, 0.1,\r\n\t\\dur, 0.04\r\n);\r\n)\r\n\r\n// Siren2\r\n(\r\n~siren2 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\freq, Pseq([Pseries(600, 4, 100), Pseries(1000, -4, 100)], 1),\r\n\t\\amp, 0.5,\r\n\t\\decay, 10,\r\n\t\\coef, 0.1,\r\n\t\\dur, 0.04\r\n);\r\n)\r\n\r\n// Siren3\r\n(\r\n~siren3 = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\freq, Pseq([Pseries(600, 4, 100), Pseries(1000, -4, 100)], 1),\r\n\t\\amp, 0.5,\r\n\t\\decay, 3,\r\n\t\\coef, 0,\r\n\t\\dur, 0.04\r\n);\r\n)\r\n\r\n// Ending\r\n(\r\n~up = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\degree, 0,\r\n\t\\ctranspose, Pseries(24, 0.1),\r\n\t\\amp, Pseq([Pseries(0.7,0.1,3), Pseries(0.9,-0.1,3)], 24),\r\n\t\\decay, 1,\r\n\t\\coef, Pseq([Pseries(0.1,0.1,3), Pseries(0.9,-0.1,3)], 24),\r\n\t\\dur, 1/16\r\n);\r\n\r\n~down = Pbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\degree, 0,\r\n\t\\ctranspose, Pseries(24, -1),\r\n\t\\amp, Pseq([Pseries(0.7,0.1,1), Pseries(0.9,-0.1,1)], 64),\r\n\t\\decay, 1,\r\n\t\\coef, Pseq([Pseries(0.1,0.1,1), Pseries(0.9,-0.1,1)], 64),\r\n\t\\dur, 1/16\r\n);\r\n)\r\n\r\n// Melodic Minor Chords\r\n(\r\nPbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.melodicMinor,\r\n\t\\degree, Prand([\r\n\t\t[0, 2, 4, 6],\r\n\t\t[0, 2, 4, 5],\r\n\t\t[-4, 1, 5, 7]\r\n\t], inf),\r\n\t\\amp, Pwhite(0.1, 0.2),\r\n\t\\decay, Pwhite(2, 4),\r\n\t\\coef, Pseq([0.2, 0.3, 0.4], inf),\r\n\t\\dur, Pwrand([1/4, 1/8, 3/16], [0.8, 0.1, 0.1], inf)\r\n).play;\r\n)"
}
