Chapter Four: Synthesis

14. A Digital Synthesis Language Sampler | Page 5

Syntax

Each synthesis language has its own syntax and punctuation requirements, sure to occasionally trip up even the veteran user. languages that use the orchestra/score paradigm may have different punctuation requirements for each. For example, MUSIC V below uses a semicolon at the end of both orchestra and score lines. Fields are separated by either a space OR a comma (very unusual in future languages):

INS01;
OSC P4 P5 B2 Fl P30 ;
OUT B2 B1 ;
END ;
GEN 0 1 2 0 0 .99 50 .99 205 -.99 306 -.99 461 0 511 ;
NOT 0 1 .0128 6.70 ;
NOT 2 1 .0256 8.44 ;
TER3 ;

Csound syntax, however, does not use semicolon line ends. However, it does use comma separation of orchestra opcode argument fields, but not score data fields (inline comments after semicolons):

;orchestra
instr 1
asig oscil p4, p5, 1
outs asig, asig
endin
;score
f1 0 4096 10 1 0.3 0.2. 0.1
i1 0 1 5000 440
i1 + 1 4000 880
e

SuperCollider has its own unique syntax, with braces, brackets and yes, semicolons. Here is a line of code that will play two sine oscillator notes at once (comments after double slash):

{ [SinOsc.ar(220, 0, 0.2), SinOsc.ar(440, 0, 0.2)] }.play; //I'm a comment

Even graphic languages have their own syntax requirements for arguments and messages, as illustrated for MAX below:

Max patcher