Orchestra Macros
Orchestra macros work like C preprocessor macros, and replace the content of the macro in the orchestra before it is compiled. The opcodes one can use to create, call, or undefine orchestra macros are:
#define$NAME#ifdef#ifndef#end#else#include#includestr#undef
Orchestra macros can also be defined using the command line flag --omacro:.
More information and examples on the usage of orchestra macros can be found in the entry for #define.
These opcodes refer to orchestra macros; for score macros, refer to Score Macros.
Predefined Math Constant MacrosNew in Csound 5.04 are predefined Math Constant Macros. The values
defined are those found in the C header math.h, and are automatically
defined when Csound starts and available for use in orchestras.MacroValueEquivalent to$M_E2.7182818284590452354e$M_LOG2E1.4426950408889634074log_2(e)$M_LOG10E0.43429448190325182765log_10(e)$M_LN20.69314718055994530942log_e(2)$M_LN102.30258509299404568402log_e(10)$M_PI3.14159265358979323846pi$M_PI_21.57079632679489661923pi/2$M_PI_40.78539816339744830962pi/4$M_1_PI0.318309886183790671541/pi$M_2_PI0.636619772367581343082/pi$M_2_SQRTPI1.128379167095512573902/sqrt(pi)$M_SQRT21.41421356237309504880sqrt(2)$M_SQRT1_20.707106781186547524401/sqrt(2)