SHARE
TWEET

Patterny Eventy Overview Example

a guest Mar 9th, 2018 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (
  2. SynthDef( \help_SPE3_Mridangam, { |out, t_amp|
  3.     var sound;
  4.  
  5.     sound = Resonz.ar(
  6.         WhiteNoise.ar(70) * Decay2.kr( t_amp, 0.002, 0.1 ),
  7.         60.midicps,
  8.         0.02,
  9.         4
  10.     ).distort * 0.4;
  11.  
  12.     Out.ar(out, sound);
  13.     DetectSilence.ar(sound, doneAction: Done.freeSelf);
  14. }).add;
  15.  
  16. SynthDef( \help_SPE3_Drone, { |out|
  17.     var sound;
  18.     sound = LPF.ar(
  19.         Saw.ar([60, 60.04].midicps)
  20.         +
  21.         Saw.ar([67, 67.04].midicps),
  22.         108.midicps,
  23.         0.007
  24.     );
  25.     Out.ar(out, sound);
  26. }).add;
  27. )
  28.  
  29. (
  30. // percussion solo in 10/8
  31.  
  32. var stream, pat, amp;
  33.  
  34. pat = Pseq([
  35.     Pseq(#[0.0], 10),
  36.  
  37.     // intro
  38.     Pseq(#[0.9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 2),
  39.     Pseq(#[0.9, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0], 2),
  40.     Pseq(#[0.9, 0.0, 0.0, 0.2, 0.0, 0.2, 0.0, 0.2, 0.0, 0.0], 2),
  41.     Pseq(#[0.9, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.2, 0.0, 0.2], 2),
  42.  
  43.     // solo
  44.     Prand([
  45.         Pseq(#[0.9, 0.0, 0.0, 0.7, 0.0, 0.2, 0.0, 0.7, 0.0, 0.0]),
  46.         Pseq(#[0.9, 0.2, 0.0, 0.7, 0.0, 0.2, 0.0, 0.7, 0.0, 0.0]),
  47.         Pseq(#[0.9, 0.0, 0.0, 0.7, 0.0, 0.2, 0.0, 0.7, 0.0, 0.2]),
  48.         Pseq(#[0.9, 0.0, 0.0, 0.7, 0.2, 0.2, 0.0, 0.7, 0.0, 0.0]),
  49.         Pseq(#[0.9, 0.0, 0.0, 0.7, 0.0, 0.2, 0.2, 0.7, 0.2, 0.0]),
  50.         Pseq(#[0.9, 0.2, 0.2, 0.7, 0.2, 0.2, 0.2, 0.7, 0.2, 0.2]),
  51.         Pseq(#[0.9, 0.2, 0.2, 0.7, 0.2, 0.2, 0.2, 0.7, 0.0, 0.0]),
  52.         Pseq(#[0.9, 0.0, 0.0, 0.7, 0.2, 0.2, 0.2, 0.7, 0.0, 0.0]),
  53.         Pseq(#[0.9, 0.0, 0.4, 0.0, 0.4, 0.0, 0.4, 0.0, 0.4, 0.0]),
  54.         Pseq(#[0.9, 0.0, 0.0, 0.4, 0.0, 0.0, 0.4, 0.2, 0.4, 0.2]),
  55.         Pseq(#[0.9, 0.0, 0.2, 0.7, 0.0, 0.2, 0.0, 0.7, 0.0, 0.0]),
  56.         Pseq(#[0.9, 0.0, 0.0, 0.7, 0.0, 0.0, 0.0, 0.7, 0.0, 0.0]),
  57.         Pseq(#[0.9, 0.7, 0.7, 0.0, 0.0, 0.2, 0.2, 0.2, 0.0, 0.0]),
  58.         Pseq(#[0.9, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
  59.     ], 30),
  60.  
  61.     // tehai : 7 beat motif 3 times sharing 1st beat with next 7x3
  62.     // and again the third time:
  63.     //   123456712345671234567                   123456712345671234567
  64.     //                       123456712345671234567
  65.     //   !                   !                   !                   !
  66.     //   1234567890123456789012345678901234567890123456789012345678901
  67.     Pseq(#[2.0, 0.0, 0.2, 0.5, 0.0, 0.2, 0.9,
  68.         1.5, 0.0, 0.2, 0.5, 0.0, 0.2, 0.9,
  69.         1.5, 0.0, 0.2, 0.5, 0.0, 0.2], 3),
  70.     Pseq(#[5], 1),    // sam
  71.  
  72.     Pseq(#[0.0], inf)
  73. ]);
  74.  
  75. stream = pat.asStream;
  76.  
  77. Task({
  78.     Synth(\help_SPE3_Drone);
  79.     loop({
  80.         if( ( amp = stream.next ) > 0,
  81.             { Synth(\help_SPE3_Mridangam, [ \t_amp, amp ]) }
  82.         );
  83.         (1/8).wait;
  84.     })
  85. }).play
  86. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top