Page 1 of 2

What is this sin-based transfer function called?

Posted: Tue Dec 29, 2020 9:19 am
by Spogg
I needed a 0-1 mapper to increase output steeply for low values and reduce the rate of change as an input value of 1 is approached. To help visualise this, it’s kind of the opposite of a “log” potentiometer or exponential function (e.g. squaring).

The solution I came up with involves using the first quadrant of a sin function which employs the transfer function of 1 to 90 degrees mapped to 0-1.

It’s a simple solution and works well for me in stream and green, plus you can cascade the modules for an even steeper slope, as in the attached schematic.

Not being much use at maths I tried to find the correct name for such a curve, but failed. Does anyone here know what I should call the modules?

Also are there alternative methods available maybe where the slope can be adjusted? In my project it actually needed to be a stream version (velocity processing).

Cheers!

Re: What is this sin-based transfer function called?

Posted: Tue Dec 29, 2020 12:31 pm
by martinvicanek
Sine is somewhat expensive, have you tried
Out = in*(2 - in)
?

Re: What is this sin-based transfer function called?

Posted: Tue Dec 29, 2020 12:47 pm
by adamszabo
I dont know the name of it, but you are essentially taking the top half of a Sine. You can also try a rational function to get a curve that you like

Re: What is this sin-based transfer function called?

Posted: Tue Dec 29, 2020 1:26 pm
by Spogg
That’s absolutely brilliant guys, thank you both so much. :D

Just what my toolbox was crying out for.

Cheers!

Re: What is this sin-based transfer function called?

Posted: Tue Dec 29, 2020 6:59 pm
by RJHollins
is it like a Rectifier ?

Re: What is this sin-based transfer function called?

Posted: Wed Dec 30, 2020 12:07 pm
by HughBanton
MV's formula is great, I didnt know of that one.

I'm not good at sums, haven't done algebra since I was 17, which must be several weeks ago now :lol: . So my attempts at 'generalising' Martin's formula with numbers other than 2 produced some very strange (useless) results wot I don't understand.

However, fwiw, I know you can get similar results with square roots etc, as per the attached.
spogg_function.fsm
(38.89 KiB) Downloaded 1009 times

HYN to all when it comes, reckon we'll be glad to see the back of 2020!

H

Re: What is this sin-based transfer function called?

Posted: Wed Dec 30, 2020 12:16 pm
by HughBanton
HYN indeed! Well you knew I really meant YNH .. can't type either :roll:

It's actually Yoda Speak - "mmm, new year happy you must!"

H

Re: What is this sin-based transfer function called?

Posted: Wed Dec 30, 2020 4:39 pm
by trogluddite
HughBanton wrote:reckon we'll be glad to see the back of 2020 [...] I really meant YNH .. can't type either

It has been suggested in some quarters that exactly this kind of transposition error by a Mayan cleric may explain why the end-of-all-time didn't occur as they predicted in.... 2012! :o

HughBanton wrote:HYN [...] It's actually Yoda Speak

Or maybe a Spoonerific prayer for the end of social distancing: Happy You Near! :lol:

Re: What is this sin-based transfer function called?

Posted: Wed Dec 30, 2020 9:18 pm
by billv
trogluddite wrote:why the end-of-all-time didn't occur as they predicted in.... 2012!

Maybe there is an end to time , and were not looking at it the right way.
What if time was finished just after it was created, and naturally then went into a never-ending loop.(like a pattern Sequencer)
Just like the day ends at the 24 hour mark, and the just loops over again.
This is a very real construct. :geek:
So you can say that the “end of time” is “embedded” in the normal clock cycle.
Humans fail to see this because their stuck in the loop and are usually to
Busy. :lol:

Re: What is this sin-based transfer function called?

Posted: Thu Dec 31, 2020 4:15 am
by RJHollins
are you saying ....

We just don't have Time for this ?