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

Re: [sc-users] env ugen(s) don't function correctly??



Yes, I still hear it with the Sine Wave rather than with my Synths, although
it may be more pronounced with mine because there are a lot more frequencies
that are getting chopped off.

I tested your code with both .sine and .triangle envs and the both do not
sound correctly. The attack and decays of these are not symmetrical at all,
even though something like .plot will "show" you that they are. Both get
approximately half way down their curves and stop during the decay. It's
even visible using something like AAudioMeter, but it's quite apparent
without watching on my end.

I'm just wondering, do you hear the problems with my Synths and not with the
sine waves? With neither? I'm sure that this is happening on my end and it'd
be really lovely if I had a bum build rather than needing to recode my whole
piece.

I'm using SC 3.1 a build which I got on October 31st. When I started working
on the piece I was on an older version and having the same issue, that would
have been on a build from June or earlier October, before the switch to 3.1.
I'm using a PowerBook G4 running 10.4.11.

thanks,
stwbass





Josh Parmenter wrote:
> 
> Here is a better test... do you still hear the problem?
> 
> 
> SynthDef(\convolPulse, {arg note = 350, dur = 1.4, vol = 0.5, out = 0;
> var in, kernel, sound, env, together, pan;
> 	env = EnvGen.kr(Env.sine(dur, 1), doneAction: 2);
> 	together = SinOsc.ar(note, 0, vol);
> 	pan = Pan2.ar(together * env, out);
> Out.ar(0, pan);
> }).send(s);
> 
> 
> //the chord:
> 
> (
> Synth(\convolPulse,[\note, 80.midicps, \dur,3]);
> Synth(\convolPulse,[\note, 66.midicps, \dur,3]);
> Synth(\convolPulse,[\note, 53.midicps, \dur,3]);
> Synth(\convolPulse,[\note, 45.midicps, \dur,3]);
> )
> 
> If so, what system and version of SC are you using? I imagine the  
> difference in attack and decay that you are hearing has to do with  
> your synthesis technique taking some time to get started, and the  
> cutoff sounds faster then the attack. If the above gives you a  
> problem, then perhaps there is a bug, but we need to know your  
> version, etc.
> 
> Best,
> 
> Josh
> 
> On Dec 22, 2007, at 1:05 AM, stwbass wrote:
> 
>>
>> hello list-
>>
>> I've been having some interesting problems with the Env ugen and  
>> some of
>> it's presets...
>>
>> The presets I've had the most trouble with are .sine and .triangle.  
>> Here's
>> an example of those acting funny.
>>
>> //preset SynthDef:
>>
>> SynthDef(\convolPulse, {arg note = 350, dur = 1.4, vol = 0.5, out = 0;
>> var in, kernel, sound, env, together, pan;
>> 	in = Pulse.ar(note, 0.2, vol);
>> 	kernel = WhiteNoise.ar(0.05);
>> 	sound = Convolution.ar(in, kernel, 2048, 0.5);
>> 	env = EnvGen.kr(Env.sine(dur, 1), doneAction: 2);
>> 	together = RLPF.ar(sound*env, note*2.2);
>> 	pan = Pan2.ar(together, out);
>> Out.ar(0, pan);
>> }).send(s);
>>
>> //or this one:
>>
>> SynthDef(\convolPulse, {arg note = 350, dur = 1.4, vol = 0.5, out = 0;
>> var in, kernel, sound, env, together, pan;
>> 	in = Pulse.ar(note, 0.2, vol);
>> 	kernel = WhiteNoise.ar(0.05);
>> 	sound = Convolution.ar(in, kernel, 2048, 0.5);
>> 	env = EnvGen.kr(Env.triangle(dur, 1), doneAction: 2);
>> 	together = RLPF.ar(sound*env, note*2.2);
>> 	pan = Pan2.ar(together, out);
>> Out.ar(0, pan);
>> }).send(s);
>>
>>
>> //the chord:
>>
>> (
>> Synth(\convolPulse,[\note, 80.midicps, \dur,3]);
>> Synth(\convolPulse,[\note, 66.midicps, \dur,3]);
>> Synth(\convolPulse,[\note, 53.midicps, \dur,3]);
>> Synth(\convolPulse,[\note, 45.midicps, \dur,3]);
>> )
>>
>> The tail end of the envelope doesn't taper correctly, it seems to  
>> get about
>> 3/4 of the way towards the bottom of the "curve" and the drops off
>> completely (at least on my end). The .triangle env seems much worse  
>> than
>> .sine, but they both sound like they have the same issue.
>>
>> I've also tried faking a new triangle env SynthDef below:
>>
>> //new SynthDef attempt:
>>
>> SynthDef(\convolPulse, {arg note = 350, dur = 1.4, vol = 0.5, out = 0;
>> var in, kernel, sound, env, together, pan;
>> 	in = Pulse.ar(note, 0.2, 0.5);
>> 	kernel = WhiteNoise.ar(0.05);
>> 	sound = Convolution.ar(in, kernel, 2048, 0.5);
>> 	env =
>> EnvGen.kr(/*tri*/Env.new([0.001,0.15*vol,vol,0.15*vol,0.001], 
>> [0.15*dur,0.35*dur,0.35*dur,0.15*dur],'exponential'),
>> doneAction: 2);
>> 	together = RLPF.ar(sound*env, note*2.2);
>> 	pan = Pan2.ar(together, out);
>> Out.ar(0, pan);
>> }).send(s);
>>
>>
>> That one seems closer (the shape is a bit off), but the taper  
>> doesn't really
>> work either.
>>
>>
>> I've had similar problems in the past with Env.perc. SynthDefs and  
>> passage
>> below:
>>
>> // .perc SynthDefs
>>
>> SynthDef(\bell1, { arg note = 300, dur = 1.4, vol = 0.5;
>> var sound, input, env, together;
>> input = BrownNoise.ar(0.5);
>> sound = Klank.ar(`[[note, note*3/2, note*8/5, note*18/8], [0.01,  
>> 0.02, 0.03,
>> 0.04], [dur, 1.2, 1.3, 1.4]], input).dup;
>> env = EnvGen.kr(Env.perc(0.001, dur, vol), doneAction: 2);
>> together = sound*env;
>> Out.ar(0, together);
>> }).send(s);
>>
>> SynthDef(\bell2, { arg note = 300, dur = 1.4, vol = 0.6;
>> var sound, input, env, together;
>> input = Impulse.ar(0.1, 0, 10);
>> sound = Klank.ar(`[[note, note*3/2, note*8/5, note*18/8], [0.02,  
>> 0.03, 0.04,
>> 0.05], [dur, 1.2, 1.3, 1.4]], input).dup;
>> env = EnvGen.kr(Env.perc(0.001,dur,vol), doneAction: 2);
>> together = sound*env;
>> Out.ar(0, together);
>> }).send(s);
>>
>> //here's the passage:
>>
>> a = TempoClock(92/60);
>> //m. 31-32
>> a.sched(1, {Synth(\bell1, [\note, 48.midicps, \dur, 1.3044, \vol,  
>> 0.2])});
>> a.sched(1, {Synth(\bell2, [\note, 47.midicps])});
>> a.sched(2, {Synth(\bell2, [\note, 56.midicps])});
>> a.sched(2, {Synth(\bell2, [\note, 57.midicps])});
>> a.sched(2.25, {Synth(\bell2, [\note, 81.midicps, \vol, 0.5])});
>> a.sched(2.4375, {Synth(\bell2, [\note, 65.midicps, \vol, 0.5])});
>> a.sched(2.625, {Synth(\bell2, [\note, 78.midicps, \vol, 0.5])});
>> a.sched(2.8125, {Synth(\bell2, [\note, 80.midicps, \vol, 0.5])});
>> a.sched(3, {Synth(\bell2, [\note, 49.midicps, \vol, 0.5])});
>> a.sched(5, {
>> 		Synth(\bell2, [\note, 50.midicps, \vol, 0.65]);
>> 		Synth(\bell2, [\note, 51.midicps, \vol, 0.65]);
>> 		Synth(\bell2, [\note, 54.midicps, \vol, 0.65]);
>> 		Synth(\bell2, [\note, 61.midicps, \vol, 0.65]);
>> 		Synth(\bell2, [\note, 64.midicps, \vol, 0.65]);
>> 		Synth(\bell2, [\note, 65.midicps, \vol, 0.65]);
>> 		});
>> a.sched(5, {		
>> 		Synth(\bell1, [\note, 50.midicps, \dur, 6, \vol, 0.15]);
>> 		Synth(\bell1, [\note, 51.midicps, \dur, 6, \vol, 0.15]);
>> 		Synth(\bell1, [\note, 54.midicps, \dur, 6, \vol, 0.15]);
>> 		Synth(\bell1, [\note, 61.midicps, \dur, 6, \vol, 0.15]);
>> 		Synth(\bell1, [\note, 64.midicps, \dur, 6, \vol, 0.15]);
>> 		Synth(\bell1, [\note, 65.midicps, \dur, 6, \vol, 0.15]);
>> 		});
>> 		
>> That one sounds fine, the very end still doesn't seem to taper  
>> correctly to
>> me. Some other sounds in the piece the taper a bit more oddly; sorry  
>> about
>> not fining the best example for that one.
>>
>> Again, I tried to make some perc-like envs... but I think the  
>> preset .perc's
>> are better, though they still have issues. Even still, I don't  
>> understand
>> why these one's do not sound correct to me. Maybe there're some code
>> suggestions for these?
>>
>> // perc-like envs - SynthDefs
>>
>> SynthDef(\bell1, { arg note = 300, dur = 1.4, vol = 0.5;
>> var sound, input, env, together;
>> input = BrownNoise.ar(0.5);
>> sound = Klank.ar(`[[note, note*3/2, note*8/5, note*18/8], [0.01,  
>> 0.02, 0.03,
>> 0.04], [dur, 1.2, 1.3, 1.4]], input).dup;
>> env =
>> EnvGen.kr(/*perc*/Env.new([0.001,vol,0.001], 
>> [0.001,dur],'exponential'),
>> doneAction: 2);
>> together = sound*env;
>> Out.ar(0, together);
>> }).send(s);
>>
>> SynthDef(\bell2, { arg note = 300, dur = 1.4, vol = 0.6;
>> var sound, input, env, together;
>> input = Impulse.ar(0.1, 0, 10);
>> sound = Klank.ar(`[[note, note*3/2, note*8/5, note*18/8], [0.02,  
>> 0.03, 0.04,
>> 0.05], [dur, 1.2, 1.3, 1.4]], input).dup;
>> env =
>> EnvGen.kr(/*perc*/Env.new([0.001,vol,0.001], 
>> [0.001,dur],'exponential'),
>> doneAction: 2);
>> together = sound*env;
>> Out.ar(0, together);
>> }).send(s);
>>
>>
>> The \bell2 sound doesn't have as much resonance as the \bell1 sound  
>> and I
>> think that's why the "misshapen" envelope can pass for that sound;  
>> but I
>> don't understand why the envelope has such a steep drop off at the  
>> end of
>> the \bell1 sound.
>>
>> In working on this piece I've become very confused by these envelope
>> tapering issues. I find that the attacks all sound nice, but the  
>> decays
>> always have something funny. If it becomes neccessary (or would just  
>> help) I
>> can post the whole piece and which events have the biggest problems  
>> to my
>> ears - maybe that will be the best way to diagnose the problem.
>>
>> Thanks in advance,
>> stwbass
>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/env-ugen%28s%29-don%27t-function-correctly---tp14467510p14467510.html
>> Sent from the Supercollider - User mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> sc-users mailing list
>> sc-users@xxxxxxxxxxxxxxx
>> http://www.create.ucsb.edu/mailman/listinfo/sc-users
> 
> ******************************************
> /* Joshua D. Parmenter
> http://www.realizedsound.net/josh/
> 
> “Every composer – at all times and in all cases – gives his own  
> interpretation of how modern society is structured: whether actively  
> or passively, consciously or unconsciously, he makes choices in this  
> regard. He may be conservative or he may subject himself to continual  
> renewal; or he may strive for a revolutionary, historical or social  
> palingenesis." - Luigi Nono
> */
> 
> 
> _______________________________________________
> sc-users mailing list
> sc-users@xxxxxxxxxxxxxxx
> http://www.create.ucsb.edu/mailman/listinfo/sc-users
> 
> 

-- 
View this message in context: http://www.nabble.com/env-ugen%28s%29-don%27t-function-correctly---tp14467510p14472205.html
Sent from the Supercollider - User mailing list archive at Nabble.com.