Advertisement
Guest User

miniature neurocosmos 28

a guest
Feb 25th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // miniature neurocosmos 28               madam data
  2. // 24 feb 2017
  3. /* ------------------------------ */
  4. // 2nd part of the 1-knob challenge.
  5. // the loop is continuous and unaffected by the control.
  6. // the panning speed of the high blips (synthdef aa) is determined by knob 0 and rounded to the nearest multiple of 3.
  7. // 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.
  8. (
  9.     //synth and node definitions
  10.     SynthDef(\aa, {|fr=100,amp=1,omix=0.5|
  11.         var sig, env;
  12.         env = EnvGen.ar(Env.perc(0.81,1.4,curve:-4),doneAction:2);
  13.         sig = ABass.ar(fr*LFO.kr(0.99,1.01,Rand(2,5)),
  14.             omix:omix,
  15.             fmix:0.65,
  16.             sGain:10,
  17.             sFilt:2500,
  18.             spread:0.1,
  19.         ) * 0.24;
  20.         //sig = SinOsc.ar(fr) * 0.1;
  21.         sig = sig * env;
  22.         Out.ar(0,sig);
  23.     }).add;
  24.  
  25.     Ndef('bb', {|panFr=10|
  26.         var sig;
  27.         sig = FBlip.ar(1000,50,noise:0.1) * 0.1;
  28.         sig = sig + Blip.ar(150 * SinOsc.ar(300).range(0.5,1.5),200,0.05);
  29.         sig = HPF.ar(sig,5000)*1.8;
  30.         sig = Pan2.ar(sig[0], LFO.kr(-1,1,panFr,type:LFPulse));
  31.     }).play;
  32.  
  33.     //background chord loop using synthdef 'aa'
  34.     Pdef('aa', Pbind(
  35.         \instrument, \aa,
  36.         \fr, (Pseq([53,50,57,64,60,41],inf) + Pseq([-12,0,12,0,24,12,12],inf)).midicps,
  37.         \omix, (1- (Pkey(\fr) / 10000)),
  38.         \omix, (Pkey(\fr) / 1000),
  39.         \dur, Pseq([1,0.5,0.5,1,0.5,0.5,0.5],inf)*0.25,
  40.     )).play;
  41. )
  42. (
  43.     //controls - checks if input is less than previous input, and updates Ndef only if it is less.
  44.     Spec.add(\panFr, [1,500,\exp].asSpec);
  45.     k = SLIPDecoder.new;
  46.     ~prev=0;
  47.     k.actions[0] = {|in|
  48.         if (in<~prev, {Ndef('bb').set(\panFr, \panFr.asSpec.map(in/1023).round(3))});
  49.         ~prev=in;
  50.     };
  51.     k.start;
  52. )
  53. s.recHeaderFormat_("wav").recSampleFormat_("int24");
  54. s.record;
  55. s.stopRecording;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement