SynthMaker

what language does the code window understand?

Archive · 2010 7 old posts

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

overhishead ·

does the code window understand c++, and if so, does it understand it in accordance with Borland or Microsoft?

does the code window understand assembly language straight with no alterizations?

i guess i want to know if SM uses its own modified coding language or does the code window seamlessly deal with normal standard c++ and assembly?

i guess i am curious and confused as to whether SM has its own hybrid language, or is it bilingual, etc...

oh, and i was wondering whether SM wants code that 'talks' to the VST sdk... SSE, etc. how many languages and in what form of code is the code window dealing with?

MichaelBenjamin ·

thats a strange question since youre registered since 2007 sm understands sm language - its like c++ for idiots, and the asm box understands a small subset of x86 assembly, mainly the sse commands plus some other.

overhishead ·

i am not a coder or a synth designer, but i got real interested in the idea like 3-4 years back. im always trying to learn, but im hitting kind of a brick wall when it comes to understanding the answer to the question i asked. i figure the info in a concise form might help the next guy.

trogluddite ·

It's important to make the distinction between the code primitive and the assembly primitive - they are similar, but not interchangeable - each has it's own syntax.

The opcode list for the assembly primitive is here on the Wiki... [old link]

The code primitive syntax is very like C, but there are very few commands other than just maths/logic operations - there are no functions/subroutines etc. and only simple fixed iteration looping. If you look at examples on the Wiki and forum, you'll see that they are mostly just a list of float and boolean equations.

The only communication is within the schematic itself - this uses the streamin and streamout declarations, which work like the input/output connectors do on a module so that you can cable streams in and out of the code. The export to vst function deals with all the VST sdk stuff - you can't manipulate that directly with the code or assembly primitives.

It's best to think of the code and assembly primitives as a way of creating custom modules that handle DSP number crunching very efficiently.

overhishead ·

thanks, now i understand. its tricky to get clues to the subject of dsp especially when i ignored math in school. i am digging around where i can for stuff that makes sense, and at my level (which is in the minus range) i get my epiphanies wherever i can!

oddson ·

I spent much of my first months avoiding the Code component as knowing basic C or C++ isn't enough; it also involves how SSE processes streams of data in parallel and therefore you may need to know how to do conditional statements (which are very different).

I'm still avoiding the Assembly component - the difference is anything* you can do in Assembly you can do in Code but it may take a few more cycles. I strongly recommend against trying to learn Assembly until you've learned the Code module.

The code syntax is very similar to a number of programing languages... the code section of the User Guide has most of the operators listed but I think there might be one or two gaps... there is a decent thread here somewhere that talks about these gaps but damn'd if I can find it right now.

Probably the best way to starting to learn the code module is to try to code something and finding out what you don't understand about it. Or you can take existing code and try to work your way through it.

Often people start with trying to take some C code for a filter and translating it. This can work well but make sure you understand how the trigonometry functions -- sin1() for example -- take a normalized value in the [0,1] range instead of [0,2*pi] as that has caused people grief on a few occasions.

You also should make sure you understand the difference between Poly and Mono and Quad data types and in particular how Poly channels are created and destroyed from the M2P components.

* I know there are a handful of things that cannot be done without assembly but for the most part my statement is correct.

MichaelBenjamin ·

ok so trogluddite and oddson both get 5/5 points for answer quality and i give myself 1/5, just for the record.

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.