Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Hotel Cheree - MUSC 115 FINAL
name
code content
k = Buffer.read(s, "C:/Users/Xtlas/Desktop/Kick.wav"); x = Buffer.read(s, "C:/Users/Xtlas/Desktop/Snare.wav"); c = Buffer.read(s, "C:/Users/Xtlas/Desktop/Letra.wav"); ( SynthDef("fm2", {arg freq = 440, modindex = 10, amp = 0.1, pos = 0, gate = 1, att = 0.01, rel = 0.3; var carrier, modulator, freqdev, env, modfreq; modindex = Line.kr(modindex, 1, att); modfreq = freq / 2; freqdev = modfreq * modindex; modulator = Pulse.ar(freq: modfreq, mul: freqdev); carrier = SinOsc.ar(freq: [freq + modulator, freq * 1.01 + modulator]); carrier = carrier + SinOsc.ar(freq: [freq + modulator, freq * 1.01 + modulator]/2); env = Env.asr( attackTime: att, sustainLevel: amp/1.3, releaseTime: rel ).kr(doneAction: 2, gate: gate); carrier = carrier + FreeVerb.ar(carrier, 0.33, 0.75, 0.25, 1, 0); carrier = Pan2.ar(in: carrier, pos: pos, level: env); Out.ar(0, carrier * 0.5); }).add; SynthDef("lead", {arg freq = 440, modindex = 10, amp = 0.1, pos = 0, gate = 1, att = 0.01, rel = 0.2; var carrier, modulator, freqdev, env, modfreq, realF; // create a nicer env for modindex, modindex = Line.kr(modindex, 1, rel); modfreq = freq / 2; freqdev = modfreq * modindex; modulator = SinOsc.ar(freq: modfreq, mul: freqdev); realF = [freq + modulator, freq * 1.01 + modulator]; carrier = SinOsc.ar(freq: Lag.ar(realF, 0.1) ); carrier = carrier + Pulse.ar(freq: Lag.ar(realF*1.001, 0.1)/2); env = Env.asr( attackTime: att, sustainLevel: amp, releaseTime: rel ).kr(doneAction: 2, gate: gate); carrier = Pan2.ar(in: carrier, pos: pos, level: env); Out.ar(0, carrier * 0.5); }).add; SynthDef("sine", {arg freq = 440, modindex = 10, amp = 0.1, pos = 0, gate = 1, att = 0.01, rel = 0.3; var carrier, modulator, freqdev, env, modfreq; modindex = Line.kr(modindex, 1, att); modfreq = freq / 2; freqdev = modfreq * modindex; modulator = SinOsc.ar(freq: modfreq, mul: freqdev); carrier = SinOsc.ar(freq: [freq + modulator, freq * 1.01 + modulator]); env = Env.asr( attackTime: att, sustainLevel: amp, releaseTime: rel ).kr(doneAction: 2, gate: gate); carrier = carrier + FreeVerb.ar(carrier, 0.33, 0.75, 0.25, 1, 0); carrier = Pan2.ar(in: carrier, pos: pos, level: env); Out.ar(0, carrier * 0.5); }).add; SynthDef("marimba", {arg freq= 220, amp = 0.4; var snd, env; env = EnvGen.kr(Env.linen(0.015, 1, 0.5), levelScale: amp, doneAction: 2); snd = BPF.ar( in: Saw.ar(0), freq: freq, rq: 0.02); snd = BLowShelf.ar(snd, 220, 0.81, 6); Out.ar(0, Splay.ar(snd*env*0.3)); }).add; SynthDef("sampler", {arg rate = 1, amp = 1, buffer, startPos = 0, attack = 0.02, release = 0.5, panning = 0; var snd, env; env = Env.perc(attackTime: attack, releaseTime: release, level: amp).kr(doneAction: 2); snd = PlayBuf.ar( numChannels: 1, bufnum: buffer, rate: rate, startPos: startPos.linlin(0, 1, 0, BufFrames.kr(buffer)) ); snd = snd * env; snd = Pan2.ar(snd, panning); Out.ar(0, snd); }).add; SynthDef("stereosampler", {arg rate = 1, amp = 1, buffer, startPos = 0, attack = 0.02, release = 0.5, panning = 0; var snd, env; env = Env.perc(attackTime: attack, releaseTime: release, level: amp).kr(doneAction: 2); snd = PlayBuf.ar( numChannels: 2, bufnum: buffer, rate: rate, startPos: startPos.linlin(0, 1, 0, BufFrames.kr(buffer)) ); snd = snd * env; snd = Pan2.ar(snd, panning); Out.ar(0, snd); }).add; SynthDef("hihat", {arg out = 0, amp = 0.5, att = 0.01, rel = 0.2, ffreq = 12000, pan = 0; var env, snd; env = Env.perc( attackTime: att, releaseTime: rel, level: amp).kr(doneAction: 2); snd = WhiteNoise.ar( mul: env, add: 0); snd = LPF.ar( in: snd, freq: ffreq, mul: 1, add: 0); Out.ar(out, Pan2.ar(snd, pan)); }).add; ) ( ~kc = 0; //7 ~chordsMinor = Pbind( \instrument, "fm2", \dur, Pseq([ 0.5 ], inf), \midinote, Pseq([ Pn([60, 63, 65], 8), Pn([59, 63, 65], 8), Pn([58, 63, 65], 8), Pn([53, 57, 60], 8), Pn([56, 60, 65], 8), Pn([55, 59, 67], 8), Pn([53, 60, 63], 8), Pn([55, 55, 59], 8), ] + ~kc, 1), \ctranspose, 0, \modindex, Pseq([1, 5, 7, 10], inf), \amp, 0.1, \att, 0.01, \rel, 0.2, \strum, 0.01 ); ~chordsAlt = Pbind( \instrument, "fm2", \dur, Pseq([ 0.5, 0.25, 0.5, 0.5, 0.5, 0.25, 0.5, 0.5, 0.25, 0.25, 0.5, 0.25, 0.5, 0.5, 0.5, 0.25, 0.5, 1 ], inf), \midinote, Pseq([ Pn([60, 63, 65], 10), Pn([59, 63, 65], 8), Pn([58, 63, 65], 10), Pn([53, 57, 60], 8), Pn([56, 60, 65], 10), Pn([55, 59, 67], 8), Pn([53, 60, 63], 10), Pn([55, 55, 59], 8), ] + 12 + ~kc, 1), \ctranspose, 0, \modindex, Pseq([1, 5, 7, 10], inf), \amp, 0.09, \att, 0.01, \rel, 0.5, \legato, 0.5, \strum, 0.01 ); ~mari = Pbind( \instrument, "marimba", \dur, Pseq([ 0.25 ], inf), \midinote, Pseq([ 60, 63, 65, 67, 60, 63, 65, 67, 60, 63, 65, 67, 60, 63, 65, 67, 59, 63, 65, 67, 59, 63, 65, 67, 59, 63, 65, 67, 59, 63, 65, 67, 58, 63, 65, 67, 58, 63, 65, 67, 58, 63, 65, 67, 58, 63, 65, 67, 53, 57, 60, 63, 53, 57, 60, 63, 53, 57, 60, 63, 53, 57, 60, 63, 56, 60, 65, 67, 56, 60, 65, 67, 56, 60, 65, 67, 56, 60, 65, 67, 55, 59, 67, 69, 55, 59, 67, 69, 55, 59, 67, 69, 55, 59, 67, 69, 53, 60, 63, 67, 53, 60, 63, 67, 53, 60, 63, 67, 53, 60, 63, 67, 55, 55, 59, 67, 55, 55, 59, 67, 55, 55, 59, 67, 55, 55, 59, 67 ], 1) + ~kc, \ctranspose, 0, \amp, 4.5, ); ~lead = Pbind( \instrument, "lead", \dur, Pseq([ Pn(1, 7), Pn(0.5, 2), Pn(1, 4), Pn(0.25, 3), 0.2, 0.8, 1.25, 1, ], 2), \midinote, Pseq([ 48, 60, 63, 60, 65, 63, 60, 60, 63, 48, 53, 55, 58, 63, 65, 67, 64, 65, 55, 53 ] + 24 + ~kc, inf), \ctranspose, 0, \modindex, 0, \amp, 0.1, \att, 0.1, \rel, 0.65, \pos, 0 ); ~bass = Pbind( \instrument, "sine", \dur, Pseq([ 1 ], inf), \midinote, Pseq([ 48, 48, 48, 48, 47, 47, 47, 47, 46, 46, 46, 46, 41, 41, 41, 41 ] -12 + ~kc, 2), \ctranspose, 0, \modindex, Pseq([1, 5, 7, 10], inf), \amp, 0.2, \att, 0.1, \rel, 0.6, \pos, 0 ); ~kick = Pbind( \instrument, "sampler", \buffer, k, \dur, Pseq([1], 32), \amp, 2.2 ); ~hihat = Pbind( \instrument, \hihat, \dur, Pseq([ Pn(0.25, 12), Pn(0.125, 8), Pn(0.25, 12), Pn(0.11111111111111111111111111111111, 9) ], 4), \amp, 0.08, \ffreq, 8000 ); ~clap = Pbind( \instrument, "sampler", \buffer, x, \dur, 1, \release, 3, \amp, Pseq([0, 0.8], 16) ); ~letra = Pbind( \instrument, "stereosampler", \buffer, c, \dur, 1, \release, 1999, \amp, Pn(0.55,1) ); ////////////////////////////////////////////////////////////// t = TempoClock.new(100/60); Pspawner({ arg maestro; maestro.seq(~chordsMinor); maestro.seq(Ppar([~chordsMinor, ~bass, ~letra])); maestro.seq(Ppar([~chordsMinor, ~bass, ~kick, ~clap])); maestro.wait(4); maestro.seq(Ppar([~chordsAlt, ~bass, ~kick, ~clap, ~hihat, ~mari])); maestro.seq(Ppar([~chordsAlt, ~bass, ~kick, ~clap, ~hihat, ~mari, ~chordsMinor])); maestro.seq(Ppar([~chordsMinor, ~bass, ~kick, ~clap, ~lead])); maestro.seq(Ppar([~chordsMinor, ~bass, ~kick, ~clap, ~lead])); maestro.wait(4); maestro.seq(Ppar([~chordsAlt, ~bass, ~kick, ~clap, ~hihat, ~mari])); maestro.seq(Ppar([~chordsAlt, ~bass, ~kick, ~clap, ~hihat, ~mari, ~chordsMinor])); maestro.seq(Ppar([~chordsMinor, ~bass, ~kick, ~clap])); maestro.seq(Ppar([~chordsMinor, ~bass, ~kick, ~clap])); maestro.suspendAll; }).play(t); )
code description
SoundCloud: https://soundcloud.com/mileselliott/hotel-cheree-musc-115/s-iUrOR Samples: https://drive.google.com/drive/folders/0B_RfpesVhgStR3RrRzhBaWh0bGs?usp=sharing
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change