SynthMaker

what is ASM ?

Archive · 2011 14 old posts

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

ahs ·

sorry for this stupid question !

cheers andreas

stw ·

http://en.wikipedia.org/wiki/Assembly_language

In SM it looks like this:

It's the lower level language of the SM Code.

trogluddite ·

Yup, it's the nearest thing to the actual codes used inside the CPU chip itself - the CPU's native language, so to speak. The only difference is that inside the CPU all those weird names are just represented by pure numbers.

All other computer languages are compiled (translated) into ASM before the CPU can understand them - the same for all the primitives, modules and links. Just as with human languages, translation is a tricky business - so the compiled ASM is often not as efficient as it might be - for example; often lots of extra instructions are put in there as a 'safety net' to make damned sure that the program still does what it's meant to after translation (a bit like giving directions to a foreign tourist - you talk slower, clearer and describe things extra carefully to help them understand you more easily)

That's why you see so many threads about ASM - once you know it well, it's possible to write ASM by hand that is more efficient than what SM's complier can produce from the code boxes and primitives. Mostly, CPU's are now so powerful that it doesn't really matter - but in SM land we want to do complex things 44100 (or more) times every second, so the savings can still be very useful. There are also a few obscure little programming 'tricks' that you can use in ASM that aren' possible in the code primitive (for example, ASM can sometimes use proper integers, whereas the code box is float only).

ahs ·

asm = assembler programming !?

thank you (so easy it was)

i thought it was a special language only for sm

does sm everytime compiling the modules or is the language equal to p.e. forth?

trogluddite ·

I don't know the full internal workings, but I guess forth would be a good analogy - the main difference would be that the links use memory addresses to pass parameters rather than using a stack. BTW, the ASM component is only a subset of full x86/SSE assembly - there's a list HERE of the available opcodes - mostly SSE stuff, as the poly components use individual SSE channels for each voice for the big CPU savings.

ahs ·

but asm programming is not needed for making sm to run ?

are there beginner tutos for asm ?

trogluddite ·

Many people use SM for awesome projects without ever using ASM at all. ASM doesn't add any new 'features' to SM, its main use is to optimise a schematic so that is uses less CPU power.

The best way forward is probably to get used to using the Code primitives - SM code is easier to program with (and to read!) than ASM, and makes editing/prototyping far easier. Apart from very simple little 'gadgets', writing an algorithm directly in ASM can be very hard - there is no protection against crashes/lockups in ASM, so debugging can be a nightmare.

My usual method is first to do everthing possible using just stock primitives - then replace as much as possible with Code primitives (if possible, some things have to use primitives) - then the final stage is to take the code and optimise that using assembly to get the CPU usage as low as possible (sometimes a 25-50% reduction is possible).

The Wiki has some good tutorial and forum links that are a good place to get started - check out the 'Optimisation' page. Also, if you write something using SM Code, you can connect a text box to the 'S' output of the code box, and it will show you the compiled ASM for that block of code.

ahs ·

thank you !

with SM code you mean the primitives?

is this avaible in the free version?

trogluddite ·

ahs wrote: with SM code you mean the primitives?

No, SM has two kinds of 'writing text lines' type coding in addition to the usual primitives.

One is called just 'Code', and is a bit more like a normal high level language (sort of C'ish), so you get simple lines like... this = that + (other >= something) & bitmask;

The other is 'Assembly', which is like the example stw posted above.

It's a bit annoying that they called one of them 'Code' - it can lead to a lot of confusion in posts, because most programmers call just about anything in any language 'code' - but in SM the meaning is specifically the 'Code' primitive.

AFAIK, this is all available in the free version - the limitations have to do with schematic size, ASIO in/out and exports.

oddson ·

While the replies in this thread are correct I don't know if you're hearing the real message.

CODE is handy to learn but you have to master the basics first.

ASM can trim some CPU load over CODE but you'd only bother with it (if ever!) after you master CODE and you only master CODE after you know the basics. 😇

trogluddite ·

oddson wrote: ASM can trim some CPU load over CODE but you'd only bother with it (if ever!) after you master CODE and you only master CODE after you know the basics. 😇

Well spoken. He he - rule 0: don't forget rule 1! 😉

ahs ·

thanks @all

CoreStyler ·

ASM is maybe too difficult for programming! 😕

trogluddite ·

CoreStyler wrote: ASM is maybe too difficult for programming!

...yes, there is no 'safety net' in ASM - a small mistake can make a big crash very easily!

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.