SynthMaker

ASM variables

Archive · 2009 11 old posts

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

Eska ·

I`pretty shure I maxed out the asm variables. Going over a decent overall number, no matter the module I`m editing strange things in the voice managment area occur, and hard crashes of cause. Deleting another (unused) variable in a different ASM module reverts back to normal. This lead to some more discipline in variable declaring and the last days I found a lot of unused but now I need desperatly four places for my controller smoother.

exonerate ·

Roughly how many variables are you using? and how much memory does your PC have?

I cannot see a reason for a limit in SM for number of variables, the fact that it's crashing suggests to me you are running out of memory.

I mean there could be a limit I don't know, but it would seem strange to have one, usually the limit would be available memory.

Cheers 😉

Exo

infuzion ·

If you look at the ASM output from the Code (connect a Text to the String output), I'm guessing you'll find 9999 or something like that, indicating yes you're maxed the xmm0-7 range. Split up your formulas & use 'temp' vars.

Eska ·

@exo: 2Gig with 419MB used. SM:142MB. @infuzion: Adding a float variable in any asm module will bring up the same FX , the variables do not have to be processed, and - found a new one - adding a integer variable to go over this magically number even change the code. All jumps are marked red then, they do not find their labels anymore. Consequently ,leaving the ASM box, the instrument crashes directly. I am definatly overwriting something important there. Indexed variables seem to be stored somewhere else, lowering delay mem did not help.

The good news: I found again six unused variables so I can go on. 🙂

MichaelBenjamin ·

seems this maxing out including instant crashes and odd behaviour happens relatively quickly. 17 variables ~100 lines was the maximum when it suddenly went strange and dissappearing. for some reason the overall schematic is quite small, so it seems to be concerning only this module. maybe it also got something to do with variable names, variable name length, dont know.

trogluddite ·

infuzion wrote: If you look at the ASM output from the Code (connect a Text to the String output), I'm guessing you'll find 9999 or something like that, indicating yes you're maxed the xmm0-7 range. Split up your formulas & use 'temp' vars.

This seems more likely to be the problem - ironically you've probably got too few variables. The CPU has eight 'registers' which are like variables that can be accessed very very quickly - if you have a line of code with a huge long string of calculations on one line, the CPU runs out of registers to store all the little intermediate values in. If your code has any long lines like this, try splitting the calculations over several lines. My PC is a pretty similar spec, and I've got a code block on the go with over 50 variables. When the code is compiled, even more variables are created - every time you use a literal number in a calculation that is also stored as a variable behind the scenes; so my code is probably into the hundreds by now. Try using more variables instead of less, it just might help.

The Luddite

MichaelBenjamin ·

ok i try this next time, now i just deleted some lines and did it another way.

edit: you speaking about asm right? not about the xmm999 8op limit? because how would the computer need an extra variable for an xmm register? i thought these are specially made to store things for one calculation without a need for any variables.

Andrew J ·

You need an extra variable when you run out of XMMs and can't optimise them any further. In that case you have to store stuff back to memory to free up XMMs. You can usually do quite a lot with 8 XMMs though.

MichaelBenjamin ·

then there seems to be a misunderstanding, because i was editing the asm already and the xmm registers itself were not a problem. normally it should have worked, but it seems there is an invisible limit to the asm module that when hit makes things instantly crash or stops working. i thought because you also get some text output from the asm but its all in hex and i didnt find any 9999 there.

MichaelBenjamin ·

just happened again, instant crash even without any external asio module, again ~100 lines and ~20 variables. the common was they were both hopped modules. maybe theres a line limit for the jnz jump?

rl ·

In the past I had lots of slowdowns or crashes when using the code module with > 100 lines of code. Better split your code into several pieces and several code modules. SM's code module doesn't seem to be made for big monolithic code chunks.

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.