From the original SynthMaker forum (2004–2014), with its members’ names and dates.
brokebust ·
Is there a FULL list of code for the code box anywhere? I have seen things on here (the not equal operand, as one example !=, also stuff like OR, XOR etc) which are not mentioned in the manual. I feel like there's a toolbox with all the tools I need and yet I can't see what's in it.
Also, if there are any resources for programming in this language beyond what's on this site I'd love em - there is a sore lack of tutorials 😉
This guy has a great reference site but this is the fourth time it's moved in the past four years... I was almost ready to offer to host it myself just so I don't have to keep track of where it is.
As for code - there's not much more to it that what's in the documentation. Hopefully someone with more coding knowldege can add some details.
MichaelBenjamin ·
so theres == and != and i think thats it. some more in asm, squareroot, poor precision (seems to work for most audio) 1/x, sse2 rndint and others.
theun ·
The manual also doesn't mention the " | " , the bitwise OR mask.
So it's 3 operands the code component chapter in the manual misses: "==", "!=" and "|".
That's all! It would have been nice to have a secret toolbox , though! 😉
Regarding documentation: did you check the S|M WIKI ?
There are a few excellent articles on the code component
e.g. [old link]
and [old link]
Another starting point is this forum here: there are some interesting topics about using code, such as this one: Code tips x a beginner
cheers!
Theun
Shalako ·
This is standard bit operation logic used in C++ and other coding languages,therwise known as Logic Gates also used in electrionic circuts it the basics of digital/binanary system.
A logic gate is a true/false statement in binary otherwise represented by 0 (false) or 1 (true)
example would be: C is true if a and b are equal
a = 10 & b = 5
c = false (signal does not pass through circuit)
a= 10 & b = 10
c = true (siganal does pass through circuit)
'|' binary bitwise inclusive OR as in A or B (one or the other)
== Equal to as in A is = to B
(When I say maths I mean addition, subtraction, multipication, division and so on)
sin1(a) maths
cos1(a) maths
tan1(a) maths
log10(a) maths
max(a,b) Max of two numbers (which is bigger A or B)
min(a,b) Min off two numbers (which is smaller A or B)
rndint(a) ??not sure but could be Round a float to an interger
* maths
+ maths
- maths
/ maths
% remainder
> Greter than
>= greater than or equal to (example: >= 5 means all numbers up to 5 and including 5 itself. so 1 to 5 = true and 6+ equals false)
< less than
<= Less than or equal to
& adress of or and (not sure which in this case I think normal && is And
Now Im not 100% sure that these mean the same thing in SM as they do normally but I'll bet it's pretty close.
Don't ask me how I know this stuff I just do. Helps to have once had a hobby building hardware synths.