Page 1 of 1

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

PostPosted: Sat Dec 14, 2019 7:12 pm
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.