# Just Launched: You can now import projects and releases from Google Code onto SourceForge

We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps.

## [640f1b]: scoregens / genfarey.xml Maximize Restore History

 ``` 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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280``` ``` GENfarey GENfarey "farey" Fills a table with the Farey Sequence Fn of the integer n. Description A Farey Sequence Fn of order n is a list of fractions in their lowest terms between 0 and 1 and in ascending order. Their denominators do not exceed n. This means a fraction a/b belongs to Fn if 0 ≤ a ≤ b ≤ n. The numerator and denominator of each fraction are always coprime. 0 and 1 are included in Fn as the fractions 0/1 and 1/1. For example F5 = {0/1, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1/1} Some properties of the Farey Sequence: If a/b and c/d are two successive terms of Fn, then bc - ad = 1. If a/b, c/d, e/f are three successive terms of Fn, then: c/d = (a+e) / (b+f). In this case c/d is called the mediant fraction between a/b and e/f. If n > 1, then no two successive terms ofFn have the same denominator. The length of any Farey Sequence Fn is determined by |Fn| = 1 + SUM over n (phi(m)) where phi(m) is Euler's totient function, which gives the number of integers ≤ m that are coprime to m. Some values for the length of Fn given n: n Fn 1 2 2 3 3 5 4 7 5 11 6 13 7 19 8 23 9 29 10 33 11 43 12 47 13 59 14 65 15 73 16 81 17 97 18 103 19 121 20 129 Syntax f # time size "farey" fareynum mode Initialization size -- number of points in the table. Must be a power of 2 or power-of-2 plus 1 (see f statement). fareynum -- the integer n for generating Farey Sequence Fn mode -- integer to trigger a specific output to be written into the table: 0 -- outputs floating point numbers representing the elements of Fn. 1 -- outputs delta values of successive elements of Fn, useful for generating note durations for example. 2 -- outputs only the denominators of the integer ratios, useful for indexing other tables or instruments for example. 3 -- same as mode 2 but with normalised output. 4 -- same as mode 0 but with 1 added to each number, useful for generating tables for tuning opcodes, for example cps2pch. Examples f1 0 -23 "farey" 8 0 Generates generates Farey Sequence F8. The table contains all 23 elements of F8 as floating point numbers. f1 0 -18 "farey" 7 1 This generates Farey Sequence F7. The table contains 18 delta values of F7, i.e. the difference between ri+1 - ri, where r is the ith element of Fn. f1 0 -43 "farey" 11 2 This generates Farey Sequence F11. The table contains the denominators of all 43 fractions in F11. f1 0 -43 "farey" 11 3 This generates Farey Sequence F11. The table contains the denominators of all 43 fractions in F11, each of those divided by 11, i.e. normalised. f1 0 -18 "farey" 7 4 This generates Farey Sequence F7. The table contains all fractions of F7, same as mode 0, but this time '1' is added to each table element. A simple example of the GENfarey routine. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. Here is a complete example of the GENfarey routine. It uses the files genfarey-2.csd. Another example of the GENfarey routine. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. These are the diagrams of the waveforms of the GENfarey routines, as used in the example: gidelta ftgen 100,0,-18,"farey",7,1 - delta values of Farey Sequence 7 gidelta ftgen 100,0,-18,"farey",7,1 - delta values of Farey Sequence 7 gimult ftgen 101,0,-18,"farey",7,2 - generate the denominators of fractions of F_7 gimult ftgen 101,0,-18,"farey",7,2 - generate the denominators of fractions of F_7 Credits Author: Georg Boenn University of Glamorgan 2010 New in Csound version 5.13 ```