Working with MV's rational mapper (useful ruby, dspcode)

For general discussion related FlowStone
Post Reply
User avatar
wlangfor@uoguelph.ca
Posts: 912
Joined: Tue Apr 03, 2018 5:50 pm
Location: North Bay, Ontario, Canada
Contact:

Working with MV's rational mapper (useful ruby, dspcode)

Post by wlangfor@uoguelph.ca »

So, I have been working on the MV reverb I promised to make. The sunburst gradients were too memory intensive to be done with primitives so I required ruby to do everything.

Even so the knobs were strained a little.

However, here is the ruby code I came up with to emulate Martin Vicanek's rational mapper. Enjoy.'

Code: Select all

var1 = @in
r1 = @r1 ##min
r2 = @r2 ##mid
r3 = @r3 ##max

red = (((r3-r1)*(r2-r1))*var1)/((r3-r2)+(var1*((r2*2)-(r3+r1))))+r1

output 0, red


It was useful and I thought it could even be used in DSP.

Cheers
My youtube channel: DSPplug
My Websites: www.dspplug.com KVRaudio flowstone products
Post Reply