Page 2 of 2

Re: Sin Osc (for curiosity)

PostPosted: Thu Aug 04, 2022 7:33 pm
by Tepeix
Find a little optimization for the last one.
For both code there's 3 line that are not necessary !)

There's no need to make a triangle first.
The operation do the same with a ramp 0-1.

Re: Sin Osc (for curiosity)

PostPosted: Fri Aug 05, 2022 3:34 pm
by Tepeix
I'm surprise !

I was thinking that the last sin osc i made could be a little faster that the sin of Martin Vicanek.
(Comparing with a version with no phase)

It take no variable, less multiply. But 12 instruction against 11.
And it's a little slower !!

I was thinking that using less variable could help.
That using add is faster than multiply. or andps than add..

But no, doesn't seams to change anything on my cpu !!

Whatever, i'm happy to explore the sin complexity !)

Re: Sin Osc (for curiosity)

PostPosted: Sun Aug 07, 2022 9:45 am
by Tepeix
There was 2 lines that was not necessary in the last code.
(How can i not see this !) There's so many way to do !

So now it's a little faster than the MV Sin while aliasing at +- 7000hz.
But honestly the cpu gain is very very insignificant.

Now the volume is slower than 1. It's 0.313 or depending of the parameter.

Strangely i also have another version using sign to make the ramp.
It take more line, 11 against 6 but it's just a very little slower.