Gen - sharing work - antialiased OSC (similar to tri~) with flexible oversampling
Jun 02 2021 | 9:02 am
Since it seems there isn't to much documentation on oversampling and band-limiting OSCs in gen (or at least i couldn't found that much on those topics), I decided to share my experience on this topic and a small patch with an antialised OSC. The oversampled OSC is simple it uses a recreation of the "phasor" object and a triangle object to generate the wave, after this I used a lowpassfilter to filter out the high frequencies before going back to normal sampling-rate. The amount of oversampling used depends on the general samplingrate (higher rates need less oversampling) and the frequency of the played note (higher frequencies need more oversampling). While oversampling isn't possible in gen natively (at least as far as I know) it can be done using a for loop in a codebox, however objects that receive the samplingrate internally (like phasor) can not be oversampled, luckily phasor can be recreated quite easy so that you can make a clone of it that can be oversampled. This same method could be used to create all kind band-limited of OSCs.