Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Subtractive Synthesis Demo with QuNeo - Patch 2
name
code content
// ************************************ // Subtractive Synthesis Demo (QuNeo) // Patch 2 - Patterns of Filtered Noise // Bruno Ruviaro, 2013-07-26 // ************************************ /* Each pad activates a differnt pattern of "notes" made of filtered white noise. */ s.waitForBoot({ var padsArray, patternArray, quneoChannel; padsArray = Array.newClear(16); patternArray = Array.newClear(16); quneoChannel = 11; // MIDIIn.connectAll; MIDIdef.freeAll; patternArray[0] = Pbind( \instrument, "noise-quneo-2", \freq, Pwhite(100, 5500), \pulseFreq, Pwhite(5, 10), \dur, 0.3, \amp, Pwhite(0.1, 0.5), \rq, Pwhite(0.001, 0.05)); patternArray[1] = Pbind( \instrument, "noise-quneo-2", \degree, Pseq([0,3,5,7,9,11,14,17], inf), \pulseFreq, Pwhite(1, 4), \dur, 0.3, \amp, 1, \rq, 0.01); patternArray[2] = Pbind( \instrument, "noise-quneo-2", \degree, Prand([0,3,5,7,9,11,14,17], inf) - 12, \pulseFreq, Pwhite(1, 9), \dur, 0.3, \sustain, 0.1, \amp, 1, \rq, 0.1); patternArray[3] = Pbind( \instrument, "noise-quneo-2", \degree, Pxrand([0,3,5,7,9,11,14,17], inf) + 12, \pulseFreq, Pwhite(1, 9), \dur, Pseq([0.2, 0.3, 0.2, 0.4], inf) * Pwhite(2, 4), \sustain, 0.6, \amp, Pwhite(0.05, 0.2), \rq, Prand([0.05, 0.1], inf)); patternArray[4] = Pbind( \instrument, "noise-quneo-2", \scale, Scale.phrygian, \degree, Pseq([0,3,5,7,9,11,14,17], inf), \pulseFreq, Pwhite(3, 6), \dur, 0.3, \amp, 0.5, \rq, Pwhite(0.005, 0.01)); patternArray[5] = Pbind( \instrument, "noise-quneo-2", \scale, Scale.phrygian, \degree, Pseq([0,3,5,7,9,11,14,17], inf) + Pwrand([0, 1], [0.9, 0.1], inf), \pulseFreq, Pwhite(3, 9), \dur, Pseq([Pseq(0.33!8, 2), Pseq([0.1], 1)], inf), \amp, Pwhite(0.3, 1), \rq, Pwhite(0.005, 0.01)); patternArray[6] = Pbind( \instrument, "noise-quneo-2", \scale, Scale.phrygian, \degree, Pseq([0,3,5,7,9,11,14,17], inf) + Pwrand([0, 1], [0.9, 0.1], inf), \pulseFreq, 0.5, \dur, Pseq( (0.1!60) ++ (0.2!8) , inf), \amp, 1, \rq, Pwrand([0.005, 0.01], [0.95, 0.05], inf)); patternArray[7] = Pbind( \instrument, "noise-quneo-2", \freq, Pwhite(1000, 9500), \pulseFreq, Pwhite(5, 10), \dur, 0.3, \amp, Pwhite(0.1, 0.2), \rq, Pwhite(0.001, 0.05)); patternArray[8] = Pbind( \instrument, "noise-quneo-2", \degree, Pshuf([4,3,5,7,9,11,14,17], inf), \pulseFreq, Pwhite(1, 9), \dur, 0.3, \amp, Pwhite(0.4, 0.5), \rq, 0.01); patternArray[9] = Pbind( \instrument, "noise-quneo-2", \note, Prand([0,3,5,7,9,11,14,17], inf), \pulseFreq, Pwhite(1, 9), \dur, 0.3, \sustain, 0.1, \amp, 0.1, \rq, 0.1); patternArray[10] = Pbind( \instrument, "noise-quneo-2", \degree, Pxrand([0,3,5,7,9,11,14,17], inf) - 12, \pulseFreq, Pwhite(1, 9), \dur, Pseq([0.2, 0.1, 0.2, 0.4], inf) * Pwhite(1, 4), \sustain, 0.2, \amp, Pwhite(0.3, 0.6), \rq, Prand([0.05, 0.1], inf)); patternArray[11] = Pbind( \instrument, "noise-quneo-2", \scale, Scale.phrygian, \degree, Pseq([0,5,9,3,7,11], inf), \pulseFreq, Pwhite(5, 11), \dur, 0.3, \amp, 1, \rq, Pwhite(0.005, 0.01)); patternArray[12] = Pbind( \instrument, "noise-quneo-2", \scale, Scale.phrygian, \degree, Pseq([0,3,5,7,9,11,14,17], inf) + Pwrand([0, 12], [0.5, 0.5], inf), \pulseFreq, Pwhite(1, 12), \dur, 0.43, \amp, 0.6, \rq, Pwhite(0.005, 0.01)); patternArray[13] = Pbind( \instrument, "noise-quneo-2", \scale, Scale.locrian, \degree, Pseq([7,8,6,5,4,3,2,1,0,4], inf) + Pwrand([0, 1], [0.9, 0.1], inf), \pulseFreq, 0.5, \dur, Pseq( (0.1!10) ++ (0.2!8) , inf), \amp, 0.6, \rq, Pwrand([0.005, 0.01], [0.95, 0.05], inf)); patternArray[14] = Pbind( \instrument, "noise-quneo-2", \degree, Pxrand([1,3,4,7], inf) + 24, \pulseFreq, Pwhite(1, 9), \dur, Pseq([0.2, 0.3, 0.1, 0.4], inf) * Pwhite(2, 4), \sustain, 0.6, \amp, Pwhite(0.01, 0.13), \rq, Prand([0.05, 0.1], inf)); patternArray[15] = Pbind( \instrument, "noise-quneo-2", \scale, Scale.mixolydian, \degree, Pseq([0,7,5,3,9,11,0], inf), \pulseFreq, Pwhite(1, 9), \dur, 0.1, \amp, 0.3, \rq, Pwhite(0.001, 0.05)); MIDIdef.noteOn( key: \noteOn, func: {arg vel, note; var padNumber = note - 36; // starting from 0 // var padNote = padNumber + 60; // middle C for first pad padsArray[padNumber] = patternArray[padNumber].play; padNumber.postln; }, noteNum: (36..51), chan: quneoChannel); MIDIdef.noteOff( key: \noteOff, func: {arg vel, note; var padNumber = note - 36; padsArray[padNumber].stop}, noteNum: (36..51), chan: quneoChannel); SynthDef("noise-quneo-2", {arg freq = 1000, pulseFreq = 10, amp = 0.1, rq = 0.001, att = 0.01, dec = 0.3, sus = 1, rel = 1, gate = 1; var snd, env; env = EnvGen.kr(Env.adsr(att, dec, sus, rel), gate: gate, doneAction: 2); snd = BPF.ar(WhiteNoise.ar(Impulse.ar(pulseFreq)), freq, Lag.kr(rq, 1)); snd = snd * env * Lag.kr(amp, 1) * 100; snd = Clip.ar(snd, -0.5, 0.5); Out.ar(0, [snd, snd]); }).add; });
code description
Each QuNeo pad activates a differnt pattern of "notes" made of filtered white noise.
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