krOrchestra Syntax:Headerkrkr
Sets the control rate.
Description
These statements are global value assignments, made
at the beginning of an orchestra, before any instrument block is
defined. Their function is to set certain reserved symbol
variables that are required for
performance. Once set, these reserved symbols can be used in
expressions anywhere in the orchestra.
Syntaxkr = iargInitializationkr = (optional) -- set control rate to iarg samples per second. The default value is 4410.
In addition, any global variable can be initialized by an init-time assignment anywhere before the first instr statement. All of the above assignments are run as instrument 0 (i-pass only) at the start of real performance.
Beginning with Csound version 3.46, kr can be omitted. Csound will use the default values, or calculate kr from defined ksmps and sr. It is usually better to just specify ksmps and sr and let csound calculate kr.
Examplessr= 10000
kr= 500
ksmps= 20
gi1 =sr/2.
ga init 0
itranspose =octpch(.0l)Examples
Here is an example of the kr opcode. It uses the file kr.csd.
Example of the kr opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See alsoOrchestra Header Statements