|René Nyffenegger's collection of things on the web|
René Nyffenegger on Oracle - Most wanted - Feedback
f (Csound opcode)
f tbl_no tim siz gen [p5 [p6...]]
Generates a function table.
tbl_no: The number of the table that is to be filled. This number will be used when referencing the table such as for example in tablei.
tim: The time when the table is to be filled.
siz: Number of points in the table. Must be a power of two or a power of two plus one (either 2n or 2n+1).
gen: On of the generation numbers. See below....
Function table gen routines
A negative value will cause rescaling to be omitted.
Transfers data from immediate pfields into a function table.
f2 is, together with f17 a routine that generates tables from numeric values.
A positive 2 (p4 field) causes the table to be post-normalized (rescaled to a maximum absolute value of 1 after generation). A negative 2 (-2) will cause rescaling to be skipped.
f1 0 8 2 0 0 1 1 1 -1 -0.5 -1 i1 0 1 30000 6.00
This produces the following output:
Generates a normalizing function by examining the contents of an existing table.
f # time size 4 source# sourcemode
source#: is the table to be examinded.
sourcemode: 0: scan from left to right; <>0: scan begins in mid
Construct a function table from segments of exponential curves
f# time size 5 a n1 b n2 c . . .
Constructs a function table from segments of straight lines.
f# time size 7 a n1 b n2 c . . .
Generates a piecewise cubic spline curve, the smoothest possible through all specified points.
f1 0 2048 8 -1 512 1 512 0.7 512 0.2 512 -1 i1 0 1
This orc file together with the sco file will produce the following output:
f # time size 9 pna stra phsa pnb strb phsb . . .
Generates a function table whose values are construed like str1 * sin(x) + str2 * sin(2*x) + str3 * sin(3*x)
f # time size 10 str1 str2 str3 str4 . . . .
strn: Strengths of partials.
The gen10 routine can be used to create a sine. This is the case if there are no overtones (ie if str1 <> 0 and str2, str3 ... = 0)
Generates a table as a sum of Chebychev polynoms which can be used as a transfer function for waveshaping.
f4 can then be used to generate a normalizing function for the transfer function generated with f13.
f17 is, together with f2 a routine that generates tables from numeric values.
f # time size 19 pna stra phsa dcoa pnb strb phsb dcob . . .
Usually used for the grain opcode.
Other Csound opcodes.