If you have a problem or need to report a bug please email :

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

Re-Initialize Array

DSP related issues, mathematics, processing and techniques

Re-Initialize Array

Postby aronb » Thu Nov 01, 2018 11:58 am


I am trying to write a quick DSP function that needs to use an array. I can initialize the array to be the correct value (float buffer[256] = -0.99) like on page 242? Of the user manual, works fine. I use the array to find the maximum of a set of waves, just read the values into the array with an index. Again works fine.


I need to re-initialize the array back to a value of -0.99 after I have done this some number of times (in my case 5 times sometimes a few more or less).
I do not see a way to re-initialize the array back to a known number using the standard DSP commands. Think of it like “clear array”. I also tried the “loop(256) { ...(index through array, set to a number)... }” command and that works fine, but I cannot figure out how to only have “loop” work after some number of cycles.
Ideally it would take an external “reset” (streamin reset) and clear the array on command... but again see no way to do that.

So again, how can you re-initialize an array in a DSP program after the first time of initialization?

Thanks for any and all help,

User avatar
Posts: 150
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA

Re: Re-Initialize Array

Postby martinvicanek » Thu Nov 01, 2018 1:53 pm

You can't do that in DSP code, but you can do it in ASM. KG has a good ASM tutorial on the FS Guru site. ;)
User avatar
Posts: 1167
Joined: Sat Jun 22, 2013 8:28 pm

Return to DSP

Who is online

Users browsing this forum: No registered users and 9 guests