Csound Csound-dev Csound-tekno Search About

Re: oscil3 glitch problem

Date1999-05-08 21:06
FromPaul Winkler
SubjectRe: oscil3 glitch problem
Steven Cook wrote:
> 
> Hi,
> 
> I've had an odd problem with the following simple orc and sco which I have
> written to test something else I am working on:
> 
> ;Orc
> sr     = 44100
> kr     = 4410
> ksmps  = 10
> nchnls = 1
> 
> instr    1 ; Sine sweep generator
> 
> ilevl    = ampdb(96 + p4)
> ifreq1   = p5
> ifreq2   = p6
> 
> asweep   expseg  ifreq1, p3, ifreq2
> aosc     oscil3  1, asweep, 1
> 
> out      aosc*ilevl
> 
> endin
> 
> ;Score
> f1 0 32769 10 1 ; Sine
> 
> ;Level in dB, 0dB=maximum
> ;   Strt Leng Levl Freq1 Freq2
> i1  0.00 1.47 -6      20 20000
> e
> 
> The output from this contains a single sample -32768 spike about a third of
> the way in for no apparent reason.
> 
> Anyone got any ideas?
> 
> Thanks,
> Steve Cook.

Do you mean a single spike, and nothing else... or a swept sine with an
unexplained spike in it?

I ran your orc and sco with no modifications and got a swept sine
wave... couldn't find any spikes anywhere. Maybe something's wrong with
your version of csound? (I'm currently running unofficial linux version
v3.53.0.1b).

By the way, using a big ftable like that, you won't see much benefit
from using oscil3. Just out of curiosity, I tried it with a table of
only eight points. If you have a sound editor that can open 4-channel
files (I use Snd on linux; on win95, maybe CoolEdit? I don't know.), you
can see clearly the difference in the output of the different oscils.
More importantly, you can hear them. With a more reasonable size of
ftable, the differences won't be as dramatic.

;Orc
sr     = 44100
kr     = 4410
ksmps  = 10
nchnls = 4

instr    1 ; Sine sweep generator

ilevl    = ampdb(96 + p4)
ifreq1   = p5
ifreq2   = p6

asweep   expseg  ifreq1, p3, ifreq2
aosc1   oscil ilevl, asweep, 1
aosc2   oscili ilevl, asweep, 1
aosc3   oscil3  ilevl, asweep, 1

outs    aosc1, aosc1, aosc2, aosc3
endin

;Score
f1 0 8 10 1 ; VERY ROUGH SINE

;Level in dB, 0dB=maximum
;   Strt Leng Levl Freq1 Freq2
i1  0.00 1.47 -6      20 20000
e




-- 

-------------------   paul winkler   --------------------
slinkP arts: music, sound, illustration, web design, etc.

zarmzarm@erols.com      http://members.tripod.com/~slinkP