SynthMaker

1.1.1: array Code->ASM bug & questions

Archive · 2008 2 old posts

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

infuzion ·

A: Oddson's Tuned Comb Filter produces ASM for their arrays like this: stage1; //ArrayIndex> sLeft=index //ArrayIndex> m_sAssignVar=mem movaps xmm0,index; maxps xmm0,smIntVarZero; minps xmm0,memmax; cvtps2dq xmm0,xmm0; movaps smIntVarArrayIndex,xmm0; //AssignmentArray> sLeft=in push eax; mov eax,smIntVarArrayIndex[0]; shl eax,4; fld in[0]; fstp mem[eax]; ...

However, drag & drop SM's Interpolated Delay from the toolbox, & you'll get this: stage1; //ArrayIndex> sLeft=index //ArrayIndex> m_sAssignVar=mem movaps xmm0,index; maxps xmm0,smIntVarZero; minps xmm0,memmax; movaps smIntVarTemp,xmm0; fld smIntVarTemp[0]; fistp smIntVarArrayIndex[0]; fld smIntVarTemp[1]; fistp smIntVarArrayIndex[1]; fld smIntVarTemp[2]; fistp smIntVarArrayIndex[2]; fld smIntVarTemp[3]; fistp smIntVarArrayIndex[3]; //AssignmentArray> sLeft=in push eax; mov eax,smIntVarArrayIndex[0]; shl eax,4; fld in[0]; fstp mem[eax]; ... I notice that Oddson's uses cvtps2dq, which is a SSE2+ opcode, while the other uses the SSE1 fistp workaround. I'd prefer the SSE2; that's why I have the SSE/2 option unchecked in the Advanced Option tab (to have my OSMs not backwards-compatible to give myself more speed). I may have the older version of the module in the toolbox on my HD since I tend to install-over-the-old (1.1.0). However, seeing that the same exact Code produces different ASM is very confusing, & may cause problems w/old non-SSE2 computers. Also it is disappointing & confusing that rndint() uses the frndint instead of the much faster cvtps2dq, even in Oddson's Code.

Workaround: Replace the Code by turning it into ASM & Hand-optimizing/downgrading. Ideal Solution: Drop SSE1-only backwards compatibility (5yr CPUs?!?, even the $350 laptops can handle atleast SEE2 if not 3) & have everything be SSE2. Compatible Solution: Fix the Advanced Options to have a visual toggle between SSE1 & SSE2 (the text is hard to understand to me), & have all Code output the said ASM level at runtime, not have the different SSE level be saved in the OSM.

B: Arrays use: maxps xmm0,smIntVarZero; minps xmm0,memmax; I'm assuming they're there to ensure not to read/write out of bounds... I'm also assuming they can be hand-removed if there is already index-range checks?

C: Interesting how smIntVarArrayIndex is declared as an integer, but smIntVarTemp & smIntVarZero are both declared as floats? Perhaps they should just be called smTemp/smZero?

D: The editors are still laggy with large texts, which it typical for my commented ASM code . I usually use an external editor for ASM, though for a quick change I will directly edit Code/ASM in SM, as do most people.

thanks for your time!

infuzion ·

Well, removing the minps/maxps has a 50%+ chance of crashing SM it seems, so that removal should be done by hackers only.

& If you happen to find yourself in the Code part of SM's code, & have time to add an extra thing or 5 please: Code: sqrt(), abs(), pow(e,b), denorm(x,lim), +much more...

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.