Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

Sin Osc (for curiosity)

DSP related issues, mathematics, processing and techniques

Re: Sin Osc (for curiosity)

Postby Tepeix » Thu Aug 04, 2022 7:33 pm

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.
Attachments
fast sin v2.fsm
(69.7 KiB) Downloaded 115 times
Tepeix
 
Posts: 193
Joined: Sat Oct 16, 2021 3:11 pm

Re: Sin Osc (for curiosity)

Postby Tepeix » Fri Aug 05, 2022 3:34 pm

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 !)
Tepeix
 
Posts: 193
Joined: Sat Oct 16, 2021 3:11 pm

Re: Sin Osc (for curiosity)

Postby Tepeix » Sun Aug 07, 2022 9:45 am

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.
Attachments
fast sin v3.fsm
(88.15 KiB) Downloaded 112 times
Tepeix
 
Posts: 193
Joined: Sat Oct 16, 2021 3:11 pm

Previous

Return to DSP

Who is online

Users browsing this forum: No registered users and 10 guests

cron