first commit
[shitsynth.git] / language-proposal
blob0807b4fb743aa83b10dffa0638f306e315c055ae
1 Context variables:
2 l - subroutine execution realtime length, samples, inherited from the caller's 't'
3 n - note bias (frequency argument), inherited from the caller's 'n', sets the 'm' note frequency
4 t - one note playing realtime length, samples
5 z.* - reserved for the routines' internal purposes, aren't passed to the called routines
7 All the lists can be finished by ':' or '\n'
8 Routines:
9 //a:<name>:<value> - set global variable ← do i need these?
10 d:<name>:<command list> - define a subroutine
11 v:<name>:<expression> - set the context variable
12 <subroutine>:<notelist> - call the subroutine for the list of notes
14 Notelist:
15 <note> - play this note; note ::= [a-z]
16 #<note> - do not skip the length of the next note; used for mixing; can be defined as
17         v:za:t:v:t:0:<subroutine>:m:v:t:za
19 Expressions:
20         Example: "0" == "- / * 2 - 100 50 2 50"
21 <letters> - variable name
22         Variable that stores a note is interpreted as the absolute note number (currently "(note - 'a' + bias) * 2")
23 "+-*/" - you know
24 [0-9] - you know
25