«Funky Klangs» by Schemawound

on 23 Feb'12 15:50 in funkyklangs

Just experimenting with patterns

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Some Funky Klangs - Totally botched the math on what I was trying to do but it sounds better this way */

( 
SynthDef(\DistKlangBlip, { 
  | out = 0, release = 1, freq1 = 1, freq2 = 5, freq3 = 8, freqMult = 4 | 
  var env = Linen.kr(Impulse.kr(0), 0.01, 1, release, doneAction:2); 
  var freqs = ([freq1, freq2, freq3] * freqMult).midicps; 
  var klang = Klang.ar(`[freqs, nil, nil ], 1, 0); 
  Out.ar(out, klang.tanh!2 * env * 0.5) 
}).add

)

( 
  Pbind(*[ 
          instrument: \DistKlangBlip, 
          dur: Pxrand([0.25, 0.5], inf) * 0.5, 
          release: Pkey(\dur), 
          freqMult: Pxrand((3..12), inf), 
          freq2: Prand([4,5], inf), 
          freq3: Prand([8,12], inf) 
]).play; 
)
raw 732 chars (focus & ctrl+a+c to copy)
reception
comments
Schemawound user 23 Feb'12 15:52

Just experimenting with patterns

Schemawound user 23 Feb'12 15:53

Opps, didn't mean to comment my own thing.

freejazztampa user 24 Feb'12 02:50

Very nice - I like the 80's vibe of this one.

freejazztampa user 24 Feb'12 02:52

why did you use the Pkey?

rukano user 24 Feb'12 11:45

if you name your argument sustain instead of 'release', your sustain will be equal to \dur and you can use the key \legato as a multiplier for this ;)

Schemawound user 06 Mar'12 17:16

@Freejazztampa: To tie the length of the note to the duration. Maybe I did it wrong?

Schemawound user 06 Mar'12 17:18

@Rukano: Thanks for the tip. Still trying to figure out all the argument name to use with patterns.