Looking for the original source code of SC oscillators

Hello, in order to understand how a digital oscillator is build I would like to find the most primitive instance of code for - as an example - the SinOsc or Formant UGens. I tried to find thoses by checking the ressources inside the SC app but didn’t find it.
Also, when I try to open “source : Osc.sc” from the help menu I get an error message. ( “cannot open file : private…”).
Thanks !

It’s in c++ and there are bunch of nasty macros. All audio is ultimately c++ that is invoked from sclang, therefore you shall not find the DSP code there. In fact you’d be better off looking at DSP text books if you want to learn from fundementals.

Fyi, the SinOsc ugen uses a lookup table, meaning it storages the result of the sine wave in a buffer and uses a phase offset to read it back.

1 Like

Great, thanks a lot.