Csound Csound-dev Csound-tekno Search About

Re: pops, etc.

Date1999-01-21 21:07
FromErik Spjut
SubjectRe: pops, etc.
I wasn't real clear before. All of the envelope generators in the manual
have both a "kr" version and an "ar" version:

kr	linseg 	ia, idur1, ib[, idur2, ic[...]]
ar	linseg 	ia, idur1, ib[, idur2, icI...]]
kr	expseg 	ia, idur1, ib[, idur2, ic[...]]
ar	expseg 	ia, idur1, ib[, idur2, ic[...]]
kr	linen	kamp, irise, idur, idec
ar	linen	xamp, irise, idur, idec
kr	linenr	kamp, irise, idec, iatdec
ar	linenr	xamp, irise, idec, iatdec
kr	envlpx  kamp, irise, idur, idec, ifn, iatss, iatdec[, ixmod]
ar	envlpx	xamp, irise, idur, idec, ifn, iatss, iatdec[, ixmod]

Always use the "ar" version unless your need for speed overrides your need
for decent sound. If your "xamp" is changing, use an "a" instead of a "k"
variable.

The Fourier thing takes more time to explain than I have right now, but
here's one example:

Rather than use straight line segments like

 f   1   0   256   7   0   128   1   0   -1   128   0

to generate a sawtooth, use a Fourier series like

 f1 0 256 10 1 .5 .33333 .25 .2 .16667 .142835 .125 .11111 .1

and you'll find many fewer clicks and other horrible noises. (The phase is
probably off between these two but I don't have time to check.)

At 9:26 PM +0000 1/21/99, Jean-Michel =?UNKNOWN?Q?DARR=C9MONT?= wrote:
>Do you mean you never use those envelope generators?
>What do you use instead?
>
>>
>How to use "band-limited Fourier approximations","higher-order polynomials"
>and "cubic splines"?

-------------------------------------------------------------------------------
Erik Spjut (spyoot, rhymes with cute) - Associate Professor of Engineering
and  Associate Director for Engineering Computing,  Center for Design Education
Harvey Mudd College, Claremont, CA 91711-5990  USA
Erik_Spjut@hmc.edu      Ph & Voice mail (909) 607-3890      Fax (909) 621-8967

Date1999-01-21 21:26
FromJean-Michel DARRMONT
SubjectRe: pops, etc.
Erik Spjut wrote:
> 
> Some general suggestions: Never use k-rate variables for anything or set
> kr=sr. 

I've noticed it produces a dirty signal on enveloppes.

>k-rate for envelope generators such as linseg, expseg, envelopx (or
> whatever it's called these days) and balance are especially severe
> offenders.
>
Do you mean you never use those envelope generators?
What do you use instead?
 
> Never try to use true square waves or triangle waves (or anything with
> sharp edges). Always use band-limited Fourier approximations (write me
> personally if you have no clue what I mean) or higher-order polynomials or
> cubic splines.
> 
How to use "band-limited Fourier approximations","higher-order polynomials"
and "cubic splines"?

Regards.

-- 
Jean-Michel DARREMONT