I need a mathematician for a coming tutorial

Discussion relating to the Korg Kronos Workstation.

Moderators: Sharp, X-Trade, Pepperpotty, karmathanever

Post Reply
CharlesFerraro
Platinum Member
Posts: 955
Joined: Sat Feb 06, 2010 10:15 am
Location: California

I need a mathematician for a coming tutorial

Post by CharlesFerraro »

As far as I know... it's very very difficult to derive a function from a set of plot points since a veritable infinite number of functions can be used to describe any set.
...but isn't it possible to get very close to a workable function that can extrapolate values on a curve?

As you can tell I'm not a mathematician. Here's the nitty gritty of what I need:

Image

I need to know exact Hz values for the LFO's for an interesting sound design idea. The above functions on some exponential curve but I simply have no idea how to find the derivative. I've heard Excel can help but I don't own or know how to use that program. Any help would be appreciated.

Image

There's a rough plot so you can see that it is exponential. Still, since I never went to school for this stuff I simply have no idea how to go about interpolating between plot points or what have you.
Last edited by CharlesFerraro on Mon Jun 05, 2017 5:35 pm, edited 1 time in total.
paypal.me/CharlesFerraro
bmtg
Posts: 37
Joined: Mon May 22, 2017 2:54 am

Post by bmtg »

Can you fill in a few more values between 90 and 99? It doesn't look quite exponential but a fitting function could be found. Most of the curvature happens between 90 and 99 so more values there would help the fit.
Last edited by bmtg on Mon Jun 05, 2017 2:47 pm, edited 1 time in total.
Kronos 2.73 - NanoPad2 - MBP - DP9
Koekepan
Platinum Member
Posts: 626
Joined: Tue Sep 27, 2016 5:39 pm

Post by Koekepan »

(Disclaimer: been a long time since I studied mathematics with any focus.) It's actually not all that hard.

So, if you're talking exponential, your basic formula is y = C * (a ^ x)

That means that your Frequency is a function of some value raised to the Frequency Value power, multiplied by constant C.

As it turns out, it's easy to find out what C is, because (anything ^ 0 )= 1. We know that C(a^0)=0.014, so your constant is 0.014.

Assuming you genuinely have an exponential curve on your hands, it shouldn't be too hard.
tim.condon
Posts: 22
Joined: Tue Sep 15, 2015 5:27 pm

Post by tim.condon »

The technical name for what you're after is "curve fitting" or (non-linear) "regression analysis."

Give this free web tool a try: https://mycurvefit.com/

You can explore different models by selecting from the "fit method" box.
CharlesFerraro
Platinum Member
Posts: 955
Joined: Sat Feb 06, 2010 10:15 am
Location: California

Post by CharlesFerraro »

Tim, WOW! The predictive power of that tool was very accurate! Turns out the algorithm to help calculate points is the "Akima Cubic Spline". I entered in all known values save the first and last to test the predictive power of each algorithm and that one turned out best. Even if it was still off, the curve is graphed through each coordinate as it should be and I think will be very accurate for calculating intermediate values (when all plot points are entered) but not so much so for frequency values boosted by AMS. However at that point you can tune the rate of the LFO by ear since you're well into audible range after 32Hz.

The site regulates users to 50 calculations and you can't enter more than 6 at a time. I used a heck of a lot testing each algorithm so I'm down to 5 predictions or so that I'm going to use for that future patch. Otherwise I would post the LFO rates of all frequency values.

However even if I were to do that... I still wouldn't know exact values for frequency fine, even if the algorithm were perfect. Because frequency fine gives "98 additional steps for each step of the main Frequency parameter." In other words frequency fine is not base 100, but rather base 99. So let's say I asked the curve to predict what my Hz value would be for a frequency value of 50 and a frequency fine value of 99... I couldn't type 50.99 as my X because freq50+fine99 is de facto 51. But using a decimal point value to stand in for frequency fine is as close as you're going to get.
paypal.me/CharlesFerraro
bmtg
Posts: 37
Joined: Mon May 22, 2017 2:54 am

Post by bmtg »

Charles,
As a rule, spline curves are always an exact match at the given data points, and there is interpolation in between. It may be your best option in this case, but it depends how "exact" you need the outputs.

I looked at the data for a bit, and it seems that the function used is some sort of compound function. In the range of values 0 thru 90, it matches pretty well a formula that is freq = C * value^P + 0.014. Where C = 2.0931 and P = 0.000779651. But this breaks down for 99 and 99f99 points, they are generated by a different function. Without seeing additional data between 90 and 99, it's really hard to say what form the function would take up there.

For the fine, if the 98 points are linear, then you could just multiply the fine number by 100/99 to get the equivalent decimal value.

Cheers
Kronos 2.73 - NanoPad2 - MBP - DP9
Mike Conway
Approved Merchant
Approved Merchant
Posts: 2483
Joined: Fri Jan 28, 2005 10:44 pm
Location: Las Vegas, Nevada

Post by Mike Conway »

I know where I'm coming for next year's taxes. You guys may help me avert a spline injury. :lol:

This thread reminds me a little of when I had to convert DX7 parameters to SY77/99 values, years ago.
CharlesFerraro
Platinum Member
Posts: 955
Joined: Sat Feb 06, 2010 10:15 am
Location: California

Post by CharlesFerraro »

If anyone is interested, I did end up finding exact values for the LFO time and Fine parameters, as well as some accurate readings for a few LFO times boosted by an AMS. That information can be found here: http://www.korgforums.com/forum/phpBB2/ ... p?t=110943
bmtg wrote:For the fine, if the 98 points are linear, then you could just multiply the fine number by 100/99 to get the equivalent decimal value.

Cheers
You were exactly correct, bmtg.

I also did end up making that patch. The reason I needed exact times was because I needed the LFO's to have MIDI sync off in order to modulate their frequency... but then I needed the LFO's to be locked in rate to each other. I could've chosen any arbitrary tempo but I decided on 110bpm. That patch is shown in detail here:
<iframe src="https://www.youtube.com/embed/g9W81zOlbPY?ecver=2" width="480" height="360" frameborder="0"></iframe>
paypal.me/CharlesFerraro
Post Reply

Return to “Korg Kronos”