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
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Stream Array-Reader/Control-Law
2 posts
• Page 1 of 1
Stream Array-Reader/Control-Law
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.
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.
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!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Stream Array-Reader/Control-Law
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!
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!
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 76 guests