summaryrefslogtreecommitdiff
path: root/README
blob: e5c3252f9b2db1437cddaeb0c61a9b9c3935ccaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
This is a phase modulating synthesizer using jack

Dependencies:
- Jack Audio Connection Kit
- Probably stuff I forgot.

Try starting the synth and type "help".
And ignore the debugging output.

Format for the .prog files:

	oscillators=<number of oscillators>

	<PARAM>=<value>
	<PARAM>=<value>
	...

	controllers:
	<PARAM>=<affect value>
	...

	defaults:
	cont[<CTRL NUMBER>]=<default value>
	...

	velocity:
	<PARAM*>=<velocity expression>
	...

where <PARAM> is one of:
mod[x][y]:	controls how oscillator #x modulates oscillator #y.
out[x]:		output level of oscillator #x.
waveform[x]:	waveform number of oscillator #x, or "440:filename.wav", where 440 denotes
		the frequency of the sound in the file.
sync[x]:	0 or 1, whether this oscillator #x should be reset on every sync point or not
factor[x]:	frequency factor of this osc
trem[x]:	tremolo depth
trem_lfo[x]:	which LFO oscillator to use for tremolo
vib[x]:
vib_lfo[x]:	same for vibrato
attack[x]
decay[x]
sustain[x]
release[x]:	time (in seconds) for the A/D/S/R phases of the envelope
hold[x]:	0 or 1. if set, the release phase is only entered upon NOTE OFF. if unset, release
		is entered immediately after the sustain phsae.
ksl[x]/ksr[x]:	key scale level/rate: affect amplitude or ADSR-phase-length depending on pitch

filter.		this filter is applied to the final mix of all oscillators.
	enabled:	enable the high frequency cutoff filter.
	env_amount:	how much the filter gets affected by the filter envelope
	attack
	decay
	sustain
	release
	hold
	offset:		cutoff frequency factor of the filter if unaffected by envelope
	resonance:	filter resonance, 0 .. 1
	trem
	trem_lfo

sync_factor:	frequency of the "oscillator reset" signa;
freq.	
	env_amount
	attack
	decay
	sustain
	release
	hold

<PARAM*> may only be "mod", "out", "filter env res off", "freq env".

<value> may be a simple expression containing numerical calculations:
Examples: 1/2, 4, 5.4*9/2


<affect value> is:
	ctrl[<MIDI CTRL NUMBER>]*<value> + ctrl[<OTHER MIDI CTRL NUMBER>]*<value> + ...

<velocity expression> is:
	vel*<value> + <value>, where "vel" is a reserved keyword

the "controllers:", "defaults:" and "velocity:" sections are optional.


lfo number can also be "snh", for sample and hold of random data.


supported waveforms:


                 _         _        
0 sine         /   \     /   \      
                    \ _ /     \ _ /

                 .-''-.    .-''-.
1 abs-sine      /      \  /      \
               /        \/        \
                 _         _
2 half-sine    /   \_____/   \_____
                 
                 .---      .---
3 pulse-sine    /   |     /   |
               /    |____/    |____
                    
                   ---.      ---.
4 inverted         |   \     |   \
  pulse-sine   ____|    \____|    \
                    

5 noise        


100 to 300: sawtooth with variable rising/falling phases

                                . |        . |
100: normal sawtooth        . '   |    . '   |
                        . '       |. '       |
                                .          .
in between                  . '  \     . '  \
                        . '       \. '       \

                         / \       / \
200: triangle           /   \     /   \
                             \   /     \   /
                              \ /       \ /
                          .          .
in between               /  ' .     /  ' .
                        /       ' ./       ' .

                        | .        | .
300: inverted sawtooth  |   ' .    |   ' .
                        |       ' .|       ' .



400 to 600: pulse with variable high/low ratio

             1      
400 DC       0 _   _   _   _   _   _  
            -1 ____________________

             1        ___       ___
in between   0 _   _   _   _   _   _  
            -1 _______   _______

             1      _____     _____
500 square   0 _   _   _   _   _   _  
            -1 _____     _____

             1    _______   _______
in between   0 _   _   _   _   _   _  
            -1 ___       ___  

             1 ____________________
600 DC       0 _   _   _   _   _   _  
            -1 


about the note compiler: this generates sourcecode for a certain .prog file and
generates a .so shared object which then can be loaded. It's supposed to improve
the performance.