| 1 | |
| 2 | <appendix id="MiscWindows"> |
| 3 | <title>Window Functions</title> |
| 4 | |
| 5 | <para> |
| 6 | Windowing functions are used for analysis, and as waveform |
| 7 | envelopes, particularly in granular synthesis. Window functions |
| 8 | are built in to some opcodes, but others require a function table |
| 9 | to generate the window. <link |
| 10 | linkend="GEN20"><citetitle>GEN20</citetitle></link> is used for |
| 11 | this purpose. The diagram of each window below, is accompanied by |
| 12 | the f score statement and ftgen orchestra opcode used to generate |
| 13 | it. |
| 14 | </para> |
| 15 | |
| 16 | |
| 17 | <formalpara> |
| 18 | <title>Hamming</title> |
| 19 | <para> |
| 20 | <example> |
| 21 | <title>Hamming window function statement</title> |
| 22 | <programlisting><emphasis role="stamnt">f</emphasis>81 0 8192 20 1 1</programlisting> |
| 23 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 81, 0, 8192, 20, 1, 1</programlisting> |
| 24 | </example> |
| 25 | |
| 26 | <mediaobject> |
| 27 | <imageobject> |
| 28 | <imagedata fileref="images/image1.png" format="PNG"/> |
| 29 | </imageobject> |
| 30 | |
| 31 | <textobject> |
| 32 | <phrase>Hamming Window Function.</phrase> |
| 33 | </textobject> |
| 34 | |
| 35 | <caption> |
| 36 | <para>Hamming Window Function.</para> |
| 37 | </caption> |
| 38 | </mediaobject> |
| 39 | </para> |
| 40 | </formalpara> |
| 41 | |
| 42 | |
| 43 | <formalpara> |
| 44 | <title>Hanning</title> |
| 45 | <para> |
| 46 | <example> |
| 47 | <title>Hanning window function statement</title> |
| 48 | <programlisting><emphasis role="stamnt">f</emphasis>82 0 8192 20 2 1</programlisting> |
| 49 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 82, 0, 8192, 20, 2, 1</programlisting> |
| 50 | </example> |
| 51 | |
| 52 | <mediaobject> |
| 53 | <imageobject> |
| 54 | <imagedata fileref="images/image2.png" format="PNG"/> |
| 55 | </imageobject> |
| 56 | |
| 57 | <textobject> |
| 58 | <phrase>Hanning Window Function</phrase> |
| 59 | </textobject> |
| 60 | |
| 61 | <caption> |
| 62 | <para>Hanning Window Function</para> |
| 63 | </caption> |
| 64 | </mediaobject> |
| 65 | </para> |
| 66 | </formalpara> |
| 67 | |
| 68 | |
| 69 | <formalpara> |
| 70 | <title>Bartlett</title> |
| 71 | <para> |
| 72 | <example> |
| 73 | <title>Bartlett window function statement</title> |
| 74 | <programlisting><emphasis role="stamnt">f</emphasis>83 0 8192 20 3 1</programlisting> |
| 75 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 83, 0, 8192, 20, 3, 1</programlisting> |
| 76 | </example> |
| 77 | |
| 78 | <mediaobject> |
| 79 | <imageobject> |
| 80 | <imagedata fileref="images/image3.png" format="PNG"/> |
| 81 | </imageobject> |
| 82 | |
| 83 | <textobject> |
| 84 | <phrase>Bartlett Window Function</phrase> |
| 85 | </textobject> |
| 86 | |
| 87 | <caption> |
| 88 | <para>Bartlett Window Function</para> |
| 89 | </caption> |
| 90 | </mediaobject> |
| 91 | </para> |
| 92 | </formalpara> |
| 93 | |
| 94 | |
| 95 | <formalpara> |
| 96 | <title>Blackman</title> |
| 97 | <para> |
| 98 | <example> |
| 99 | <title>Blackman window function statement</title> |
| 100 | <programlisting><emphasis role="stamnt">f</emphasis>84 0 8192 20 4 1</programlisting> |
| 101 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 84, 0, 8192, 20, 4, 1</programlisting> |
| 102 | </example> |
| 103 | |
| 104 | <mediaobject> |
| 105 | <imageobject> |
| 106 | <imagedata fileref="images/image4.png" format="PNG"/> |
| 107 | </imageobject> |
| 108 | |
| 109 | <textobject> |
| 110 | <phrase>Blackman Window Function</phrase> |
| 111 | </textobject> |
| 112 | |
| 113 | <caption> |
| 114 | <para>Blackman Window Function</para> |
| 115 | </caption> |
| 116 | </mediaobject> |
| 117 | </para> |
| 118 | </formalpara> |
| 119 | |
| 120 | |
| 121 | <formalpara> |
| 122 | <title>Blackman-Harris</title> |
| 123 | <para> |
| 124 | <example> |
| 125 | <title>Blackman-Harris window function statement</title> |
| 126 | <programlisting><emphasis role="stamnt">f</emphasis>85 0 8192 20 5 1</programlisting> |
| 127 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 85, 0, 8192, 20, 5, 1</programlisting> |
| 128 | </example> |
| 129 | |
| 130 | <mediaobject> |
| 131 | <imageobject> |
| 132 | <imagedata fileref="images/image5.png" format="PNG"/> |
| 133 | </imageobject> |
| 134 | |
| 135 | <textobject> |
| 136 | <phrase>Blackman-Harris Window Function</phrase> |
| 137 | </textobject> |
| 138 | |
| 139 | <caption> |
| 140 | <para>Blackman-Harris Window Function</para> |
| 141 | </caption> |
| 142 | </mediaobject> |
| 143 | </para> |
| 144 | </formalpara> |
| 145 | |
| 146 | |
| 147 | <formalpara> |
| 148 | <title>Gaussian</title> |
| 149 | <para> |
| 150 | <example> |
| 151 | <title>Gaussian window function statement</title> |
| 152 | <programlisting><emphasis role="stamnt">f</emphasis>86 0 8192 20 6 1</programlisting> |
| 153 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 86, 0, 8192, 20, 6, 1</programlisting> |
| 154 | </example> |
| 155 | |
| 156 | <mediaobject> |
| 157 | <imageobject> |
| 158 | <imagedata fileref="images/image6.png" format="PNG"/> |
| 159 | </imageobject> |
| 160 | </mediaobject> |
| 161 | |
| 162 | <example> |
| 163 | <title>Gaussian window function statement with extra parameter</title> |
| 164 | <programlisting><emphasis role="stamnt">f</emphasis>61 0 8192 20 6 1 2</programlisting> |
| 165 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 61, 0, 8192, 20, 6, 1, 2</programlisting> |
| 166 | </example> |
| 167 | |
| 168 | <mediaobject> |
| 169 | <imageobject> |
| 170 | <imagedata fileref="images/image6a.png" format="PNG"/> |
| 171 | </imageobject> |
| 172 | |
| 173 | <textobject> |
| 174 | <phrase>Gaussian Window Function</phrase> |
| 175 | </textobject> |
| 176 | |
| 177 | <caption> |
| 178 | <para>Gaussian Window Function</para> |
| 179 | </caption> |
| 180 | </mediaobject> |
| 181 | </para> |
| 182 | </formalpara> |
| 183 | |
| 184 | |
| 185 | <formalpara> |
| 186 | <title>Kaiser</title> |
| 187 | <para> |
| 188 | <example> |
| 189 | <title>Kaiser window function statement as default (alpha=0)</title> |
| 190 | <programlisting><emphasis role="stamnt">f</emphasis>87 0 8192 20 7 1</programlisting> |
| 191 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 87, 0, 8192, 20, 7, 1</programlisting> |
| 192 | </example> |
| 193 | |
| 194 | <mediaobject> |
| 195 | <imageobject> |
| 196 | <imagedata fileref="images/image7.png" format="PNG"/> |
| 197 | </imageobject> |
| 198 | </mediaobject> |
| 199 | |
| 200 | <example> |
| 201 | <title>Kaiser window function statement with alpha=5</title> |
| 202 | <programlisting><emphasis role="stamnt">f</emphasis>71 0 8192 20 7 1 5</programlisting> |
| 203 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 71, 0, 8192, 20, 7, 1, 5</programlisting> |
| 204 | </example> |
| 205 | |
| 206 | <mediaobject> |
| 207 | <imageobject> |
| 208 | <imagedata fileref="images/image7a.png" format="PNG"/> |
| 209 | </imageobject> |
| 210 | </mediaobject> |
| 211 | |
| 212 | <example> |
| 213 | <title>Kaiser window function statement with alpha=10</title> |
| 214 | <programlisting><emphasis role="stamnt">f</emphasis>72 0 8192 20 7 1 10</programlisting> |
| 215 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 72, 0, 8192, 20, 7, 1, 10</programlisting> |
| 216 | </example> |
| 217 | |
| 218 | <mediaobject> |
| 219 | <imageobject> |
| 220 | <imagedata fileref="images/image7b.png" format="PNG"/> |
| 221 | </imageobject> |
| 222 | |
| 223 | <textobject> |
| 224 | <phrase>Kaiser Window Function</phrase> |
| 225 | </textobject> |
| 226 | |
| 227 | <caption> |
| 228 | <para>Kaiser Window Function</para> |
| 229 | </caption> |
| 230 | </mediaobject> |
| 231 | </para> |
| 232 | </formalpara> |
| 233 | |
| 234 | <formalpara> |
| 235 | <title>Rectangle</title> |
| 236 | <para> |
| 237 | <example> |
| 238 | <title>Rectangle window function statement</title> |
| 239 | <programlisting><emphasis role="stamnt">f</emphasis>88 0 8192 -20 8 .3</programlisting> |
| 240 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 88, 0, 8192, -20, 8, .3</programlisting> |
| 241 | </example> |
| 242 | |
| 243 | <mediaobject> |
| 244 | <imageobject> |
| 245 | <imagedata fileref="images/image8.png" format="PNG"/> |
| 246 | </imageobject> |
| 247 | |
| 248 | <textobject> |
| 249 | <phrase>Rectangle Window Function</phrase> |
| 250 | </textobject> |
| 251 | |
| 252 | <caption> |
| 253 | <para>Rectangle Window Function</para> |
| 254 | </caption> |
| 255 | </mediaobject> |
| 256 | </para> |
| 257 | </formalpara> |
| 258 | |
| 259 | |
| 260 | <formalpara> |
| 261 | <title>Sinc</title> |
| 262 | <para> |
| 263 | <example> |
| 264 | <title>Sinc window function statement (default and max=0.8)</title> |
| 265 | <programlisting><emphasis role="stamnt">f</emphasis>89 0 8192 -20 9 .8</programlisting> |
| 266 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 89, 0, 8192, -20, 9, .8</programlisting> |
| 267 | </example> |
| 268 | |
| 269 | <mediaobject> |
| 270 | <imageobject> |
| 271 | <imagedata fileref="images/image9.png" format="PNG"/> |
| 272 | </imageobject> |
| 273 | </mediaobject> |
| 274 | |
| 275 | <example> |
| 276 | <title>Sinc window function statement (-3π to +3π and normalized)</title> |
| 277 | <programlisting><emphasis role="stamnt">f</emphasis>89 0 8192 20 9 1 3</programlisting> |
| 278 | <programlisting>i0 <emphasis role="nb">ftgen</emphasis> 89, 0, 8192, 20, 9, 1, 3</programlisting> |
| 279 | </example> |
| 280 | |
| 281 | <mediaobject> |
| 282 | <imageobject> |
| 283 | <imagedata fileref="images/image9a.png" format="PNG"/> |
| 284 | </imageobject> |
| 285 | |
| 286 | <textobject> |
| 287 | <phrase>Sinc Window Function</phrase> |
| 288 | </textobject> |
| 289 | |
| 290 | <caption> |
| 291 | <para>Sinc Window Function</para> |
| 292 | </caption> |
| 293 | </mediaobject> |
| 294 | </para> |
| 295 | </formalpara> |
| 296 | </appendix> |