[Csnd] GENquestion

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Csnd] GENquestion

menno
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] GENquestion

Victor Lazzarini
Rightly so; waveshaping is nothing more than distortion.
If you start with anything other than a sine, you'll get a
lot of (possibly non-band-limited) components, some of
which may cause aliasing.

Victor

>
> Hello,
>
> I'm trying to get a grip on the GENs by studying the
> Csound Book. I'd
> like to waveshape a soundfile, using a mix of the
> examples 205 and 206
> of the Csound Book. I replaced the sine by a sample
> and changed
> k-rates to a-rates. The result sounds very distorted
> and not what I'd
> expect it to be. Do I hear the odd harmonics or not?
> (It is odd that's
> for sure). Is this the right way to go? Maybe somone
> can tell me?
>
> thanks
> Menno
>
> <CsoundSynthesizer>
>
> <CsOptions>
> </CsOptions>
>
> <CsInstruments>
>
> sr      =          44100
> kr        =         4410
> ksmps      =         10
> nchnls    =    1
>
>         instr     205
> asweep    linseg    0, p3*.5, .49, p3*.5, 0    ; INDEX
> SWEEP FUNCTION
> aindex    oscili    asweep, p5, 2        ; SOUND TO
> WAVESHAPE atable    tablei    aindex, 26, 1, .5    ;
> WAVESHAPE aindex anorm    tablei    asweep*2, 260, 1
>  ; MAKE NORMALIZATION Fn kenv    linen    p4, .01, p3, .2
>   ; AMPLITUDE ENVELOPE
>         out        atable*anorm*kenv    ; NORMALIZE AND
> IMPOSE ENV
>         endin
>
> </CsInstruments>
>
> <CsScore>
>
> ;8192 POINT SINE
> ;f   02  0   8192    10  1
>  f02 0 262144 1 "speech1.aif" 0 4 0
> ;WAVESHAPING FUNCTION: GEN13 - ODD HARMONICS
> f26  0   4097    13  1 1 1 0 .8 0 .5 0 .2
> ;AMP NORMALIZING FUNCTION
> f260 0   2049    4   26 1
>
> i   205 0   3   20000  440
> i   205 4   .   .       220
> i   205 8   .   .       110
>
> </CsScore>
>
> </CsoundSynthesizer>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection
> around  http://mail.yahoo.com
> --
> Send bugs reports to [hidden email]
>               (or to
> http://www.cs.bath.ac.uk/cgi-bin/csound ) To unsubscribe,
> send email to [hidden email]
--
Send bugs reports to [hidden email]
              (or to http://www.cs.bath.ac.uk/cgi-bin/csound )
To unsubscribe, send email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] GENquestion

Anthony Kozar
In reply to this post by menno
Try this:

Replace the oscili opcode with

aindex    loscil    asweep, p5, 2, 440.0   ; SOUND TO WAVESHAPE

and change the size of f2 to 0.


This seemed to work for me.

Anthony Kozar
[hidden email]
http://akozar.spymac.net/

--
Send bugs reports to [hidden email]
              (or to http://www.cs.bath.ac.uk/cgi-bin/csound )
To unsubscribe, send email to [hidden email]
Loading...