i tried to make sinewave bank using [data] object in gen~ instead of dozens of [cycle]. simply 20 sine waves are distributed between 2 values. it works now surprisingly, however, it uses 85% CPU usage on Genius. (it goes up to 450% and then shutdown when using 100 oscilators). it would be great if someone has idea to reduce it to have more sine waves…
thank you in advance !
I think that the problem is that PD itself is not very fast, if you need more performance you’d have to switch to C++ or at least FAUST (which could be more understandable for non-programmers).
It’s also possible to generate data for a sine oscillator without using sine function for every sample, basically it’s a matter of rotating a complex number by an angle that is your sine oscillator’s frequency (in radians). A modern algorithm that solves some issues due to low precision of floating point numbers is here . But I think it might be difficult to convert it to PD.
it’s not PD but gen.
but thank you for suggestion !
Are you saying I shouldn’t read forum before coffee?!
Anyway, in addition to writing a computationally cheap quadrature oscillator, there’s also another option - using FFT. We don’t have any means to do it on OWL currently, but I think that a custom template for gen~ that would be used for FFT-based generator or signal processor patches is possible.