fof2
Produces sinusoid bursts including k-rate incremental indexing with each successive burst.
Audio output is a succession of sinusoid bursts initiated at frequency xfund with a spectral peak at xform. For xfund above 25 Hz these bursts produce a speech-like formant with spectral characteristics determined by the k-input parameters. For lower fundamentals this generator provides a special form of granular synthesis.
fof2 implements k-rate incremental indexing into ifna function with each successive burst.
Syntax
ares fof2 xamp, xfund, xform, koct, kband, kris, kdur, kdec, iolaps, \
ifna, ifnb, itotdur, kphs, kgliss [, iskip]
Initialization
iolaps -- number of preallocated spaces needed to hold overlapping burst data. Overlaps are frequency dependent, and the space required depends on the maximum value of xfund * kdur. Can be over-estimated at no computation cost. Uses less than 50 bytes of memory per iolap.
ifna, ifnb -- table numbers of two stored functions. The first is a sine table for sineburst synthesis (size of at least 4096 recommended). The second is a rise shape, used forwards and backwards to shape the sineburst rise and decay; this may be linear (GEN07) or perhaps a sigmoid (GEN19).
itotdur -- total time during which this fof will be active. Normally set to p3. No new sineburst is created if it cannot complete its kdur within the remaining itotdur.
iskip (optional, default=0) -- If non-zero, skip initialization (allows legato use).
Performance
xamp -- peak amplitude of each sineburst, observed at the true end of its rise pattern. The rise may exceed this value given a large bandwidth (say, Q < 10) and/or when the bursts are overlapping.
xfund -- the fundamental frequency (in Hertz) of the impulses that create new sinebursts.
xform -- the formant frequency, i.e. freq of the sinusoid burst induced by each xfund impulse. This frequency can be fixed for each burst or can vary continuously.
koct -- octaviation index, normally zero. If greater than zero, lowers the effective xfund frequency by attenuating odd-numbered sinebursts. Whole numbers are full octaves, fractions transitional.
kband -- the formant bandwidth (at -6dB), expressed in Hz. The bandwidth determines the rate of exponential decay throughout the sineburst, before the enveloping described below is applied.
kris, kdur, kdec -- rise, overall duration, and decay times (in seconds) of the sinusoid burst. These values apply an enveloped duration to each burst, in similar fashion to a Csound linen generator but with rise and decay shapes derived from the ifnb input. kris inversely determines the skirtwidth (at -40 dB) of the induced formant region. kdur affects the density of sineburst overlaps, and thus the speed of computation. Typical values for vocal imitation are .003,.02,.007.
kphs -- allows k-rate indexing of function table ifna with each successive burst, making it suitable for time-warping applications. Values of kphs are normalized from 0 to 1, 1 being the end of the function table ifna.
kgliss -- sets the end pitch of each grain relative to the initial pitch, in octaves. Thus kgliss = 2 means that the grain ends two octaves above its initial pitch, while kgliss = -3/4 has the grain ending a major sixth below. Each 1/12 added to kgliss raises the ending frequency one half-step. If you want no glissando, set kgliss to 0.
Csound's fof generator is loosely based on Michael Clarke's C-coding of IRCAM's CHANT program (Xavier Rodet et al.). Each fof produces a single formant, and the output of four or more of these can be summed to produce a rich vocal imitation. fof synthesis is a special form of granular synthesis, and this implementation aids transformation between vocal imitation and granular textures. Computation speed depends on kdur, xfund, and the density of any overlaps.
Note
The ending frequency of any grain is equal to kform * (2 ^ kgliss), so setting kgliss too high may result in aliasing. For example, kform = 3000 and kgliss = 3 places the ending frequency over the Nyquist if sr = 44100. It is a good idea to scale kgliss accordingly.
Examples
Here is an example of the fof2 opcode. It uses the file fof2.csd.
Here is another example of the fof2 opcode, which generates vowel tones using formants generated by fof2 coinciding with values from the Formant Values appendix. It uses the file fof2-2.csd.
Example of the fof2 opcode to produce vowel sounds. | |
---|---|
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 178 |
|
See Also
Credits
Author: Rasmus Ekman
fof2 is a modification of fof by Rasmus Ekman
New in Csound 3.45