Page 1 of 1
Efficient delays and delay code generators
Posted: Tue Dec 16, 2014 10:06 pm
by KG_is_back
Hi all,
I have made asm-optimized toolkit of delay modules and code generator modules for them. They should allow you to generate most efficient custom delays (for example the ASM-optimized hard-coded fixed sized delay).
You can download them
here at Flowstone guru. If you experience any bugs, request features or have any suggestions, please submit them in the support section or here.
Interpolated versions are also planned for future.
Re: Efficient delays and delay code generators
Posted: Tue Dec 16, 2014 10:53 pm
by tulamide
Wow, that sounds just like in the early kid days, when my mum said to me: "Tomorrow I will bake your favorite, waffles." The whole night I was drooling in anticipation - that's exactly what happens right now! Can't wait to test it. Thanks a lot!
Re: Efficient delays and delay code generators
Posted: Thu Dec 18, 2014 12:02 pm
by adamszabo
Great thanks! One request if I may have for the interpolated delay, is it possible to make them so that when you modulate the delay time, it retains the high frequencies as well? Right now the standard interpolated delay will gradually lose more and more high frequencies with every delay.
Re: Efficient delays and delay code generators
Posted: Thu Dec 18, 2014 8:41 pm
by Exo
Thanks KG! The Assembler code generators are a cool idea, and very smart

One thing I think you should make clear is how the size of the buffer works, you force the size upwards to the nearest power of 2 (which of course enables optimizations). So in some cases buffer is much larger than user anticipated, I doubt this will be a problem but worth mentioning I think.
Re: Efficient delays and delay code generators
Posted: Thu Dec 18, 2014 8:59 pm
by KG_is_back
Exo wrote:One thing I think you should make clear is how the size of the buffer works, you force the size upwards to the nearest power of 2 (which of course enables optimizations). So in some cases buffer is much larger than user anticipated, I doubt this will be a problem but worth mentioning I think.
I'm pretty sure I've mentioned that in the module description, but I'm not sure if in all of them. Currently I have no way to check quickly, wifi adapter on my notebook stoped to work today, so I'm in the process of updating the drivers. Hopefully it fixes it... It's really anoying
When implementing the interpolation for the mono4/poly versions I've had a hard time writing the algorithm efficiently - 8 XMM registers is way too low xD
Re: Efficient delays and delay code generators
Posted: Thu Dec 18, 2014 10:29 pm
by Exo
KG_is_back wrote:Exo wrote:One thing I think you should make clear is how the size of the buffer works, you force the size upwards to the nearest power of 2 (which of course enables optimizations). So in some cases buffer is much larger than user anticipated, I doubt this will be a problem but worth mentioning I think.
I'm pretty sure I've mentioned that in the module description, but I'm not sure if in all of them. Currently I have no way to check quickly, wifi adapter on my notebook stoped to work today, so I'm in the process of updating the drivers. Hopefully it fixes it... It's really anoying
When implementing the interpolation for the mono4/poly versions I've had a hard time writing the algorithm efficiently - 8 XMM registers is way too low xD
Ah yes sorry you have, but it is just not mentioned in the fixed delay.
Good luck with the wifi adapter, I hate it when things go bad on my PC, spend ages fixing it killing valuable programming time

Re: Efficient delays and delay code generators
Posted: Thu Dec 18, 2014 11:39 pm
by KG_is_back
Exo wrote:Ah yes sorry you have, but it is just not mentioned in the fixed delay.
Good luck with the wifi adapter, I hate it when things go bad on my PC, spend ages fixing it killing valuable programming time

Oh, in the fixed delay I omitted to mention this, because it doesn't actually affect the processing. In all other delays, when you input maxdelay of 9 the module will allow delays above 9 (upto 16), which might be unexpected behavior, if you rely on the module to limit the delay maximum. But in case of fixed delay you get a finished "black-box" product with no input parameters. The buffer is also always less then twice as big as the delay, so when someone needs 10000+ delay, he doesn't mind a few thousand buffer spaces surplus. Except for wasting some ram space the delay will be superior to other implementations anyway. Altough it uses bigger buffer, which means more prefetching and possible cache misses, it calculates indexes in integers, so prefetching should actually work superior.
And I had the luck with the adapter - the driver was bad and I was able to update it. The time consuming part was, that I had to use my brother's computer to find it and download it (it was the worse case scenario Q:my internet isn't working, what shoud I do? A: download the fix here) = spend half an hour searching for my USB key (and ended up using my old mp3 player instead)

Seriously, USB key is a collision of two biggest black holes in the universe - the missing-USB-cable-hole and missing-keys-hole.
Re: Efficient delays and delay code generators
Posted: Thu Dec 18, 2014 11:48 pm
by Exo
KG_is_back wrote:Exo wrote:Ah yes sorry you have, but it is just not mentioned in the fixed delay.
Good luck with the wifi adapter, I hate it when things go bad on my PC, spend ages fixing it killing valuable programming time

Oh, in the fixed delay I omitted to mention this, because it doesn't actually affect the processing. In all other delays, when you input maxdelay of 9 the module will allow delays above 9 (upto 16), which might be unexpected behavior, if you rely on the module to limit the delay maximum. But in case of fixed delay you get a finished "black-box" product with no input parameters. The buffer is also always less then twice as big as the delay, so when someone needs 10000+ delay, he doesn't mind a few thousand buffer spaces surplus. Except for wasting some ram space the delay will be superior to other implementations anyway. Altough it uses bigger buffer, which means more prefetching and possible cache misses, it calculates indexes in integers, so prefetching should actually work superior.
And I had the luck with the adapter - the driver was bad and I was able to update it. The time consuming part was, that I had to use my brother's computer to find it and download it (it was the worse case scenario Q:my internet isn't working, what shoud I do? A: download the fix here) = spend half an hour searching for my USB key (and ended up using my old mp3 player instead)

Seriously, USB key is a collision of two biggest black holes in the universe - the missing-USB-cable-hole and missing-keys-hole.

I have two USB keys and I haven't seen either in about a year, probably take me that long to find them

Re: Efficient delays and delay code generators
Posted: Fri Dec 19, 2014 12:02 am
by KG_is_back
Exo wrote: 
I have two USB keys and I haven't seen either in about a year, probably take me that long to find them

The last time I bought USB key, I bought it on a way to school (naturally because I lost the previous one) to deliver a seminary work to a professor. I literally lost it the same day... paid over 20€ for a single data transfer - the most expensive 5MB of my life!! I'll never by an USB key ever! (although thankfully receive it as a gift

)