Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: spawnBufGranulizer
name
code content
//A sample granulizer using spawned patterns //might be easiest to learn controls using pan //wslib quark required //NICOLE = child stream //centr = the basic static value of that variable //shift = the amount of change from grain to grain in a single pbind stream (mostly bi-directional, use <> buttons for rate & filter) //dev = the amount of random deviation from centre using the distribution from the pop-up next to it //PAPA = parent stream //step = the step value used if a brownian distribution is chosen from pop-up in nicole //shift∆ = the amount of change from stream to stream created by the spawner (use <> just above for rate & filter directionality here) //dev∆ = the change in the amount of random deviation from stream to stream created by the spawner //some of the random deviations can 'pass thru zero" //idiosyncrasies: the large button in the nicole/rate section changes play direction forw/back //the "Ƅ" symbol in the papa/length section refers to bend - controls the random deviation parameters for bend amount // the distribution type pop-up for the papa/delta is in the nicole section under the envelope selector //in the nicole/filter section there is a knob to control HPF cutoff //note also the gauss distribution requires much lower setting of dev than either Rand or Brown here //some symbols have been used from the Mac character viewer - yet to find out if these are Windows compatible //haven't been on SC too long but thought it might be fun for others to play around with too //it is a work in progress ( Routine.run{ y = (Platform.resourceDir +/+ "sounds/a11wlk01.wav"); s.sync; b = Buffer.read(s, y); s.sync; a = b.numFrames; s.sync; ( SynthDef(\bufGab, { |amp=1, rate=1.0, bend=1.0, pos=1000, sus=0.05, pan=0, filter=22000, hiPass=20, vol=1| var snd = HPF.ar((LPF.ar((PlayBuf.ar(1, b, Line.ar((rate*BufRateScale.kr(b)), (rate*BufRateScale.kr(b)*bend), sus), 1, pos, 0, 2)), filter)),hiPass); var env = EnvGen.ar(Env.sine(sus, amp), doneAction: 2); var kak = Pan2.ar(snd * env, pan, vol); Out.ar(4, kak); OffsetOut.ar(0, kak); }, \ir ! 9).add; SynthDef(\bufWide, { |amp=1, rate=1.0, bend=1.0, pos=1000, sus=0.05, pan=0, width=0.5, filter=22000, hiPass=20, vol=1| var holdT = sus * width; var fadeT = 1 - width * sus * 0.5; var snd = HPF.ar((LPF.ar((PlayBuf.ar(1, b, Line.ar((rate*BufRateScale.kr(b)), (rate*BufRateScale.kr(b)*bend), (fadeT*2+holdT)), 1, pos, 0, 2)), filter)),hiPass); var env = EnvGen.ar(Env([0, 1, 1, 0], [fadeT, holdT, fadeT], \sin), levelScale: amp, doneAction: 2); var kak = Pan2.ar(snd * env, pan, vol); Out.ar(4, kak); OffsetOut.ar(0, kak); }, \ir ! 10).add; SynthDef(\bufPerc, { |amp=1, rate=1.0, bend=1.0, pos=1000, sus=0.05, pan=0, filter=22000, hiPass=20, vol=1| var snd = HPF.ar((LPF.ar((PlayBuf.ar(1, b, Line.ar((rate*BufRateScale.kr(b)), (rate*BufRateScale.kr(b)*bend), sus), 1, pos, 0, 2)), filter)),hiPass); var env = EnvGen.ar( Env.perc(0.1, 0.9, amp), timeScale: sus, doneAction: 2); var kak = Pan2.ar(snd * env, pan, vol); Out.ar(4, kak); OffsetOut.ar(0, kak); }, \ir ! 9).add; SynthDef(\bufPercRev, { |amp=0.1, rate=1.0, bend=1.0, pos=1, sus=0.05, pan=0, filter=22000, hiPass=20, vol=1| var snd = HPF.ar((LPF.ar((PlayBuf.ar(1, b, Line.ar((rate*BufRateScale.kr(b)), (rate*BufRateScale.kr(b)*bend), sus), 1, pos, 0, 2)), filter)),hiPass); var env = EnvGen.ar( Env.perc(0.9, 0.1, amp, 4), timeScale: sus, doneAction: 2); var kak = Pan2.ar(snd * env, pan, vol); Out.ar(4, kak); OffsetOut.ar(0, kak); }, \ir ! 9).add; SynthDef(\Cator, { var imp, delimp, listen; imp = Impulse.kr(20); delimp = Delay1.kr(imp); listen = In.ar(4, 2); SendReply.kr(imp, '/levels', [Amplitude.kr(listen), K2A.ar(Peak.ar(listen, delimp).lag(0, 1))]); }).add; ); s.sync; defer{ ~w = Window("vOwel moGrains", Rect(400, 80, 830, 784)) .background = Color.white; //PAPA ~papa = CompositeView(~w, Rect(15, 15, 345, 754)) .background = Color.new255(190, 190, 190); ~pap = StaticText(~papa, Rect(10, 3, 325, 26)) .string = "PAPA"; ~pap.background = Color.new255(190, 190, 190); ~pap.align = \center; ~pap.font = Font("Abadi MT Condensed Extra Bold", 20); ~pap.stringColor = Color.white; ~papaLengthBak = CompositeView(~papa, Rect(8, 40, 318, 53)) .background = Color.new255(105, 105, 105); ~papaLengthWind = CompositeView(~papaLengthBak, Rect(3, 3, 312, 47)) .background = Color.white; ~spawnBak = CompositeView(~papa, Rect(8, 98, 318, 95)) .background = Color.new255(105, 105, 105); ~spawnWind = CompositeView(~spawnBak, Rect(3, 3, 312, 89)) .background = Color.white; ~papaPosBak = CompositeView(~papa, Rect(8, 198, 318, 74)) .background = Color.new255(105, 105, 105); ~papaPosWind = CompositeView(~papaPosBak, Rect(3, 3, 312, 68)) .background = Color.white; ~papaRateBak = CompositeView(~papa, Rect(8, 277, 318, 74)) .background = Color.new255(105, 105, 105); ~papaRateWind = CompositeView(~papaRateBak, Rect(3, 3, 312, 68)) .background = Color.white; ~papaFilterBak = CompositeView(~papa, Rect(8, 356, 318, 74)) .background = Color.new255(105, 105, 105); ~papaFilterWind = CompositeView(~papaFilterBak, Rect(3, 3, 312, 68)) .background = Color.white; ~papaDurBak = CompositeView(~papa, Rect(8, 435, 318, 74)) .background = Color.new255(105, 105, 105); ~papaDurWind = CompositeView(~papaDurBak, Rect(3, 3, 312, 68)) .background = Color.white; ~papaDensityBak = CompositeView(~papa, Rect(8, 514, 318, 74)) .background = Color.new255(105, 105, 105); ~papaDensityWind = CompositeView(~papaDensityBak, Rect(3, 3, 312, 68)) .background = Color.white; ~papaAmpBak = CompositeView(~papa, Rect(8, 593, 318, 74)) .background = Color.new255(105, 105, 105); ~papaAmpWind = CompositeView(~papaAmpBak, Rect(3, 3, 312, 68)) .background = Color.white; ~papaPanBak = CompositeView(~papa, Rect(8, 672, 318, 74)) .background = Color.new255(105, 105, 105); ~papaPanWind = CompositeView(~papaPanBak, Rect(3, 3, 312, 68)) .background = Color.white; //NICOLE ~nicole = CompositeView(~w, Rect(365, 15, 411, 754)) .background = Color.new255(190, 190, 190); ~nic = StaticText(~nicole, Rect(10, 3, 388, 26)) .string = "nicole"; ~nic.background = Color.new255(190, 190, 190); ~nic.align = \center; ~nic.font = Font("Abadi MT Condensed Extra Bold", 20); ~nic.stringColor = Color.white; ~nicoleLengthBak = CompositeView(~nicole, Rect(19, 40, 392, 74)) .background = Color.new255(105, 105, 105); ~nicoleLengthWind = CompositeView(~nicoleLengthBak, Rect(3, 3, 389, 68)) .background = Color.white; ~soundFile = CompositeView(~nicole, Rect(19, 119, 392, 74)) .background = Color.new255(105, 105, 105); ~soundFileBak = CompositeView(~soundFile, Rect(3, 3, 389, 68)) .background = Color.new255(190, 190, 190); ~view = SoundFileView.new(~soundFileBak, Rect(52, 0, 186, 68)).gridOn_(false); ~viewFile = SoundFile.new; ~viewFile.openRead(y); ~view.soundfile = ~viewFile; ~view.read(0, ~viewFile.numFrames); ~view.background = Color.white; ~view.backColor = Color.new255(190, 190, 190); ~view.refresh; ~extraBitH = CompositeView(~w, Rect(776, 205, 36, 3)) .background = Color.new255(105, 105, 105); ~extraBitV = CompositeView(~w, Rect(812, 205, 3, 600)) .background = Color.new255(105, 105, 105); ~posBak = CompositeView(~nicole, Rect(19, 198, 384, 74)) .background = Color.new255(105, 105, 105); ~posWind = CompositeView(~posBak, Rect(3, 3, 378, 68)) .background = Color.white; ~rateBak = CompositeView(~nicole, Rect(19, 277, 384, 74)) .background = Color.new255(105, 105, 105); ~rateWind = CompositeView(~rateBak, Rect(3, 3, 378, 68)) .background = Color.white; ~filterBak = CompositeView(~nicole, Rect(19, 356, 384, 74)) .background = Color.new255(105, 105, 105); ~filterWind = CompositeView(~filterBak, Rect(3, 3, 378, 68)) .background = Color.white; ~durBak = CompositeView(~nicole, Rect(19, 435, 384, 74)) .background = Color.new255(105, 105, 105); ~durWind = CompositeView(~durBak, Rect(3, 3, 378, 68)) .background = Color.white; ~densityBak = CompositeView(~nicole, Rect(19, 514, 384, 74)) .background = Color.new255(105, 105, 105); ~densityWind = CompositeView(~densityBak, Rect(3, 3, 378, 68)) .background = Color.white; ~ampBak = CompositeView(~nicole, Rect(19, 593, 384, 74)) .background = Color.new255(105, 105, 105); ~ampWind = CompositeView(~ampBak, Rect(3, 3, 378, 68)) .background = Color.white; ~panBak = CompositeView(~nicole, Rect(19, 672, 384, 74)) .background = Color.new255(105, 105, 105); ~panWind = CompositeView(~panBak, Rect(3, 3, 378, 68)) .background = Color.white; //LABELS ~nicLengthLabel = StaticText(~w, Rect(338, 83, 49, 18)) .string = "length"; ~nicLengthLabel.background = Color.new255(105, 105, 105); ~nicLengthLabel.align = \center; ~nicLengthLabel.font = Font("Helvetica Neue Bold Condensed", 12); ~nicLengthLabel.stringColor = Color.white; ~spawnLabel = StaticText(~w, Rect(338, 162, 49, 18)) .string = "DELTA"; ~spawnLabel.background = Color.new255(105, 105, 105); ~spawnLabel.align = \center; ~spawnLabel.font = Font("Helvetica Neue Bold Condensed", 12); ~spawnLabel.stringColor = Color.white; ~posLabel = StaticText(~w, Rect(338, 241, 49, 18)) .string = "pos"; ~posLabel.background = Color.new255(105, 105, 105); ~posLabel.align = \center; ~posLabel.font = Font("Helvetica Neue Bold Condensed", 13); ~posLabel.stringColor = Color.white; ~rateLabel = StaticText(~w, Rect(338, 320, 49, 18)) .string = "rate"; ~rateLabel.background = Color.new255(105, 105, 105); ~rateLabel.align = \center; ~rateLabel.font = Font("Helvetica Neue Bold Condensed", 13); ~rateLabel.stringColor = Color.white; ~filterLabel = StaticText(~w, Rect(338, 399, 49, 18)) .string = "filter"; ~filterLabel.background = Color.new255(105, 105, 105); ~filterLabel.align = \center; ~filterLabel.font = Font("Helvetica Neue Bold Condensed", 13); ~filterLabel.stringColor = Color.white; ~durLabel = StaticText(~w, Rect(338, 478, 49, 18)) .string = "dur"; ~durLabel.background = Color.new255(105, 105, 105); ~durLabel.align = \center; ~durLabel.font = Font("Helvetica Neue Bold Condensed", 13); ~durLabel.stringColor = Color.white; ~densityLabel = StaticText(~w, Rect(338, 557, 49, 18)) .string = "delta"; ~densityLabel.background = Color.new255(105, 105, 105); ~densityLabel.align = \center; ~densityLabel.font = Font("Helvetica Neue Bold Condensed", 13); ~densityLabel.stringColor = Color.white; ~ampLabel = StaticText(~w, Rect(338, 636, 49, 18)) .string = "amp"; ~ampLabel.background = Color.new255(105, 105, 105); ~ampLabel.align = \center; ~ampLabel.font = Font("Helvetica Neue Bold Condensed", 13); ~ampLabel.stringColor = Color.white; ~panLabel = StaticText(~w, Rect(338, 715, 49, 18)) .string = "pan"; ~panLabel.background = Color.new255(105, 105, 105); ~panLabel.align = \center; ~panLabel.font = Font("Helvetica Neue Bold Condensed", 13); ~panLabel.stringColor = Color.white; ~w.front; //PAPA ~papaCentre = EZSlider(~papaLengthWind, Rect(2, 5, 300, 16), "centr", ControlSpec(0.01, 100.0, \exp, 0.001, 100, nil), {|sl| ~papaCentreV = sl.value}, labelWidth:45); ~bendRanger = EZRanger(~papaLengthWind, Rect(2, 26, 289, 16), " ", ControlSpec(0.25, 4.0, \exp, 0.001), {|sl| ~bendRangerL = sl.lo.value; ~bendRangerH = sl.hi.value}, [1,1], labelWidth:10, numberWidth:34); ~bendLabel = StaticText(~papaLengthWind, Rect(294, 26, 16, 16)) .string = "Ƅ"; ~bendLabel.background = Color.white; ~bendLabel.align = \left; ~bendLabel.stringColor = Color.black; ~spawnCentre = EZSlider(~spawnWind, Rect(2, 5, 300, 16), "centr", ControlSpec(0.01, 10.0, \exp, 0.001, 1.0, nil), {|sl| ~spawnCentreV = sl.value}, labelWidth:45); ~spawnSlope = EZSlider(~spawnWind, Rect(2, 26, 300, 16), "shift", ControlSpec(-0.5, 0.5, \lin, 0.001, 0, nil), {|sl| ~spawnSlopeV = sl.value}, labelWidth:45); ~spawnDev = EZSlider(~spawnWind, Rect(2, 47, 300, 16), "dev", ControlSpec(0.0, 1.0, \lin, 0.001, 0, nil), {|sl| ~spawnDevV = sl.value}, labelWidth:45); ~spawnStep = EZSlider(~spawnWind, Rect(2, 68, 300, 16), "step", ControlSpec(0.0, 0.5, \lin, 0.001, 0, nil), {|sl| ~spawnStepV = sl.value}, labelWidth:45); ~posStep = EZSlider(~papaPosWind, Rect(2, 5, 300, 16), "step", ControlSpec(0.0, 2205, \lin, 1, 0, nil), {|sl| ~posStepV = sl.value}, labelWidth:45); ~papaPosSlope = EZSlider(~papaPosWind, Rect(2, 26, 300, 16), "shift∆", ControlSpec(-2205, 2205, \lin, 1, 0, nil), {|sl| ~papaPosSlopeV = sl.value}, labelWidth:45); ~spawnPosDevScaler = EZSlider(~papaPosWind, Rect(2, 47, 300, 16), "dev∆", ControlSpec(-2205, 2205, \lin, 1, 0, nil), {|sl| ~spawnPosDevScalerV = sl.value}, labelWidth:45); ~rateStep = EZSlider(~papaRateWind, Rect(21, 5, 281, 16), "step", ControlSpec(0.0, 0.5, \lin, 0.001, 0.0, nil), {|sl| ~rateStepV = sl.value}, labelWidth:26); ~papaRateSlope = EZSlider(~papaRateWind, Rect(2, 26, 300, 16), "shift∆", ControlSpec(0.0, 1.0, \lin, 0.001, 0, nil), {|sl| ~papaRateSlopeV = sl.value}, labelWidth:45); ~spawnRateDevScaler = EZSlider(~papaRateWind, Rect(2, 47, 300, 16), "dev∆", ControlSpec(-0.25, 0.25, \lin, 0.001, 0, nil), {|sl| ~spawnRateDevScalerV = sl.value}, labelWidth:45); ~papaRateSlopeControl = Button(~papaRateWind, Rect(3, 5, 15, 15 )) .states_([[">", Color.black, Color.white],["<", Color.black, Color.white]]) .action_({~papaRateSlopeSwitch = ~papaRateSlopeDir.at(~papaRateSlopeControl.value)}); ~papaRateSlopeControl.value = 0; ~papaRateSlopeDir = [1,-1]; ~papaRateSlopeSwitch = ~papaRateSlopeDir.at(~papaRateSlopeControl.value); ~filterStep = EZSlider(~papaFilterWind, Rect(21, 5, 281, 16), "step", ControlSpec(0, 2000, \lin, 1, 0, nil), {|sl| ~filterStepV = sl.value}, labelWidth:26); ~papaFilterSlope = EZSlider(~papaFilterWind, Rect(2, 26, 300, 16), "shift∆", ControlSpec(0.0, 1, \lin, 0.001, 0, nil), {|sl| ~papaFilterSlopeV = sl.value}, labelWidth:45); ~spawnFilterDevScaler = EZSlider(~papaFilterWind, Rect(2, 47, 300, 16), "dev∆", ControlSpec(-0.25, 0.25, \lin, 0.001, 0, nil), {|sl| ~spawnFilterDevScalerV = sl.value}, labelWidth:45); ~papaFilterSlopeControl = Button(~papaFilterWind, Rect(3, 5, 15, 15 )) .states_([[">", Color.black, Color.white],["<", Color.black, Color.white]]) .action_({~papaFilterSlopeSwitch = ~papaFilterSlopeDir.at(~papaFilterSlopeControl.value)}); ~papaFilterSlopeControl.value = 0; ~papaFilterSlopeDir = [1,-1]; ~papaFilterSlopeSwitch = ~papaFilterSlopeDir.at(~papaFilterSlopeControl.value); ~durStep = EZSlider(~papaDurWind, Rect(2, 5, 300, 16), "step", ControlSpec(0.0, 0.10, \lin, 0.001, 0, nil), {|sl| ~durStepV = sl.value}, labelWidth:45); ~papaDurSlope = EZSlider(~papaDurWind, Rect(2, 26, 300, 16), "shift∆", ControlSpec(-0.10, 0.10, \lin, 0.001, 0, nil), {|sl| ~papaDurSlopeV = sl.value}, labelWidth:45); ~spawnDurDevScaler = EZSlider(~papaDurWind, Rect(2, 47, 300, 16), "dev∆", ControlSpec(-0.10, 0.10, \lin, 0.001, 0, nil), {|sl| ~spawnDurDevScalerV = sl.value}, labelWidth:45); ~densityStep = EZSlider(~papaDensityWind, Rect(2, 5, 300, 16), "step", ControlSpec(0.0, 0.10, \lin, 0.001, 0, nil), {|sl| ~densityStepV = sl.value}, labelWidth:45); ~papaDensitySlope = EZSlider(~papaDensityWind, Rect(2, 26, 300, 16), "shift∆", ControlSpec(-0.10, 0.10, \lin, 0.001, 0, nil), {|sl| ~papaDensitySlopeV = sl.value}, labelWidth:45); ~spawnDensityDevScaler = EZSlider(~papaDensityWind, Rect(2, 47, 300, 16), "dev∆", ControlSpec(-0.10, 0.10, \lin, 0.001, 0, nil), {|sl| ~spawnDensityDevScalerV = sl.value}, labelWidth:45); ~ampStep = EZSlider(~papaAmpWind, Rect(2, 5, 300, 16), "step", ControlSpec(0.0, 0.50, \lin, 0.001, 0, nil), {|sl| ~ampStepV = sl.value}, labelWidth:45); ~papaAmpSlope = EZSlider(~papaAmpWind, Rect(2, 26, 300, 16), "shift∆", ControlSpec(-0.50, 0.50, \lin, 0.001, 0, nil), {|sl| ~papaAmpSlopeV = sl.value}, labelWidth:45); ~spawnAmpDevScaler = EZSlider(~papaAmpWind, Rect(2, 47, 300, 16), "dev∆", ControlSpec(-0.50, 0.50, \lin, 0.001, 0, nil), {|sl| ~spawnAmpDevScalerV = sl.value}, labelWidth:45); ~panStep = EZSlider(~papaPanWind, Rect(2, 5, 300, 16), "step", ControlSpec(0.0, 1.0, \lin, 0.001, 0, nil), {|sl| ~panStepV = sl.value}, labelWidth:45); ~papaPanSlope = EZSlider(~papaPanWind, Rect(2, 26, 300, 16), "shift∆", ControlSpec(-0.50, 0.50, \lin, 0.001, 0, nil), {|sl| ~papaPanSlopeV = sl.value}, labelWidth:45); ~spawnPanDevScaler = EZSlider(~papaPanWind, Rect(2, 47, 300, 16), "dev∆", ControlSpec(-0.50, 0.50, \lin, 0.001, 0, nil), {|sl| ~spawnPanDevScalerV = sl.value}, labelWidth:45); //NICOLE ~nicCentre = EZSlider(~nicoleLengthWind, Rect(2, 5, 293, 16), "centr", ControlSpec(0.01, 100.0, \exp, 0.001, 0.85, nil), {|sl| ~nicLengthV = sl.value}, labelWidth:38); ~nicSlope = EZSlider(~nicoleLengthWind, Rect(2, 26, 293, 16), "shift", ControlSpec(-1.00, 1.00, \lin, 0.001, 0, nil), {|sl| ~nicSlopeV = sl.value}, labelWidth:38); ~nicDev = EZSlider(~nicoleLengthWind, Rect(2, 47, 293, 16), "dev", ControlSpec(0.0, 5.0, \lin, 0.001, 0, nil), {|sl| ~nicDevV = sl.value}, labelWidth:38); ~moLabel = StaticText(~w, Rect(685, 63, 125, 40)) .string = "moGrains"; ~moLabel.background = Color.white; ~moLabel.align = \center; ~moLabel.font = Font("Cracked", 35); ~moLabel.stringColor = Color.black; //Color.new255(105, 105, 105); ~envLabel = StaticText(~soundFileBak, Rect(303, 2, 66, 14)) .string = "envelope"; ~envLabel.background = Color.new255(190, 190, 190); ~envLabel.align = \center; ~envLabel.font = Font("Helvetica Neue Bold Condensed", 12); ~envLabel.stringColor = Color.white; ~envGab = PatternProxy(\bufGab); ~envWide = PatternProxy(\bufWide); ~envPerc = PatternProxy(\bufPerc); ~envcreP = PatternProxy(\bufPercRev); ~envChoice = [~envGab, ~envWide, ~envPerc, ~envcreP]; ~envShape = PopUpMenu.new(~soundFileBak, Rect(303, 18, 66, 16)) .items_(["Gab", "Wide", "Perc", "creP"]) .action_( { |menu| ~envPop.source = ~envChoice.at(menu.value)} ); ~envShape.value = 0; ~envPop = PatternProxy(\bufGab); ~spawnRandom = PatternProxy(Pfunc{ |e| e.spawnRand}); ~spawnGaussian = PatternProxy(Pfunc{ |e| e.spawnGauss}); ~spawnBrownian = PatternProxy(Pfunc{ |e| e.spawnBrown}); ~spawnChoice = [~spawnRandom, ~spawnGaussian, ~spawnBrownian]; ~spawnDevShape = PopUpMenu.new(~soundFileBak, Rect(303, 47, 66, 16)) .items_(["Rand", "Gauss", "Brown"]) .action_( { |menu| ~spawnPop.source = ~spawnChoice.at(menu.value)} ); ~spawnDevShape.value = 0; ~spawnPop = PatternProxy(Pfunc{ |e| e.spawnRand}); ~posCentre = EZSlider(~posWind, Rect(2, 5, 293, 16), "centr", ControlSpec(0, a, \lin, 1, a/2, nil), {|sl| ~posCentreV = sl.value}, labelWidth:38); ~posSlope = EZSlider(~posWind, Rect(2, 26, 293, 16), "shift", ControlSpec(-4410, 4410, \lin, 1, 0, nil), {|sl| ~posSlopeV = sl.value}, labelWidth:38); ~posDev = EZSlider(~posWind, Rect(2, 47, 293, 16), "dev", ControlSpec(0, a, \lin, 1, 0, nil), {|sl| ~posDevV = sl.value}, labelWidth:38); ~posRandom = PatternProxy(Pfunc{ |e| e.posPatternRand}); ~posGaussian = PatternProxy(Pfunc{ |e| e.posPatternGauss}); ~posBrownian = PatternProxy(Pfunc{ |e| e.posPatternBrown}); ~posChoice = [~posRandom, ~posGaussian, ~posBrownian]; ~posDevShape = PopUpMenu.new(~posWind, Rect(303, 47, 66, 16)) .items_(["Rand", "Gauss", "Brown"]) .action_( { |menu| ~posPop.source = ~posChoice.at(menu.value)} ); ~posDevShape.value = 0; ~posPop = PatternProxy(Pfunc{ |e| e.posPatternRand}); ~rateCentre = EZSlider(~rateWind, Rect(2, 5, 293, 16), "centr", ControlSpec(0.125, 8.0, \exp, 0.001, 1, nil), {|sl| ~rateCentreV = sl.value}, labelWidth:38); ~rateSlope = EZSlider(~rateWind, Rect(2, 26, 293, 16), "shift", ControlSpec(0.0, 1.0, \lin, 0.001, 0, nil), {|sl| ~rateSlopeV = sl.value}, labelWidth:38); ~rateDev = EZSlider(~rateWind, Rect(2, 47, 293, 16), "dev", ControlSpec(0, 1.0, \lin, 0.001, 0, nil), {|sl| ~rateDevV = sl.value}, labelWidth:38); ~rateSlopeControl = Button(~rateWind, Rect(303, 27, 15, 15 )) .states_([[">", Color.black, Color.white],["<", Color.black, Color.white]]) .action_({~rateSlopeSwitch = ~rateSlopeDir.at(~rateSlopeControl.value)}); ~rateSlopeControl.value = 0; ~rateSlopeDir = [1,-1]; ~rateSlopeSwitch = ~rateSlopeDir.at(~rateSlopeControl.value); ~rateDirControl = Button(~rateWind, Rect(326, 5, 44, 37 )) .states_([["⫸", Color.black, Color.white],["⫷", Color.black, Color.white]]) .action_({~rateDirSwitch = ~dir.at(~rateDirControl.value)}); ~rateDirControl.value = 0; ~dir = [1,-1]; ~rateDirSwitch = ~dir.at(~rateDirControl.value); ~rateRandom = PatternProxy(Pfunc{ |e| e.ratePatternRand}); ~rateGaussian = PatternProxy(Pfunc{ |e| e.ratePatternGauss}); ~rateBrownian = PatternProxy(Pfunc{ |e| e.ratePatternBrown}); ~rateChoice = [~rateRandom, ~rateGaussian, ~rateBrownian]; ~rateDevShape = PopUpMenu.new(~rateWind, Rect(303, 47, 67, 16)) .items_(["Rand", "Gauss", "Brown"]) .action_( { |menu| ~ratePop.source = ~rateChoice.at(menu.value)} ); ~rateDevShape.value = 0; ~ratePop = PatternProxy(Pfunc{ |e| e.ratePatternRand}); ~filterCentre = EZSlider(~filterWind, Rect(2, 5, 293, 16), "centr", ControlSpec(20, 20000, \exp, 1, 20000, nil), {|sl| ~filterCentreV = sl.value}, labelWidth:38); ~filterSlope = EZSlider(~filterWind, Rect(2, 26, 293, 16), "shift", ControlSpec(0, 1, \lin, 0.001, 0, nil), {|sl| ~ampSlopeV = sl.value}, labelWidth:38); ~filterDev = EZSlider(~filterWind, Rect(2, 47, 293, 16), "dev", ControlSpec(0, 8.0, \lin, 0.001, 0, nil), {|sl| ~filterDevV = sl.value}, labelWidth:38); ~filterSlopeControl = Button(~filterWind, Rect(303, 26, 15, 15 )) .states_([[">", Color.black, Color.white],["<", Color.black, Color.white]]) .action_({~filterSlopeSwitch = ~filterSlopeDir.at(~filterSlopeControl.value)}); ~filterSlopeControl.value = 0; ~filterSlopeDir = [1,-1]; ~filterSlopeSwitch = ~filterSlopeDir.at(~filterSlopeControl.value); ~hiPass = EZKnob(~filterWind, Rect(330, 7, 36, 36), nil, ControlSpec(20, 22000, \exp, 1, 20, nil), {|sl| ~hiPassV = sl.value}, nil, unitWidth: 0, labelHeight: 0); ~filterRandom = PatternProxy(Pfunc{ |e| e.filterPatternRand}); ~filterGaussian = PatternProxy(Pfunc{ |e| e.filterPatternGauss}); ~filterBrownian = PatternProxy(Pfunc{ |e| e.filterPatternBrown}); ~filterChoice = [~filterRandom, ~filterGaussian, ~filterBrownian]; ~filterDevShape = PopUpMenu.new(~filterWind, Rect(303, 47, 66, 16)) .items_(["Rand", "Gauss", "Brown"]) .action_( { |menu| ~filterPop.source = ~filterChoice.at(menu.value)} ); ~filterDevShape.value = 0; ~filterPop = PatternProxy(Pfunc{ |e| e.filterPatternRand}); ~durCentre = EZSlider(~durWind, Rect(2, 5, 293, 16), "centr", ControlSpec(0.001, 1.0, \exp, 0.001, 0.1, nil), {|sl| ~durCentreV = sl.value}, labelWidth:38); ~durSlope = EZSlider(~durWind, Rect(2, 26, 293, 16), "shift", ControlSpec(-0.02, 0.02, \lin, 0.001, 0, nil), {|sl| ~durSlopeV = sl.value}, labelWidth:38); ~durDev = EZSlider(~durWind, Rect(2, 47, 293, 16), "dev", ControlSpec(0.0, 0.10, \lin, 0.001, 0, nil), {|sl| ~durDevV = sl.value}, labelWidth:38); ~durRandom = PatternProxy(Pfunc{ |e| e.durPatternRand}); ~durGaussian = PatternProxy(Pfunc{ |e| e.durPatternGauss}); ~durBrownian = PatternProxy(Pfunc{ |e| e.durPatternBrown}); ~durChoice = [~durRandom, ~durGaussian, ~durBrownian]; ~durDevShape = PopUpMenu.new(~durWind, Rect(303, 47, 66, 16)) .items_(["Rand", "Gauss", "Brown"]) .action_( { |menu| ~durPop.source = ~durChoice.at(menu.value)} ); ~durDevShape.value = 0; ~durPop = PatternProxy(Pfunc{ |e| e.durPatternRand}); ~densityCentre = EZSlider(~densityWind, Rect(2, 5, 293, 16), "centr", ControlSpec(0.001, 1.0, \exp, 0.001, 0.1, nil), {|sl| ~densityCentreV = sl.value}, labelWidth:38); ~densitySlope = EZSlider(~densityWind, Rect(2, 26, 293, 16), "shift", ControlSpec(-0.010, 0.010, \lin, 0.001, 0, nil), {|sl| ~densitySlopeV = sl.value}, labelWidth:38); ~densityDev = EZSlider(~densityWind, Rect(2, 47, 293, 16), "dev", ControlSpec(0.0, 0.50, \lin, 0.001, 0, nil), {|sl| ~densityDevV = sl.value}, labelWidth:38); ~densityRandom = PatternProxy(Pfunc{ |e| e.densityPatternRand}); ~densityGaussian = PatternProxy(Pfunc{ |e| e.densityPatternGauss}); ~densityBrownian = PatternProxy(Pfunc{ |e| e.densityPatternBrown}); ~densityChoice = [~densityRandom, ~densityGaussian, ~densityBrownian]; ~densityDevShape = PopUpMenu.new(~densityWind, Rect(303, 47, 66, 16)) .items_(["Rand", "Gauss", "Brown"]) .action_( { |menu| ~densityPop.source = ~densityChoice.at(menu.value)} ); ~densityDevShape.value = 0; ~densityPop = PatternProxy(Pfunc{ |e| e.densityPatternRand}); ~ampCentre = EZSlider(~ampWind, Rect(2, 5, 293, 16), "centr", ControlSpec(0.0, 1.0, \lin, 0.001, 0.8, nil), {|sl| ~ampCentreV = sl.value}, labelWidth:38); ~ampSlope = EZSlider(~ampWind, Rect(2, 26, 293, 16), "shift", ControlSpec(-0.20, 0.20, \lin, 0.001, 0, nil), {|sl| ~ampSlopeV = sl.value}, labelWidth:38); ~ampDev = EZSlider(~ampWind, Rect(2, 47, 293, 16), "dev", ControlSpec(0.0, 1.0, \lin, 0.001, 0, nil), {|sl| ~ampDevV = sl.value}, labelWidth:38); ~ampRandom = PatternProxy(Pfunc{ |e| e.ampPatternRand}); ~ampGaussian = PatternProxy(Pfunc{ |e| e.ampPatternGauss}); ~ampBrownian = PatternProxy(Pfunc{ |e| e.ampPatternBrown}); ~ampChoice = [~ampRandom, ~ampGaussian, ~ampBrownian]; ~ampDevShape = PopUpMenu.new(~ampWind, Rect(303, 47, 66, 16)) .items_(["Rand", "Gauss", "Brown"]) .action_( { |menu| ~ampPop.source = ~ampChoice.at(menu.value)} ); ~ampDevShape.value = 0; ~ampPop = PatternProxy(Pfunc{ |e| e.ampPatternRand}); ~panCentre = EZSlider(~panWind, Rect(2, 5, 293, 16), "centr", ControlSpec(-1.0, 1.0, \lin, 0.001, 0, nil), {|sl| ~panCentreV = sl.value}, labelWidth:38); ~panSlope = EZSlider(~panWind, Rect(2, 26, 293, 16), "shift", ControlSpec(-0.10, 0.10, \lin, 0.001, 0, nil), {|sl| ~panSlopeV = sl.value}, labelWidth:38); ~panDev = EZSlider(~panWind, Rect(2, 47, 293, 16), "dev", ControlSpec(0.0, 1.0, \lin, 0.001, 0, nil), {|sl| ~panDevV = sl.value}, labelWidth:38); ~panRandom = PatternProxy(Pfunc{ |e| e.panPatternRand}); ~panGaussian = PatternProxy(Pfunc{ |e| e.panPatternGauss}); ~panBrownian = PatternProxy(Pfunc{ |e| e.panPatternBrown}); ~panChoice = [~panRandom, ~panGaussian, ~panBrownian]; ~panDevShape = PopUpMenu.new(~panWind, Rect(303, 47, 66, 16)) .items_(["Rand", "Gauss", "Brown"]) .action_( { |menu| ~panPop.source = ~panChoice.at(menu.value)} ); ~panDevShape.value = 0; ~panPop = PatternProxy(Pfunc{ |e| e.panPatternRand}); //MASTER ~masterButton = Button(~w, Rect(784, 214, 20, 72)); ~masterButton.states_([["O", Color.black, Color.white],["O", Color.white, Color.yellow]]); ~masterButton.action = {|view| if (view.value==1) { x=Synth(\Cator); t=q.play} { ~levelIndicator.value=0;x.free; t.stop} }; ~masterButton.value=0; ~recordButton = Button(~w, Rect(784, 293, 20, 72)); ~recordButton.states_([["R", Color.black, Color.white],["R", Color.white, Color.red]]); ~recordButton.action = {|view| if (view.value==1) {s.record} {s.stopRecording}}; ~recordButton.value=0; ~masterVolume = SmoothSlider(~w, Rect(784, 372, 20, 151)).value_(0.4); ~levelIndicator = LevelIndicator(~w, Rect(784, 530, 20, 239)); o = OSCFunc({arg msg; { ~levelIndicator.value = msg[3].ampdb.linlin(-40, 0, 0, 1); ~levelIndicator.peakLevel = msg[4].ampdb.linlin(-40, 0, 0, 1); }.defer; }, '/levels', s.addr); ~levelIndicator.warning = -6.dbamp; ~levelIndicator.critical = -3.dbamp; ~levelIndicator.value=0; }; s.sync; ( p = Pbind( \instrument, ~envPop, \serial, Pseries(0,1,inf), \bend, Pfunc{ exprand(~bendRanger.lo.value, ~bendRanger.hi.value)}, \posSeries, (Pfunc{~posCentre.value} + (Pfunc{~posSlope.value} * Pkey(\serial))).clip(0,a), \rateSeriesUp, Pfunc{~rateCentre.value} * (Pfunc{~rateSlope.value} * Pkey(\serial) + 1), \rateSeriesDown, Pfunc{~rateCentre.value} / (Pfunc{~rateSlope.value} * Pkey(\serial) +1), \rateSeries, Pif (Pfunc{~rateSlopeSwitch} > 0, Pkey(\rateSeriesUp), Pkey(\rateSeriesDown)), \filterSeriesUp, (Pfunc{~filterCentre.value} * (Pfunc{~filterSlope.value} * Pkey(\serial) + 1)).clip(20,20000), \filterSeriesDown, (Pfunc{~filterCentre.value} / (Pfunc{~filterSlope.value} * Pkey(\serial) +1)).clip(20,20000), \filterSeries, Pif (Pfunc{~filterSlopeSwitch} > 0, Pkey(\filterSeriesUp), Pkey(\filterSeriesDown)), \hiPass, Pfunc{~hiPass.value}, \durSeries, (Pfunc{~durCentre.value} + (Pfunc{~durSlope.value} * Pkey(\serial))).max(0.001), \densitySeries, (Pfunc{~densityCentre.value} + (Pfunc{~densitySlope.value} * Pkey(\serial))).max(0.001), \ampSeries, (Pfunc{~ampCentre.value} + (Pfunc{~ampSlope.value} * Pkey(\serial))).clip(0,1), \panSeries, (Pfunc{~panCentre.value} + (Pfunc{~panSlope.value} * Pkey(\serial))).clip(-1,1), \vol, Pfunc{~masterVolume.value}*2.5, ); q = Pspawn( Pbind( \spawnSerial, Pif(Ptime(inf) < Pfunc{~papaCentre.value}, Pseries(0,1,inf)), \nicSeries, Pfunc{ |e| Pfunc{~nicCentre.value} + (Pfunc{~nicSlope.value} * e.spawnSerial)}, \nicLength, Pfunc{ |e| rrand(e.nicSeries - Pfunc{~nicDev.value}, e.nicSeries + Pfunc{~nicDev.value}).max(0.01)}, \posRand, Pfunc{ |e| rrand(Pkey(\posSeries) - (Pfunc{~posDev.value} + (Pfunc{~spawnPosDevScaler.value} * e.spawnSerial)), Pkey(\posSeries) + (Pfunc{~posDev.value} + (Pfunc{~spawnPosDevScaler.value} * e.spawnSerial))).clip(0,a)}, \posGauss, Pfunc{ |e| (Pgauss( Pkey(\posSeries), (Pfunc{~posDev.value} + (Pfunc{~spawnPosDevScaler.value} * e.spawnSerial)), inf )).clip(0,a)}, \posBrown, Pfunc{ |e| (Pbrown( Pkey(\posSeries) - (Pfunc{~posDev.value} + (Pfunc{~spawnPosDevScaler.value} * e.spawnSerial)), Pkey(\posSeries) + (Pfunc{~posDev.value} + (Pfunc{~spawnPosDevScaler.value} * e.spawnSerial)), Pfunc{~posStep.value}, inf )).clip(0,a)}, \posPatternRand, Pfunc{ |e| (e.posRand + (Pfunc{~papaPosSlope.value} * e.spawnSerial)).clip(0,a)}, \posPatternBrown, Pfunc{ |e| (e.posBrown + (Pfunc{~papaPosSlope.value} * e.spawnSerial)).clip(0,a)}, \posPatternGauss, Pfunc{ |e| (e.posGauss + (Pfunc{~papaPosSlope.value} * e.spawnSerial)).clip(0,a)}, \posPattChoose, ~posPop, \rateRand, Pfunc{ |e| exprand(Pkey(\rateSeries) / (Pfunc{~rateDev.value} + (Pfunc{~spawnRateDevScaler.value} * e.spawnSerial + 1)), Pkey(\rateSeries) * (Pfunc{~rateDev.value} + (Pfunc{~spawnRateDevScaler.value} * e.spawnSerial + 1))).max(0.125)}, \rateGauss, Pfunc{ |e| (Pgauss( Pkey(\rateSeries), (Pfunc{~rateDev.value} + (Pfunc{~spawnRateDevScaler.value} * e.spawnSerial)), inf)).max(0.125)}, \rateBrown, Pfunc{ |e| (Pbrown(Pkey(\rateSeries) / (Pfunc{~rateDev.value} + (Pfunc{~spawnRateDevScaler.value} * e.spawnSerial + 1)), Pkey(\rateSeries) * (Pfunc{~rateDev.value} + (Pfunc{~spawnRateDevScaler.value} * e.spawnSerial + 1)), Pfunc{~rateStep.value}, inf)).max(0.125)}, \ratePatternRandUp, Pfunc{ |e| e.rateRand * (Pfunc{~papaRateSlope.value} * e.spawnSerial +1)}, \ratePatternRandDown, Pfunc{ |e| e.rateRand / (Pfunc{~papaRateSlope.value} * e.spawnSerial +1)}, \ratePatternRand, Pif (Pfunc{~papaRateSlopeSwitch} > 0, Pfunc{ |e| e.ratePatternRandUp * ~rateDirSwitch}, Pfunc{ |e| e.ratePatternRandDown * ~rateDirSwitch}), \ratePatternGaussUp, Pfunc{ |e| e.rateGauss * (Pfunc{~papaRateSlope.value} * e.spawnSerial +1)}, \ratePatternGaussDown, Pfunc{ |e| e.rateGauss / (Pfunc{~papaRateSlope.value} * e.spawnSerial +1)}, \ratePatternGauss, Pif (Pfunc{~papaRateSlopeSwitch} > 0, Pfunc{ |e| e.ratePatternGaussUp * ~rateDirSwitch}, Pfunc{ |e| e.ratePatternGaussDown * ~rateDirSwitch}), \ratePatternBrownUp, Pfunc{ |e| e.rateBrown * (Pfunc{~papaRateSlope.value} * e.spawnSerial +1)}, \ratePatternBrownDown, Pfunc{ |e| e.rateBrown / (Pfunc{~papaRateSlope.value} * e.spawnSerial +1)}, \ratePatternBrown, Pif (Pfunc{~papaRateSlopeSwitch} > 0, Pfunc{ |e| e.ratePatternBrownUp * ~rateDirSwitch}, Pfunc{ |e| e.ratePatternBrownDown * ~rateDirSwitch}), \ratePattChoose, ~ratePop, \filterRand, Pfunc{ |e| exprand(Pkey(\filterSeries) / (Pfunc{~filterDev.value} + (Pfunc{~spawnFilterDevScaler.value} * e.spawnSerial + 1)), Pkey(\filterSeries) * (Pfunc{~filterDev.value} + (Pfunc{~spawnFilterDevScaler.value} * e.spawnSerial + 1))).clip(20,20000)}, \filterGauss, Pfunc{ |e| (Pgauss( Pkey(\filterSeries), (Pkey(\filterSeries)*(Pfunc{~filterDev.value} + (Pfunc{~spawnFilterDevScaler.value} * e.spawnSerial))), inf)).clip(20,20000)}, \filterBrown, Pfunc{ |e| (Pbrown(Pkey(\filterSeries) / (Pfunc{~filterDev.value} + (Pfunc{~spawnFilterDevScaler.value} * e.spawnSerial + 1)), Pkey(\filterSeries) * (Pfunc{~filterDev.value} + (Pfunc{~spawnFilterDevScaler.value} * e.spawnSerial + 1)), Pfunc{~filterStep.value}, inf)).clip(20,20000)}, \filterPatternRandUp, Pfunc{ |e| (e.filterRand * (Pfunc{~papaFilterSlope.value} * e.spawnSerial +1)).clip(20,20000)}, \filterPatternRandDown, Pfunc{ |e| (e.filterRand / (Pfunc{~papaFilterSlope.value} * e.spawnSerial +1)).clip(20,20000)}, \filterPatternRand, Pif (Pfunc{~papaFilterSlopeSwitch} > 0, Pfunc{ |e| e.filterPatternRandUp}, Pfunc{ |e| e.filterPatternRandDown}), \filterPatternGaussUp, Pfunc{ |e| (e.filterGauss * (Pfunc{~papaFilterSlope.value} * e.spawnSerial +1)).clip(20,20000)}, \filterPatternGaussDown, Pfunc{ |e| (e.filterGauss / (Pfunc{~papaFilterSlope.value} * e.spawnSerial +1)).clip(20,20000)}, \filterPatternGauss, Pif (Pfunc{~papaFilterSlopeSwitch} > 0, Pfunc{ |e| e.filterPatternGaussUp}, Pfunc{ |e| e.filterPatternGaussDown}), \filterPatternBrownUp, Pfunc{ |e| (e.filterBrown * (Pfunc{~papaFilterSlope.value} * e.spawnSerial +1)).clip(20,20000)}, \filterPatternBrownDown, Pfunc{ |e| (e.filterBrown / (Pfunc{~papaFilterSlope.value} * e.spawnSerial +1)).clip(20,20000)}, \filterPatternBrown, Pif (Pfunc{~papaFilterSlopeSwitch} > 0, Pfunc{ |e| e.filterPatternBrownUp}, Pfunc{ |e| e.filterPatternBrownDown}), \filterPattChoose, ~filterPop, \durRand, Pfunc{ |e| rrand(Pkey(\durSeries) - (Pfunc{~durDev.value} + (Pfunc{~spawnDurDevScaler.value} * e.spawnSerial)), Pkey(\durSeries) + (Pfunc{~durDev.value} + (Pfunc{~spawnDurDevScaler.value} * e.spawnSerial))).max(0.001)}, \durGauss, Pfunc{ |e| (Pgauss( Pkey(\durSeries), (Pfunc{~durDev.value} + (Pfunc{~spawnDurDevScaler.value} * e.spawnSerial)), inf )).max(0.001)}, \durBrown, Pfunc{ |e| (Pbrown( Pkey(\durSeries) - (Pfunc{~durDev.value} + (Pfunc{~spawnDurDevScaler.value} * e.spawnSerial)), Pkey(\durSeries) + (Pfunc{~durDev.value} + (Pfunc{~spawnDurDevScaler.value} * e.spawnSerial)), Pfunc{~durStep.value}, inf )).max(0.001)}, \durPatternRand, Pfunc{ |e| (e.durRand + (Pfunc{~papaDurSlope.value} * e.spawnSerial)).max(0.001)}, \durPatternBrown, Pfunc{ |e| (e.durBrown + (Pfunc{~papaDurSlope.value} * e.spawnSerial)).max(0.001)}, \durPatternGauss, Pfunc{ |e| (e.durGauss + (Pfunc{~papaDurSlope.value} * e.spawnSerial)).max(0.001)}, \durPattChoose, ~durPop, \densityRand, Pfunc{ |e| rrand(Pkey(\densitySeries) - (Pfunc{~densityDev.value} + (Pfunc{~spawnDensityDevScaler.value} * e.spawnSerial)), Pkey(\densitySeries) + (Pfunc{~densityDev.value} + (Pfunc{~spawnDensityDevScaler.value} * e.spawnSerial))).max(0.001)}, \densityGauss, Pfunc{ |e| (Pgauss( Pkey(\densitySeries), (Pfunc{~densityDev.value} + (Pfunc{~spawnDensityDevScaler.value} * e.spawnSerial)), inf )).max(0.001)}, \densityBrown, Pfunc{ |e| (Pbrown( Pkey(\densitySeries) - (Pfunc{~densityDev.value} + (Pfunc{~spawnDensityDevScaler.value} * e.spawnSerial)), Pkey(\densitySeries) + (Pfunc{~densityDev.value} + (Pfunc{~spawnDensityDevScaler.value} * e.spawnSerial)), Pfunc{~densityStep.value}, inf )).max(0.001)}, \densityPatternRand, Pfunc{ |e| (e.densityRand + (Pfunc{~papaDensitySlope.value} * e.spawnSerial)).max(0.001)}, \densityPatternBrown, Pfunc{ |e| (e.densityBrown + (Pfunc{~papaDensitySlope.value} * e.spawnSerial)).max(0.001)}, \densityPatternGauss, Pfunc{ |e| (e.densityGauss + (Pfunc{~papaDensitySlope.value} * e.spawnSerial)).max(0.001)}, \densityPattChoose, ~densityPop, \ampRand, Pfunc{ |e| rrand(Pkey(\ampSeries) - (Pfunc{~ampDev.value} + (Pfunc{~spawnAmpDevScaler.value} * e.spawnSerial)), Pkey(\ampSeries) + (Pfunc{~ampDev.value} + (Pfunc{~spawnAmpDevScaler.value} * e.spawnSerial))).clip(0,1)}, \ampGauss, Pfunc{ |e| (Pgauss( Pkey(\ampSeries), (Pfunc{~ampDev.value} + (Pfunc{~spawnAmpDevScaler.value} * e.spawnSerial)), inf )).clip(0,1)}, \ampBrown, Pfunc{ |e| (Pbrown( Pkey(\ampSeries) - (Pfunc{~ampDev.value} + (Pfunc{~spawnAmpDevScaler.value} * e.spawnSerial)), Pkey(\ampSeries) + (Pfunc{~ampDev.value} + (Pfunc{~spawnAmpDevScaler.value} * e.spawnSerial)), Pfunc{~ampStep.value}, inf )).clip(0,1)}, \ampPatternRand, Pfunc{ |e| (e.ampRand + (Pfunc{~papaAmpSlope.value} * e.spawnSerial)).clip(0,1)}, \ampPatternBrown, Pfunc{ |e| (e.ampBrown + (Pfunc{~papaAmpSlope.value} * e.spawnSerial)).clip(0,1)}, \ampPatternGauss, Pfunc{ |e| (e.ampGauss + (Pfunc{~papaAmpSlope.value} * e.spawnSerial)).clip(0,1)}, \ampPattChoose, ~ampPop, \panRand, Pfunc{ |e| rrand(Pkey(\panSeries) - (Pfunc{~panDev.value} + (Pfunc{~spawnPanDevScaler.value} * e.spawnSerial)), Pkey(\panSeries) + (Pfunc{~panDev.value} + (Pfunc{~spawnPanDevScaler.value} * e.spawnSerial))).clip(-1,1)}, \panGauss, Pfunc{ |e| (Pgauss( Pkey(\panSeries), (Pfunc{~panDev.value} + (Pfunc{~spawnPanDevScaler.value} * e.spawnSerial)), inf )).clip(-1,1)}, \panBrown, Pfunc{ |e| (Pbrown( Pkey(\panSeries) - (Pfunc{~panDev.value} + (Pfunc{~spawnPanDevScaler.value} * e.spawnSerial)), Pkey(\panSeries) + (Pfunc{~panDev.value} + (Pfunc{~spawnPanDevScaler.value} * e.spawnSerial)), Pfunc{~panStep.value}, inf )).clip(-1,1)}, \panPatternRand, Pfunc{ |e| (e.panRand + (Pfunc{~papaPanSlope.value} * e.spawnSerial)).clip(-1,1)}, \panPatternBrown, Pfunc{ |e| (e.panBrown + (Pfunc{~papaPanSlope.value} * e.spawnSerial)).clip(-1,1)}, \panPatternGauss, Pfunc{ |e| (e.panGauss + (Pfunc{~papaPanSlope.value} * e.spawnSerial)).clip(-1,1)}, \panPattChoose, ~panPop, \pattern, Pfunc { |e| Pbindf(p,\serialx, Pif(Ptime(inf) < e.nicLength, Pseries(0,1,inf)), \pos, e.posPattChoose, \rate, e.ratePattChoose, \filter, e.filterPattChoose, \sus, e.durPattChoose, \delta, e.densityPattChoose, \amp, e.ampPattChoose, \pan, e.panPattChoose )}, \spawnSeries, Pfunc{~spawnCentre.value} + (Pfunc{~spawnSlope.value} * Pkey(\spawnSerial)), \spawnRand, (Pwhite(Pkey(\spawnSeries) - Pfunc{~spawnDev.value}, Pkey(\spawnSeries) + Pfunc{~spawnDev.value}, inf)).max(0.01), \spawnGauss, (Pgauss(Pkey(\spawnSeries), Pfunc{~spawnDev.value}, inf)).max(0.01), \spawnBrown, (Pbrown(Pkey(\spawnSeries) - Pfunc{~spawnDev.value}, Pkey(\spawnSeries) + Pfunc{~spawnDev.value}, Pfunc{~spawnStep.value}, inf)).max(0.01), \delta, ~spawnPop, \method, \par) ); ); })
code description
pattern based granulizer using Pspawn - a work in progress
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