Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // miniature neurocosmos 28 madam data
- // 24 feb 2017
- /* ------------------------------ */
- // 2nd part of the 1-knob challenge.
- // the loop is continuous and unaffected by the control.
- // the panning speed of the high blips (synthdef aa) is determined by knob 0 and rounded to the nearest multiple of 3.
- // as with 4 variations [md0], the knob only updates in one direction - this time when it's moving to the left (downward). So, downward slides are possible but not upward slides.
- (
- //synth and node definitions
- SynthDef(\aa, {|fr=100,amp=1,omix=0.5|
- var sig, env;
- env = EnvGen.ar(Env.perc(0.81,1.4,curve:-4),doneAction:2);
- sig = ABass.ar(fr*LFO.kr(0.99,1.01,Rand(2,5)),
- omix:omix,
- fmix:0.65,
- sGain:10,
- sFilt:2500,
- spread:0.1,
- ) * 0.24;
- //sig = SinOsc.ar(fr) * 0.1;
- sig = sig * env;
- Out.ar(0,sig);
- }).add;
- Ndef('bb', {|panFr=10|
- var sig;
- sig = FBlip.ar(1000,50,noise:0.1) * 0.1;
- sig = sig + Blip.ar(150 * SinOsc.ar(300).range(0.5,1.5),200,0.05);
- sig = HPF.ar(sig,5000)*1.8;
- sig = Pan2.ar(sig[0], LFO.kr(-1,1,panFr,type:LFPulse));
- }).play;
- //background chord loop using synthdef 'aa'
- Pdef('aa', Pbind(
- \instrument, \aa,
- \fr, (Pseq([53,50,57,64,60,41],inf) + Pseq([-12,0,12,0,24,12,12],inf)).midicps,
- \omix, (1- (Pkey(\fr) / 10000)),
- \omix, (Pkey(\fr) / 1000),
- \dur, Pseq([1,0.5,0.5,1,0.5,0.5,0.5],inf)*0.25,
- )).play;
- )
- (
- //controls - checks if input is less than previous input, and updates Ndef only if it is less.
- Spec.add(\panFr, [1,500,\exp].asSpec);
- k = SLIPDecoder.new;
- ~prev=0;
- k.actions[0] = {|in|
- if (in<~prev, {Ndef('bb').set(\panFr, \panFr.asSpec.map(in/1023).round(3))});
- ~prev=in;
- };
- k.start;
- )
- s.recHeaderFormat_("wav").recSampleFormat_("int24");
- s.record;
- s.stopRecording;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement