[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Re: sc-users Digest, Vol 4, Issue 59



On Sat, 27 Dec 2003, Umiachi wrote:

> I'm nowhere near a mac for the next few days, why
> wouldn't a freq of zero work (i.e. what happened)?

actually it looks like it does work.  I was using 0.midicps which doesn't
equal zero hertz.  zero hertz doesn't seem to give any output, as
expected.

here's the code anyway, in case someone wants a drum synthesizer to screw
around with (i think it's based on somebody's helpfile).  

(
	Instr.new(\pulseSynth, {arg fundFreq, int1, int2, pulseWidth,
cutoff;
		var p, out;
		
		p = Pulse.ar([fundFreq * int1.midiratio, fundFreq,
fundFreq*int2.midiratio], 
			pulseWidth, 0.3);
			
		out = LPF.ar(Mix.ar(p), cutoff) 
			* EnvGen.ar(Env.perc, doneAction:2);
		
		[out, out];
	});
)

InstrSpawner(\pulseSynth, [Pseq(#[0, 20, 20, 20, 120, 20, 20, 20].midicps,
inf), 0.25, -0.25, 0.25, 5000], 0.5).play;
 
                             David Loehlin
	             dloehlin@xxxxxxxxxxxx    

	                 Anticlimax radio:
		       whpk 88.5fm chicago
  	  	   fridays eight to ten am
        http://home.uchicago.edu/~dloehlin