{
   "description" : "Schemawound track for Waxen Wing's \"Give Me A Sine\" compilation.\r\n\r\nCompilation Description: All songs written using ONLY sine waves in their creation. All oscillations, modulations, lfo's, envelopes, etc, use only sine waves. No samples or outside source audio were permitted on this releases, unless of course the samples were of pure sine waves. Download includes full 8 panel artwork and extensive liner notes on each piece written by each artist. \r\n\r\nDownload the free compilation here: http://waxenwings.bandcamp.com/album/give-me-a-sine\r\n\r\nBlog post about the creation of this track: http://schemawound.tumblr.com/post/24520532915/sinusoid",
   "ancestor_list" : [],
   "name" : "Sinusoid",
   "author" : "Schemawound",
   "id" : "1-4QV",
   "is_private" : null,
   "code" : "/*\r\nSchemawound track for Waxen Wing's \"Give Me A Sine\" compilation.\r\n\r\nCompilation Description: All songs written using ONLY sine waves in their creation. All oscillations, modulations, lfo's, envelopes, etc, use only sine waves. No samples or outside source audio were permitted on this releases, unless of course the samples were of pure sine waves. Download includes full 8 panel artwork and extensive liner notes on each piece written by each artist. \r\n\r\nDownload the free compilation here: http://waxenwings.bandcamp.com/album/give-me-a-sine\r\n\r\nBlog post about the creation of this track: http://schemawound.tumblr.com/post/24520532915/sinusoid\r\n*/\r\n\r\n(\r\n//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Sinusoid -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\r\n\tSynthDef(\\Sinusoid, {\r\n\t\t|\r\n\t\t\tout = 0,\t\t\t\t\tgate = 1,\t\t\t\t\tamp = 1,\t\t\t\t\tfreqArrayMult = 1,\t\t\r\n\t\t\tmod1FreqRLfoFreq = 0.1,\t\tmod1FreqRLfoDepth = 100,\tmod1FreqRLfoOffset = 100,\t\r\n\t\t\tmod2Freq = 50,\t\t\t\tcombDelay = 0.7, \t\t\tcombDecay = 9,\t\t\t\t\r\n\t\t\tattack = 0.001 \t\t\t\trelease = 0.5\r\n\t\t|\r\n\t\t//\r\n\t\tvar combMaxDelay = 10;\r\n\t\t//Many Sines\r\n\t\tvar freqArray = (1..50) * freqArrayMult; \r\n\t\tvar manySines = Mix(SinOsc.ar(freqArray));\r\n\t\t//Mod1\r\n\t\tvar mod1FreqL = SinOsc.kr(150, 0, 20);\r\n\t\tvar mod1FreqRLfo = SinOsc.kr(mod1FreqRLfoFreq, 0, mod1FreqRLfoDepth, mod1FreqRLfoOffset);\r\n\t\tvar mod1FreqR = SinOsc.kr(mod1FreqRLfo, 0, 37);\r\n\t\tvar mod1 = SinOsc.ar([mod1FreqL, mod1FreqR]);\r\n\t\t//Mod2\r\n\t\tvar mod2 = SinOsc.ar(mod2Freq);\r\n\t\t//Sum and FX\r\n\t\tvar sinSum = manySines * mod1 * mod2;\r\n\t\tvar comb = sinSum; //+ CombC.ar(sinSum, combMaxDelay, combDelay, combDecay);\r\n\t\tvar dist = comb.tanh;\r\n\t\tvar env = dist * Linen.kr(gate, attack, amp, release, doneAction: 2);\r\n\t\t//Output\r\n\t\tOut.ar(out, env);\r\n\t}).add;\r\n\r\n//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ELEKTRO KICK -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\r\n\tSynthDef(\\ElektroKick, { \r\n\t\t|\r\n\t\t\tout = 0,\t\tgate = 1,\t\tamp = 1,\t\t\tfreqArrayMult = 1,\t\t\r\n\t\t\tbasefreq = 50,\tenvratio = 3, \tfreqdecay = 0.02, \tampdecay = 0.5\r\n\t\t|\r\n\t\tvar fenv = EnvGen.ar(Env([envratio, 1], [freqdecay], \\exp), 1) * basefreq;\r\n\t\tvar aenv = EnvGen.ar(Env.perc(0.005, ampdecay), 1, doneAction:2);\r\n\t\tvar output = SinOsc.ar(fenv, 0.5pi, aenv) * amp;\r\n\t\tOut.ar(out, output!2);\r\n\t}).add;\r\n\r\n//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- VERB -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\r\n\tSynthDef(\\Verb, {\r\n\t\targ \tout = 0,\tin,\r\n\t\t\tmix = 0.25,\troom = 0.15,\tdamp = 0.5;\r\n\t\r\n\t\tvar input, verb;\r\n\t\t\r\n\t\tinput = In.ar(in);\r\n\t\tverb = FreeVerb.ar(input, mix, room, damp);\r\n\t\tOut.ar(out, verb!2);\r\n\t}).add;\r\n)\r\n\r\n(\r\n\t//Groups and Busses\r\n\tvar sourceGroup = Group.new;\r\n\tvar fxGroup = Group.after(~sourceGroup);\r\n\tvar verbBus = Bus.audio(s, 2);\r\n\tvar mainOut = 0;\r\n\tvar verb = Synth.tail(~fxGroup, \\Verb, [\\in, verbBus, \\out, mainOut, \\mix, 1, \\room, 1]);\r\n\r\n\t//Song Variables\r\n\tvar bar = 0.94;\r\n\tvar qNote = bar/4;\r\n\tvar eNote = bar/8;\r\n\r\n\t//Mix\r\n\tvar finalAmp \t= 0.1;\r\n\tvar hatAmp \t\t= 0.6 * finalAmp;\r\n\tvar bassAmp \t= 0.8 * finalAmp;\r\n\tvar loToneAmp \t= 0.8 * finalAmp;\r\n\tvar hiWhineAmp \t= 0.7 * finalAmp;\r\n\tvar eKickAmp \t= 2.1 * finalAmp;\r\n\r\n\t//Basic Patterns\r\n\tvar hat = {|beatsPerMeasure = 9, freqArrayMult = 1|\r\n\t\tPbind(*[instrument: \\Sinusoid, amp: hatAmp, group: sourceGroup,\r\n\t\t\tdur:\t\t\t\tPseq([bar / beatsPerMeasure], beatsPerMeasure),\r\n\t\t\tfreqArrayMult:\t\tPxrand((1..12), inf),\r\n\t\t\tmod2Freq:\t\t\tPwhite(60, 6000, inf),\r\n\t\t\tmod1FreqRLfoFreq:\t0.01,\r\n\t\t\tmod1FreqRLfoDepth:\tPwhite(1000, 3000, inf),\r\n\t\t\tmod1FreqRLfoOffset:\tPwhite(10, 300, inf),\r\n\t\t\trelease:\t\t\tPkey(\\dur)\r\n\t\t])\r\n\t};\r\n\tvar bass = {|beatsPerMeasure|\r\n\t\tPbind(*[instrument: \\Sinusoid, amp: bassAmp, group: sourceGroup,\r\n\t\t\tdur:\t\t\t\tPseq([bar / beatsPerMeasure], beatsPerMeasure),\r\n\t\t\tmod2Freq:\t\t\tPwhite(30, 300, inf),\r\n\t\t\tmod1FreqRLfoFreq:\tPwhite(0.1, 0.3, inf),\r\n\t\t\tmod1FreqRLfoDepth:\tPwhite(10, 300, inf),\r\n\t\t\tmod1FreqRLfoOffset:\tPwhite(10, 300, inf),\r\n\t\t\trelease:\t\t\t0.001\r\n\t\t])\r\n\t};\r\n\tvar lowtone = {|beatsPerMeasure = 1, attack = 0.001, out = 0|\r\n\t\tPbind(*[instrument: \\Sinusoid, amp: loToneAmp, group: sourceGroup,\r\n\t\t\tdur:\t\t\t\tPseq([bar / beatsPerMeasure], beatsPerMeasure),\r\n\t\t\tmod2Freq:\t\t\tPwhite(30, 400, inf),\r\n\t\t\tmod1FreqRLfoFreq:\tPwhite(0.1, 0.3, inf),\r\n\t\t\tmod1FreqRLfoDepth:\tPwhite(10, 300, inf),\r\n\t\t\tmod1FreqRLfoOffset:\tPwhite(10, 300, inf),\r\n\t\t\tattack:\t\t\t\tattack,\r\n\t\t\trelease:\t\t\tPkey(\\dur),\r\n\t\t\tout:\t\t\t\tout\r\n\t\t])\r\n\t};\r\n\tvar lowtoneLong = Pbind(*[instrument: \\Sinusoid, amp: loToneAmp, group: sourceGroup,\r\n\t\tdur:\t\t\t\tPseq([bar*8], 1),\r\n\t\tfreqArrayMult:\t\t3,\r\n\t\tmod2Freq:\t\t\t50,\r\n\t\tmod1FreqRLfoFreq:\t0.1,\r\n\t\tmod1FreqRLfoDepth:\t100,\r\n\t\tmod1FreqRLfoOffset:\t100,\r\n\t\trelease:\t\t\t3\r\n\t]);\r\n\tvar hiWhine = {|out = 0|\r\n\t\tPbind(*[instrument: \\Sinusoid, amp: hiWhineAmp, group: sourceGroup,\r\n\t\t\tdur:\t\t\t\tPseq([bar], 1),\r\n\t\t\tmod2Freq:\t\t\t2000,\r\n\t\t\tmod1FreqRLfoFreq:\tPwhite(0.1, 0.3, inf),\r\n\t\t\tmod1FreqRLfoDepth:\t100,\r\n\t\t\tmod1FreqRLfoOffset:\t100,\r\n\t\t\trelease:\t\t\tPkey(\\dur),\r\n\t\t\tout:\t\t\t\tout\r\n\t\t])\r\n\t};\r\n\tvar elektroKick = {|beatsPerMeasure = 1|\r\n\t\tPbind(*[instrument: \\ElektroKick, amp: eKickAmp, group: sourceGroup,\r\n\t\t\tdur:\t\t\t\tPseq([bar / beatsPerMeasure], beatsPerMeasure),\r\n\t\t\tbasefreq:\t\t\tPwhite(70, 75),\r\n\t\t\tampdecay:\t\t\t2,\r\n\t\t\tenvratio:\t\t\t1,\r\n\t\t\tfreqdecay:\t\t\t1\r\n\t\t])\r\n\t};\r\n\r\n\t//8 Bar Patterns\r\n\tvar loTonePat = [\r\n\t\tPn(lowtone.(1), 8),\t\t\t\t\t//loTone pattern 0 - 8 bars\r\n\t\tPn(lowtone.(1, bar), 8),\t\t\t\t//loTone pattern 1 - 8 bars\r\n\t\tPn(lowtone.(1, out:verbBus), 8)\t//loTone pattern 2 - 8 bars\r\n\t];\r\n\r\n\tvar hiWhinePat = [\r\n\t\tPn(hiWhine.(verbBus), 8),\t//hiWhine pattern 0 - 8 bars\r\n\t\tPn(hiWhine.(mainOut), 8)\t//hiWhine pattern 0 - 8 bars\r\n\t];\r\n\r\n\tvar hatPat = [\r\n\t\tPseq([//hat pattern 0 - 8 bars\r\n\t\t\tPn(hat.(9), 7),\t\that.(11)\r\n\t\t]),\t\r\n\t\tPseq([//hat pattern 1 - 8 bars\r\n\t\t\that.(8), \t\t\that.(9,(1..12)),\that.(9), \t\t\that.(7,(1..12)),\r\n\t\t\that.(6,(1..12)),\that.(12,(1..12)),\that.(6,(1..12)),\that.(24,(1..12))\r\n\t\t]),\r\n\t\tPseq([//hat pattern 2 - 8 bars\r\n\t\t\that.(8), \t\t\that.(3),\t\t\that.(6),\t\t\that.(9),\r\n\t\t\that.(8,(1..12)),\that.(3,(1..12)),\that.(6,(1..12)),\that.(12,(1..12))\r\n\t\t]),\r\n\t\tPseq([//hat pattern 3 - 8 bars\r\n\t\t\that.(9), \t\t\that.(8),\t\t\that.(7),\t\t\that.(8),\r\n\t\t\that.(9,(1..12)),\that.(8,(1..12)),\that.(16,(1..12)),\that.(32,(1..12))\r\n\t\t])\r\n\t];\r\n\r\n\tvar bassPat = [\r\n\t\tPn(bass.(3), 8),\t//bass pattern 0 - 8 bars\r\n\t\tPseq([\t\t\t\t//bass pattern 1 - 8 bars\r\n\t\t\tbass.(4),\tPn(bass.(3),3)\r\n\t\t], 2),\r\n\t\tPseq([\t\t\t\t//bass pattern 2 - 8 bars\r\n\t\t\tbass.(4),\tPn(bass.(3),3),\t\t\r\n\t\t\tbass.(4),\tPn(bass.(3),2), \tbass.(5)\r\n\t\t]),\r\n\t\tPseq([\t\t\t\t//bass pattern 3 - 8 bars\r\n\t\t\tbass.(4), \tbass.(3.5), \t\tbass.(3),\t\tbass.(3.5),\r\n\t\t\tbass.(4), \tbass.(3), \t\t\tbass.(6),\t\tbass.(7)\r\n\t\t]),\r\n\t\tPseq([\t\t\t\t//bass pattern 4 - 8 bars\r\n\t\t\tbass.(4),\tPn(bass.(3), 7)\r\n\t\t]),\r\n\t];\r\n\r\n\tvar kickPat = [\r\n\t\tPn(elektroKick.(1), 8),\t\t//kick pattern 0 - 8 bars\r\n\t\tPn(elektroKick.(2), 8)\t//kick pattern 1 - 8 bars\r\n\t];\r\n\r\n\tvar drop = [\r\n\t\tPn(Ppar([lowtone.(1), hiWhine.(verbBus)]), 2),\t\t\t\t\t\t\t\t\t\t//Drop Pattern 0 - 2 bars\r\n\t\tPn(Ppar([lowtone.(1), hiWhine.(verbBus), elektroKick.(1)]), 2),\t\t\t\t\t\t//Drop Pattern 1 - 2 bars\r\n\t\tPn(Ppar([lowtone.(1), hiWhine.(verbBus), elektroKick.(1), hiWhine.(mainOut)]), 2),\t//Drop Pattern 2 - 2 bars\r\n\t];\r\n\r\n\t//Song\r\n\tvar song = Pseq([\r\n\t\t\t\t\t\t\t\tloTonePat[0], \t\t\t\t\r\n\t\tPpar([\tbassPat[0], \tloTonePat[0]\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]), \r\n\t\tPpar([\tbassPat[0], \tloTonePat[0],\t\t\t\t\thatPat[0]\t\t\t\t\t\t\t\t\t\t\t\t\t]), \r\n\t\tdrop[0], \r\n\t\tPpar([\tbassPat[0], \tloTonePat[0], \t\t\t\t\t\t\t\tkickPat[0]\t\t\t\t\t\t\t\t\t\t]), \r\n\t\tPpar([\tbassPat[0], \tloTonePat[0],\t\t\t\t\thatPat[0], \tkickPat[0]\t\t\t\t\t\t\t\t\t\t]),\r\n\t\tdrop[1],\r\n\t\tPpar([\tbassPat[1], \t\t\t\t\t\t\t\t\thatPat[2], \tkickPat[0]\t\t\t\t\t\t\t\t\t\t]), \r\n\t\tPpar([\tbassPat[2], \tloTonePat[0], \t\t\t\t\thatPat[2], \tkickPat[0]\t\t\t\t\t\t\t\t\t\t]),\r\n\t\tdrop[2],\r\n\t\tPpar([\tbassPat[1], \t\t\t\t\t\t\t\t\thatPat[2], \tkickPat[0],\t\thiWhinePat[0]\t\t\t\t\t]), \r\n\t\tPpar([\tbassPat[2], \tloTonePat[0], \t\t\t\t\thatPat[2], \tkickPat[0]\t\t\t\t\t\t\t\t\t\t]),\r\n\t\tPpar([\tbassPat[1], \t\t\t\t\tloTonePat[2],\thatPat[2], \tkickPat[0],\t\thiWhinePat[0],\thiWhinePat[1]\t]), \r\n\t\tPpar([\tbassPat[2], \tloTonePat[0],\tloTonePat[2],\thatPat[2], \tkickPat[0],\t\t\t\t\t\thiWhinePat[1]\t]),\r\n\t\tdrop[0],\r\n\t\t\t\t\t\t\t\tloTonePat[2]\r\n\t]);\r\n\r\n\tsong.play;\r\n)",
   "labels" : [
      "song",
      "give me a sine",
      "compilation",
      "sine wave"
   ]
}
