Hello!
I'm trying to develop a SAOL version of the CSound's foscil
opcode, which is an FM oscillator. I'm using sfront. When comparing
the spectra of the resulting waveform from the SAOL and the CSound
versions, the results are similar, but not the same. (The Matlab's
"specgram" function is being used to generate the spectra). I think
there is an error in my code, but I could not find it:
======================
aopcode foscil(ksig kamp, ksig kcps, ksig kcar, ksig kmod, ksig
kndx, table tab, ivar iphs)
{
ksig carrier_freq, mod_freq;
asig mod_oscil, final_freq, aout;
carrier_freq = kcps * kcar;
mod_freq = kcps * kmod;
mod_oscil = oscil(tab, mod_freq);
final_freq = carrier_freq * (1 - kndx * mod_oscil);
aout = oscil(tab, final_freq) * kamp;
return(aout);
}
======================
Does anyone know where my error is?
Thank you!
Gustavo André Hoffmann
mailto:gusthoff@ieee.org
ICQ# 48696602
http://gusthoff.iuma.com
http://www.geocities.com/gusthoff
This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:43 EST