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

Stream Array-Reader/Control-Law

Post any examples or modules that you want to share here

Stream Array-Reader/Control-Law

Postby trogluddite » Thu Sep 24, 2020 9:37 pm

Following from the discussions in this thread, here are some modules which can be used to implement custom control-laws, transfer-curves, etc. within mono, mono4, or poly audio streams, by using a float array as a look-up table.

(257.75 KiB) Downloaded 261 times

The principle is the same for all them: The stream input value determines which value(s) to fetch from the float array. Lookup is interpolated so that output values "glide" smoothly from one array element to the next. The valid range of input values is set by "min" and "max" properties, which then spans all of the entries in the array, no matter the size of the array (i.e. the minimum input value looks up the first item in the array, and the maximum input value looks up the last item in the array).

Input values are constrained internally so that you can't fall off the ends of the array. Output values are not constrained at all - it is assumed that the Array only contains valid output values.

There are three versions, all implemented in optimised assembly...
- Sample rate: Lookup happens at every single sample. Can be used mono, mono4, or poly.
- Hopped: Lookup happens every 16 samples (look inside for how to change the hop interval).
- Note On: Strictly for poly streams; lookup only happens at the start of a new note (kinda!).
Where further optimisations might be possible (e.g. for pure mono use), this is noted within the code inside the modules.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
Posts: 1706
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Stream Array-Reader/Control-Law

Postby Spogg » Fri Sep 25, 2020 8:31 am

Absolutely brilliant and useful set of tools trog!

What I especially like, if I’ve got this right, is that any graph-drawing module which gives out a float array can feed into this system. In this way one could make a visual representation of any transfer curve. I might even use this in my current project (at a very early stage currently).

Thank you so much! :D
User avatar
Posts: 2788
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Return to User Examples

Who is online

Users browsing this forum: No registered users and 17 guests