Elusive function

DSP related issues, mathematics, processing and techniques
Post Reply
User avatar
HughBanton
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire
Contact:

Elusive function

Post by HughBanton »

The opposite of a Flowstone dream, this is one of those Flowstone keeping-me-awakes (yawn) ...

I'm trying to figure out how to turn a regular straight-line control -1 to +1 input (blue line) into symmetrical shapes such as this (red curve) :
function.JPG
function.JPG (12.25 KiB) Viewed 26976 times

The intention is to convert linear stream control values so that they cluster around +or- V. (e.g. as illustrated around +-0.4?)

If it can be done I'd ideally like an adjustable 'cluster shelf' 'V', and an adjustable intensity 'q' (for want of a better term).

As usual my maths lets me down :cry: . Anyone ever done anything like this?
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Elusive function

Post by Spogg »

A very interesting challenge! :shock:

I suspect Martin could do the maths and DSP but I would take, as usual, a more pragmatic approach to getting the shape.

Just to clarify, you’d want the top right and bottom left graphs to be mirrored? If that’s the case it might be possible to make a transfer function for the positive-going section then invert the -1 to 0 and pass it through the same function then invert the output. Or something.

I’ve no idea what your purpose is but I can see that a generic module like this would be great for making a variable distortion curve, which is something I’ve given a little thought to already. Let’s see what offers you get…
User avatar
HughBanton
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire
Contact:

Re: Elusive function

Post by HughBanton »

Yes, positive-negative mirror image, so probably simplifies (??) one element of the task. Might even take care of itself in practice.

I've had this in my head for a while, and very glad I finally drew the diagram yesterday, a quick scribble often brings an idea into focus. Seems clear to me now - also adopting the pragmatic viewpoint - that below the 'v' point (which is where the blue input line and red output line intersect) the output is possibly 1/nth root of the input, and above the 'v' point it's the nth power. Possibly? 'n' would then be equal to what I described as the 'q'. Hah.

I might yet manage something like that. Er ...

My word, a fuzz-box that modified yer smooth guitar signal into this shape would be something to (not) behold! Incoming aliasing alert :!:

However I actually want it for something entirely different, which I'll definitely expand on at length here if it works out. But I'll hang fire for the moment in case it doesn't .. so many of my cunning schemes proceed to the "hang on, I hadn't realised it would do that" stage, and promptly get shoved into my massive reject box :cry: .

H
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: Elusive function

Post by martinvicanek »

Hehe, that's indeed a very specific requirement. Here is my proposal (although, like Spogg, I have no clue what it possibly could be good for :?: ).
capture.png
capture.png (45.01 KiB) Viewed 26895 times
Attachments
Hugh's elusive function.fsm
(14.45 KiB) Downloaded 959 times
User avatar
HughBanton
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire
Contact:

Re: Elusive function

Post by HughBanton »

OMG!! :ugeek: That is perfection Martin :ugeek:

I did make a start myself this morning with some DSP (honest!), got a quarter of it looking something like, but I guarantee I could spend a month on it and never get it this good (bitmasks and all) nor as streamlined. Thank you .. yet again.

Well, I'd better do something really impressive with it next, hadn't I ... .. .

H :D
User avatar
HughBanton
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire
Contact:

Re: Elusive function

Post by HughBanton »

Meanwhile Spogg, this kind of non-linearity actually does look like what you might get with a badly-biassed pair of push-pull tetrodes (sorry kids), so I wouldn't be surprised if there were some nice distortion applications for it.
You first ;)
H
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Elusive function

Post by Spogg »

HughBanton wrote:Meanwhile Spogg, this kind of non-linearity actually does look like what you might get with a badly-biassed pair of push-pull tetrodes (sorry kids), so I wouldn't be surprised if there were some nice distortion applications for it.
You first ;)
H


Yes it looks like the sort of soft crossover distortion you might get from valves, as opposed to transistors which would be much harsher.

Isn’t Martin just totally remarkable? :ugeek:
Apart from a perfect solution just look at the speed he came up with it! :shock:

I know, let’s keep posting weird functions to keep him busier. :lol:
User avatar
Duckett
Posts: 132
Joined: Mon Dec 14, 2015 12:39 am

Re: Elusive function

Post by Duckett »

I've spent more time adjusting thresholds for RGB/HSV in GIMP and other graphics programs than messing about in audio DSP, so that's immediately where my mind went when seeing the pic. Amazing turnaround as always, Martin (not exactly shabby with the time between the snare-wire suggestion and finished plugin either, Spogg)!
We have to train ourselves so that we can improvise on anything... a bird, a sock, a fuming beaker! This, too, can be music. Anything can be music. -Biff Debris
Post Reply