Short impulse with frequency. Possible?

Dear all,

I am a super newbie in SuperCollider. I was wondering if it is possible to create a short impulse with a certain frequency. I suppose that impulses do not have frequency because they are too short? So I wonder if it’s possible to create an impulse, long enough to create the percept of a tone with a certain frequency (short-duration since wave). Is this possible?

Thanks!

GM

Sure, as a starting point you can check short envelopes multiplied with an arbitrary source. For the envelope you can take EnvGen, Decay(2) and a number of others. For quick testing of perceptional thresholds you can plug a MouseX into the decay/release time.

x = { Decay2.ar(Impulse.ar(1), 0.01, 0.03) * SinOsc.ar(1000, 0, 0.1) }.play

x.release

// or use Env with perc, triangle etc.

x = { 
	EnvGen.ar(Env.triangle(MouseX.kr(0.001, 0.1, 1).poll), Impulse.ar(1)) * 
	SinOsc.ar(1000, 0, 0.1) 
}.play

x.release

My favorite for this is a ringing filter:

a = {
	var pulse = Impulse.ar(4),
	// note, the decaying-sine grains will overlap "for free"
	decay = LFTri.kr(0.05).exprange(0.01, 0.5);
	Ringz.ar(pulse, 440, decay).dup
}.play;

a.free;

If the attack is too sharp, see Formlet. (I’ve built almost entire pieces around Formlet.)

hjh

Thanks a million, @jamshark70, @dkmayer! I’ll have a closer look at it and get back to you in case of doubt.