DSP Counter Problem

For general discussion related FlowStone
Post Reply
User avatar
aronb
Posts: 154
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA
Contact:

DSP Counter Problem

Post by aronb »

Hi,

I have seen other questions about counters used for wave positions and do not know if this is related.

I have a counter (actually happens with both, 1 is mine, other is not) that stop counting with small increments in the counter, in the DSP code.

Counter_Issue_01.fsm
Need help please
(78.53 KiB) Downloaded 908 times

I can't seem to fix it... When the counter is started it works fine, but stops at interesting places... as shown here at 4096 :shock:

Other values of step increments produce similar results also at interesting binary number boundaries.

Thanks for any help please :?

Aron
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: DSP Counter Problem

Post by Spogg »

The problem is down to the limitations of single precision float values.
This issue can also make large wave files go out of tune when playing back at reduced fractional speed: The smaller index incrementation values become imprecise.

I've attached a solution using Double Precision prims.
Also there's a little tookit included (not by me).

Hope this helps.

Cheers

Spogg
Attachments
Counter_Issue_01 -Spogged .fsm
(213.92 KiB) Downloaded 912 times
User avatar
aronb
Posts: 154
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA
Contact:

Re: DSP Counter Problem

Post by aronb »

Thank You for helping me out Spogg 8-) ! ! !

I was not aware that you could build something like that using simple primitives that way... I have way more to learn I guess!

Aron :D
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: DSP Counter Problem

Post by Spogg »

aronb wrote:I was not aware that you could build something like that using simple primitives that way... I have way more to learn I guess!


We all do mate. It never ends, one of the reasons I love FS so much!
Post Reply