SynthMaker

Tan1 again

Archive · 2005 8 old posts

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

unkargherth ·

Hi Jorge. It seems tan1() still is incorectly compiled .This code

polyin i; polyout o; o=tan1(0.5*i);

Get assembled this way

polyin i;polyout o;float temp=0.0; float F0P500000=0.500000; float F65536P000000=65536.000000; float F16384P000000=16384.000000; movaps xmm0,F0P500000; mulps xmm0,i; movaps xmm1,xmm0; mulps xmm1,F65536P000000; addps xmm1,F16384P000000; movaps temp,xmm1; fld temp[0]; fistp temp[0]; mov eax,temp[0]; and eax,65535; shl eax,2; add eax,sine; fld [eax]; fstp temp[0]; movaps xmm1,temp; movaps xmm1,xmm0; mulps xmm1,F65536P000000; movaps temp,xmm1; fld temp[0]; fistp temp[0]; mov eax,temp[0]; and eax,65535; shl eax,2; add eax,sine; fld [eax]; fstp temp[0]; divps temp,xmm1; movaps xmm0,temp; //Assignment> sLeft=xmm0 movaps o,xmm0;

So tan1 gets calculated only for first of the 4 SSE rows, true?

jorge ·

unkargherth wrote: So tan1 gets calculated only for first of the 4 SSE rows, true?

Yeah, you're right. It's a bug and very easy to fix. Thanks for reporting it. If it's urgent I'll try to have it fixed for the next release.

unkargherth ·

jorge wrote: unkargherth wrote: So tan1 gets calculated only for first of the 4 SSE rows, true?

Yeah, you're right. It's a bug and very easy to fix. Thanks for reporting it. If it's urgent I'll try to have it fixed for the next release.

Well, it's relatively urgent. I'm locked on some filters by this, but ther are enough filters now, so it's urgency depends n how much cost to correct. Decide yourself jorge. I Have no idea on your priporities and

Anyway , IMHO, this should be solved sometime in near future

unkargherth ·

Well it seems dificult to tame this baby..

Now ( 0.9.3u) it works for the 4 SSE rows ( Thanks jorge !!!)

But i found another minibug on it 🙁

this

polyin i; polyout o; float t; t=0.5*i; o=tan1(t);

works perfectly, but

polyin i; polyout o; o=tan1(i*0.5);

fails miserably

I know that's reallya "not so urgent" bug, because there is a workaround I'm only notifying it

AS usual, a new guiness record. check the date of first post on this an the date of this to know the time for bug correct6ion.... Awesome Jorge

jorge ·

unkargherth wrote: I know that's reallya "not so urgent" bug, because there is a workaround I'm only notifying it

Thanks unkargherth, those bugs are really easy to fix, it's more a question of finding and reporting them.

I've uploaded a new version that should fix the tan1(i*0.5) bug, let me know if it works. The link is the same as before: [old link]

unkargherth ·

Re-downloaded and nothing changed..... 🙁.At least for me

Anyway, bad idea to track bugs based on only one person view

Anybody could confirm or rebate?

jorge ·

unkargherth, out=tan1(in*0.5) should generate the following assembler code ( unless there's something I'm missing ):

polyin in;polyout out;float temp=0.0; float F0P500000=0.500000; float F65536P000000=65536.000000; float F16384P000000=16384.000000; movaps xmm0,in; mulps xmm0,F0P500000; movaps xmm1,xmm0; mulps xmm1,F65536P000000; addps xmm1,F16384P000000; movaps temp,xmm1; fld temp[0]; fistp temp[0]; mov eax,temp[0]; and eax,65535; shl eax,2; add eax,sine; fld [eax]; fstp temp[0]; fld temp[1]; fistp temp[1]; mov eax,temp[1]; and eax,65535; shl eax,2; add eax,sine; fld [eax]; fstp temp[1]; fld temp[2]; fistp temp[2]; mov eax,temp[2]; and eax,65535; shl eax,2; add eax,sine; fld [eax]; fstp temp[2]; fld temp[3]; fistp temp[3]; mov eax,temp[3]; and eax,65535; shl eax,2; add eax,sine; fld [eax]; fstp temp[3]; movaps xmm1,temp; movaps xmm2,xmm0; mulps xmm2,F65536P000000; movaps temp,xmm2; fld temp[0]; fistp temp[0]; mov eax,temp[0]; and eax,65535; shl eax,2; add eax,sine; fld [eax]; fstp temp[0]; fld temp[1]; fistp temp[1]; mov eax,temp[1]; and eax,65535; shl eax,2; add eax,sine; fld [eax]; fstp temp[1]; fld temp[2]; fistp temp[2]; mov eax,temp[2]; and eax,65535; shl eax,2; add eax,sine; fld [eax]; fstp temp[2]; fld temp[3]; fistp temp[3]; mov eax,temp[3]; and eax,65535; shl eax,2; add eax,sine; fld [eax]; fstp temp[3]; divps temp,xmm1; movaps xmm0,temp; //Assignment> sLeft=xmm0 movaps out,xmm0;

which is what's happening here.

unkargherth ·

yes it does, but....

take the code module. Feed it with a sine osc out with freq 0.01 and try to draw the ouput from code module. Nothing

But if you do the same using the intermediate var variant, it draws nicely

So i suspect that something stange is happening

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.