Commission Music

Commission Music
Bespoke Noise!!

Friday, 28 May 2010

Bassdrum Update

Alas, my last bassdrum SynthDef had errors in it. You can't do a .rand in a SynthDef, you need to use a UGen: Rand(lo, hi). And my sample and hold-ish bit was beyond screwed up.

Alas. To make up for this gruesome oversight, I've posted 16 samples of my analog drum patch to my sample library. They're all public domain, because crediting individual samples is too annoying for users. I hate having to keep track of stuff like that. I use a personal wiki to track this stuff when I use samples that require attribution, and it's still annoying.

Also, here's my fixed version:


(
 SynthDef(\bassD, {|out = 0, hit_dur, amp, pan|
 
  var ringmod, noise, lpf, hpf, lpf_env, hpf_env, noise_env, env, panner, 
   pitch_env, slew, trig, sh;
  
  
  lpf_env = EnvGen.kr(Env.perc(0.05, 56.56, 12, -4));
  hpf_env = EnvGen.kr(Env.perc(0.05, 48.54, 12, -6));
  noise_env = EnvGen.kr(Env.perc(0.0001, 0.032, 1, -8));
  pitch_env = EnvGen.kr(Env.perc(0.07, hit_dur, 12, -2));
  
  env = EnvGen.kr(Env.perc(0.00005, hit_dur, amp, -2), doneAction: 2);
  
  trig = Impulse.ar(0.45/hit_dur, Rand(0.0, 1.0));
  sh = Dwhite(-6.0, 6.0,inf);
  slew =  Lag.ar(Demand.ar(trig, 0, sh), hit_dur/1.7) + Rand(-6.0, 6.0);
  
  ringmod = LFTri.ar(
     (31 + slew + LFTri.ar((27 + pitch_env).midicps, Rand(0.0, 4.0), 60)).midicps, 
     Rand(0.0, 4.0)); // 5 octave log range
  noise = PinkNoise.ar(noise_env);

  lpf = RLPF.ar(ringmod, (56.56 + lpf_env).midicps, 0.5);
  hpf = RHPF.ar(lpf +  noise, (48.54 + hpf_env).midicps, 0.5);
  
  panner = Pan2.ar(hpf, pan, env);
  
  Out.ar(out, panner);
 }).store;
)

It really doesn't sound as good as the analog. Frankly, nothing ever sounds as good as analog. My dream system is to have a real analog synthesiser on a chip or a board with a physical interface with actual knobs and stuff. However, in my dream system, you'd be able to save knob settings and patches. And then you'd be able to use it with supercollider (or a similar system). Of course, I'd need a bunch of these things to get polyphony, so the rig would be outrageously expensive, but a boy can dream.

If you want to tell me that this already exists (in real analog, none of this fake stuff) please also tell me I've won the lottery! Er no, do tell me about it. It would certainly give me incentive to start buying lottery tickets.

Speaking of analog, I'm still looking for synth repair in the greater London area. My power supply for my Evenfall Minimodular is dead and there's just not an off-the-shelf one that I can find. I theoretically know how to build my own, but I'd like my first power supply to power something slightly more replaceable. Meh. At least any new one I get will work with multiple voltages. Hauling around step down converters is a pain.

1 comment:

Marc said...

I will remove error from that and update with this fixed version.