blob: e6fa4ff955d0b11a3c2d3d274d3484412669181d (
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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About Additive - gungerky</title>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<h1>Additive Instrument Component</h1>
<span>Code written by Kyle Gunger</span>
<p>
CAdditiveInstrument is first initialized by a pointer to the parameter xml node,<br>
which it uses to populate the parameters such as sound definitions. Afterward it<br>
is given the Note, from which it reads things like the starting and ending frequency<br>
as well as the starting and ending sound definition. Internally it uses a vector of<br>
CSoundDef classes to hold the sound definitions, each represents a summation of sin<br>
waves. It also uses a CCrossFade and CADSR node to represent the fading between<br>
CSoundDef and Envelope, respectively. It uses the proper CSoundDefs as sources for<br>
the CCrossFade node and the CCrossFade node as source for the CADSR node. When<br>
Generate is called on the CADSR node it is called recursivly on the child nodes and<br>
then interpolated via the ADSR rules.<br><br>
In generating the soundwave, it checks the envelope to see how far along we are, and uses<br>
that percentage to interpolate both the frequency and cross-fading.
</p>
<span class="attr">Supported grading elements:</span>
<ul>
<li>Sinusoid playback - Yes</li>
<li>Harmonic definition - Yes</li>
<li>Envelope - Yes</li>
<li>Polyphony - Yes (via synthesizer controller)</li>
<li>Sound cross-fading - Yes</li>
<li>Glissando - Yes (only between two notes at a time)</li>
</ul>
</body>
</html>
|