OneLoneCoder / synth

The latest code to make your own virtual sound synthesizer in Windows. Please see the videos associated with this code. Links in the source files.

Home Page:http://www.onelonecoder.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong algorithm for LFO ? (Maybe)

iOSBrett opened this issue · comments

commented

I don't run Windows so I haven't actually tried running your code, but I was doing my own Synth and looked at your code and I think the following algorithm has an error in the LFO section.

FTYPE dFreq = w(dHertz) * dTime + dLFOAmplitude * dHertz * (sin(w(dLFOHertz) * dTime));

I don't think the second dHertz should be there. I think this is why you are using a DFLO Amplitude of 0.001 later as you are trying to cancel out the extra dHertz multiplication.

I could be completely wrong and sorry for doing the "I haven't run your code, but..."