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
Waveshaper
6 posts
• Page 1 of 1
Waveshaper
Hello,
I would like to share my first plugin with you.
It's a Waveshaper with User-definable transfer function.
I'm using the Ruby eval function to build a lookup table of the user's function which is then read with linear interpolation.
The User can also define the size of the lookup table (i.e. the Quality).
Choose between Unipolar-Mode, where your function is applied to the absolute value of the input and then multiplied with the sign of the input (symmetrical distortion)
and Bipolar-Mode, where you can do different things to positive and negative values (asymmetrical)
The ternary operator is useful for that:
x>0 ? x : 0
is the same as:
if x>0
x
else
0
Values above 1 and below -1 are hardclipped.
You can use three knobs a, b and c (with user-definable min/max values) to quickly alter parameters of your function (these are not automatable though).
I have also included optional DC-offset removal and 4xOversampling.
Special values you can use in formulas: pi, e, res(Current Resolution)
Functions you can use in formulas:
normal operators: +, -, *, /, ^
http://www.ruby-doc.org/core-1.9.3/Math.html <= all of those
Useful ones are: tanh(x); atan(x); log10(x); log2(x); sin(x); cos(x); sqrt(x); acosh(x); cbrt(x)
sin1(x) =sin(2*pi*x)
cos1(x) =cos(2*pi*x)
floor(x)
round(x)
ceil(x)
abs(x)
sgn(x) =sign(x)
clip(x, min=-1, max=1)
I will post some example formulas later
Feedback and suggestions are very appreciated.
EDIT2: Version 1.0.2
I would like to share my first plugin with you.
It's a Waveshaper with User-definable transfer function.
I'm using the Ruby eval function to build a lookup table of the user's function which is then read with linear interpolation.
The User can also define the size of the lookup table (i.e. the Quality).
Choose between Unipolar-Mode, where your function is applied to the absolute value of the input and then multiplied with the sign of the input (symmetrical distortion)
and Bipolar-Mode, where you can do different things to positive and negative values (asymmetrical)
The ternary operator is useful for that:
x>0 ? x : 0
is the same as:
if x>0
x
else
0
Values above 1 and below -1 are hardclipped.
You can use three knobs a, b and c (with user-definable min/max values) to quickly alter parameters of your function (these are not automatable though).
I have also included optional DC-offset removal and 4xOversampling.
Special values you can use in formulas: pi, e, res(Current Resolution)
Functions you can use in formulas:
normal operators: +, -, *, /, ^
http://www.ruby-doc.org/core-1.9.3/Math.html <= all of those
Useful ones are: tanh(x); atan(x); log10(x); log2(x); sin(x); cos(x); sqrt(x); acosh(x); cbrt(x)
sin1(x) =sin(2*pi*x)
cos1(x) =cos(2*pi*x)
floor(x)
round(x)
ceil(x)
abs(x)
sgn(x) =sign(x)
clip(x, min=-1, max=1)
I will post some example formulas later
Feedback and suggestions are very appreciated.
EDIT2: Version 1.0.2
- Attachments
-
- ExpShaper02.fsm
- (46.8 KiB) Downloaded 1424 times
Last edited by TheOm on Wed Jul 02, 2014 6:35 pm, edited 3 times in total.
- TheOm
- Posts: 103
- Joined: Tue Jan 28, 2014 7:35 pm
- Location: Germany
Re: Waveshaper
it's really amazing.
Need my support for app development, website or custom scripts?
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
PM me if you are interested.
Experienced Java, J2EE, PHP, Javascript, Angular, Cloud Solutions developer.
-
CoreStylerz - Posts: 327
- Joined: Sun Jan 22, 2012 2:19 am
- Location: italy
Re: Waveshaper
Thanks for sharing. I will take a look when I'm back at my PC.
I made a wave shaper once, had a graphical envelope with 4 times oversampling called X wave. So I will be looking at your techniques with interest.
I made a wave shaper once, had a graphical envelope with 4 times oversampling called X wave. So I will be looking at your techniques with interest.
- Exo
- Posts: 426
- Joined: Wed Aug 04, 2010 8:58 pm
- Location: UK
Re: Waveshaper
Welcome to the forum, TheOm!
What a great first download - the 'user variables' are an excellent idea, really makes twiddling with the equation easy. Not had a chance to sling my bass through it yet, but I'm betting the big lookup table and oversampling will allow some nice smooth "atan" type saturation.
Suggestions? Nothing much springs to mind - you could maybe "include" the Math module (or "self.extend(Math)") rather than redefine the methods - but that's just hacker nit-picking, and it won't make it sound any better!
Good to have you join the party - looking forward to whatever other goodies you're cooking up.
What a great first download - the 'user variables' are an excellent idea, really makes twiddling with the equation easy. Not had a chance to sling my bass through it yet, but I'm betting the big lookup table and oversampling will allow some nice smooth "atan" type saturation.
Suggestions? Nothing much springs to mind - you could maybe "include" the Math module (or "self.extend(Math)") rather than redefine the methods - but that's just hacker nit-picking, and it won't make it sound any better!
Good to have you join the party - looking forward to whatever other goodies you're cooking up.
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: Waveshaper
Missing in your schematic, the module SSE Floor and the module Stream ABS, into is empty.
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: Waveshaper
Thanks everyone.
Well, to be honest, I did not come up with it myself.
The whole plugin is baiscly just a "Hey, I can do this too"-kinda thing.
Yes, thank you, I changed it now.
I think it was a Flowstone bug, it's fixed now.
trogluddite wrote:the 'user variables' are an excellent idea, really makes twiddling with the equation easy
Well, to be honest, I did not come up with it myself.
The whole plugin is baiscly just a "Hey, I can do this too"-kinda thing.
trogluddite wrote: you could maybe "include" the Math module (or "self.extend(Math)") rather than redefine the methods
Yes, thank you, I changed it now.
Tronic wrote:Missing in your schematic, the module SSE Floor and the module Stream ABS, into is empty.
I think it was a Flowstone bug, it's fixed now.
- TheOm
- Posts: 103
- Joined: Tue Jan 28, 2014 7:35 pm
- Location: Germany
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 52 guests