SynthMaker

more math possibilities in code component

Archive · 2009 6 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

hansdump ·

Hello,

I know this topic is annoying for you... I want to remember the lack of a fast and precise built in functions for streamdata in the code component like exp, ln, hyperbolicfunctions, broken rational exponentials etc.

Are there any plans to have a circle of concept?

Suggestions:

-->for example exp(1): It´s annoying to make an exp function over taylor series.. in the meantime there were a couple of suggestions how to implement a asm´d exp function. Don´t you think time has come to use the best one as built in function for the code component?

-->for example x^(1/3): same problem...

I think time has come to make things easier.

It would be enough to have the possibility of making (x/y)^(u/v).

Don´t you think this is essential? 😕

Thanks for attention.

infuzion ·

Would be helpful. Code: sqrt(), abs(), pow(e,b), denorm(x,lim), +much more...

hansdump ·

Thanks for the hint, but I read this thread already and because of that I wrote this post. The problem is, that it is hard to expect from all the users to code everything in the asm module.

The other thing is, that finding errors in the asm code is a absolutely hassle. So, if all this is possible with the asm code module, why are there borders in the normal code module?

Is it not possible to include the c++ math library to the SM Code Module? That would be a round concept concerning math stuff. It would be so fantastic!

...last time I ask... I promise!

hansdump ·

Ai,

The links here show how to implement very very fast exp(x), ln(x) and 2^x

http://citeseerx.ist.psu.edu/viewdoc/su ... .1.57.1569 http://martin.ankerl.com/2007/10/04/opt ... a-and-c-c/

I´dont know if you already have this in your fast power code module... if not.. maybe this is implementable in Synthmaker?

If i get this right, you have to work with shift operations... so I stuck at this point.

Can somebody help?

Thanks,

H.

hansdump ·

Ok,

I helped myself... sambean wrote already this one in asm!

streamin a; streamin b; streamout out; // Fast power approximation // Out = pow(a,b) // Sambean int norm=1065353216; // (127<<23) int negNorm=-1065353216; // -(127<<23)

movaps xmm0,a; paddd xmm0,negNorm; cvtdq2ps xmm0,xmm0; mulps xmm0,b; cvtps2dq xmm0,xmm0; paddd xmm0,norm; movaps out,xmm0;

Is there a possibility to get more precision?

MegaHurtz ·

I think the asm pow is as optimised as they get.

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.