-
Notifications
You must be signed in to change notification settings - Fork 1
/
doc_0.html
177 lines (176 loc) · 6.95 KB
/
doc_0.html
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
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR"
content="Mozilla/4.78 [en] (X11; U; Linux 2.4.7-10 i686) [Netscape]">
</head>
<body text="#000000" bgcolor="#ffffff" link="#0000ee" vlink="#551a8b"
alink="#ff0000">
<b><u><font size="+2"><a href="index.html">Index page</a></font></u></b>
<center><b><u><font size="+2">Basics</font></u></b>
<br>
<font color="#66ffff">(draft)</font></center>
<p> This page describes the basic principles and has
suggestions
about how to make instruments that sound like they must have been made with professional equipment. This applies to <b>ZynAddSubFX</b>
or to any synthesizer (even if you wrote it yourself with a few
lines
of code). All the ideas from <b>ZynAddSubFX</b> come from the principles outlined below.
<br>
</p>
<p><u><font size="+1">1) The Bandwidth of each harmonic</font></u>
</p>
<p> I am not referring to samplerate, I am talking
about
the frequency "spread" of each harmonic. This is the most important
principle
of making instruments that sound good. Unfortunately there is very little
documentation about it (I have seen it very briefly described in an old
book, I searched on the net about this, but I didn't find anymore - maybe
you'll help me?).
</p>
<p> Often it is believed that the pitched sounds(like
piano,organ,choir,etc.) for a single note have a frequency, it's actually
harmonics
and nothing more. Many people try to synthesize a sound using an exact
frequency+harmonics and observe that the result sounds too
"artificial".
They might try to modify the harmonic content, add a vibratto, tremollo,
but
even that doesn't sounds "warm" enough. The reason is that the natural
sounds don't produce an exact periodic; their sounds are
quasi-periodic.
Please notice that not all quasi-periodic sounds are "warm" or
pleasant.
</p>
<p><u>The difference between a periodic wave and a quasi-periodic wave</u>
</p>
<p> This is a graphical representation of a note with
exact frequency (bandwidth of each harmonic is too narrow; the sound is
periodic). Below this is the spectrum.
<br>
<img src="images/img01a.jpg" nosave="" height="80" width="522"><br>
<img src="images/img01b.jpg" nosave="" height="112" width="271"><br>
<br>
</p>
<p>This is a graph of a quasiperiodic sound, below is the spectrum (the
bandwidths are exaggerated).
<br>
<img src="images/img02a.jpg" nosave="" height="117" width="507"><br>
<img src="images/img02b.jpg" nosave="" height="141" width="264"></p>
<p>Click <a href="example01.ogg">here to listen</a> to a sample of
periodic wave folowed by a quasi-periodic one.
<br>
A very important thing about the bandwidth is that
it has to be increased if you'll increase the harmonic's frequency.
<br>
If the fundamental frequency is 440 Hz and the bandwidth is 10
Hz (that means that the frequencies are spread from 435 to 445 Hz),
the
bandwith of the second harmonics (880Hz) must be 20 Hz. A simple formula to
compute the bandwidth of each harmonic if you know the bandwidth of the
fundamental frequency is <font size="+1">BWn=n*bw1 </font>
; n
is the order of the harmonic, bw1 is the bandwidth of fundamental
frequency
and BWn is the bandwidth of the n'th harmonic. If you do not increase
the bandwith according the frequency, the resulting instrument
will (usually) sound too 'artificial' or 'ugly'.
<br>
There are at least three methods of making good sounds
with the above considerations:
<br>
a) by adding slightly
detuned
sounds (in ZynAddSubFX it is called ADsynth). The idea is not
new:
it has been used for thousands of years in choirs and ensembles. That's why
the choirs sounds so beautiful.
<br>
b) by generating white
noise,
substrating all harmonics with band-pass filters and adding the results
(in ZynAddSubFX it is called SUBsynth)<br>
c) by "drawing" the above graph
that represents the frequency amplitudes on a large array, put random
phases and do a single IFFT for the whole sample<br>
</p>
<p><u><font size="+1">2) The randomness of the sound</font></u>
<br>
The main reason why the digital synthesis sound
too "cold" is because the same recorded sample is played over and over
on each keypress. There is no difference between a note played the first
time
and second time. Exceptions may be the filtering and some effects, but
these are not enough. In natural or analogue instruments this doesn't
happen
because it is impossible to reproduce exactely the same condidtions for
each note. To make a warm instrument you have to make sure that it sounds
slightly different each time. In ZynAddSubFX you can do this:
<br>
a) In ADsynth, set the "Randomness" function from
Oscillator Editor to a value different than 0 or change the LFO's start
phase to the leftmost value
<br>
b) In SUBsynth, all notes already has randomness
because the starting sound is white noise<br>
</p>
<p> c) In PADSynth, I start the sample from random
positions on each keystroke<br>
</p>
<p><u><font size="+1"><br>
3) Decrease the amplitude of higher harmonics on low
velocity notes</font></u>
<br>
All natural notes have this property, because on
low velocity notes there is not enough energy to spread to higher
harmonics.
On artificial synthesis you can do this by using a lowpass filter that
lowers the cutoff frequency on notes with low velocities or, if you use
FM, by lowering the modulator index.
</p>
<p><u><font size="+1">4) The spectrum should be almost the same
according
to the frequencies and not to harmonics</font></u>
<br>
This means that, for example, the higher the
pitch is, the smaller the number of harmonics it will contain. This happens in a
natural instrument because of the resonance.
<br>
In this case there are many instruments that don't obey this, but
sound quite good (example: synth organ).
<br>
If you record the C-2 note from a piano and you play it at a very
high speed (8 times), the result will not sound like the C-5 key from the
piano. The pitch is C-5, but the timbre is very different. This is
because
the harmonic content is preserved (I mean the n-th harmonic will have
the
same amplitude in both cases) and not the spectrum (eg. the
amplitudes
of the harmonics around 1000 Hz are too different from one case to
another).
<br>
In artificial synthesis you can use filters to add
resonance or FM synthesis that varies the index according to the
frequency.
<br>
In ZynAddSubFX you can add the resonance:
<br>
a) In ADsynth, use the Resonance, a high harmonics
sound content and filters or FM.
<br>
b) In SUBsynth, you can add some harmonics
and use the Global Filter
<br>
<br>
</p>
</body>
</html>