|
Csound API
6.18
|
#include "sysdep.h"#include "cs_par_structs.h"#include <stdarg.h>#include <setjmp.h>#include "csound_type_system.h"#include "csound.h"#include "cscore.h"#include "csound_data_structures.h"#include "csound_standard_types.h"#include "pools.h"#include "sort.h"#include "text.h"#include "prototyp.h"#include "cwindow.h"#include "envvar.h"#include "remote.h"#include "find_opcode.h"Data Structures | |
| struct | CORFIL |
| struct | OPARMS |
| struct | arglst |
| struct | arg |
| struct | oentry |
| struct | text |
| Storage for parsed orchestra code, for each opcode in an INSTRTXT. More... | |
| struct | instr |
| This struct is filled out by otran() at orch parse time. More... | |
| struct | namedInstr |
| struct | op |
| A chain of TEXT structs. More... | |
| struct | fdch |
| struct | auxch |
| struct | AUXASYNC |
| AuxAllocAsync data. More... | |
| struct | ARRAYDAT |
| struct | TABDAT |
| struct | STRINGDAT |
| struct | monblk |
| struct | DPEXCL |
| struct | DPARM |
| struct | dklst |
| struct | mchnblk |
| struct | event |
| This struct holds the data for one score event. More... | |
| struct | insds |
| This struct holds the info for a concrete instrument event instance in performance. More... | |
| struct | opds |
| This struct holds the info for one opcode in a concrete instrument instance in performance. More... | |
| struct | lblblk |
| struct | OCTDAT |
| struct | DOWNDAT |
| struct | SPECDAT |
| struct | GEN01ARGS |
| struct | FUNC |
| struct | FGDATA |
| struct | NGFENS |
| struct | MEMFIL |
| struct | MEVENT |
| struct | SNDMEMFILE_ |
| struct | pvx_memfile_ |
| union | MIDIMESSAGE |
| struct | midiglobals |
| struct | eventnode |
| struct | TEMPO |
| struct | names |
| struct | threadInfo |
| struct | MACRON |
| struct | MACRO |
| struct | in_stack_s |
| struct | marked_sections |
| struct | namelst |
| struct | NAME__ |
| struct | opcodinfo |
| struct | engine_state |
| This struct will hold the current engine state after compilation. More... | |
| struct | _FFT_SETUP |
| Nen FFT interface. More... | |
| struct | MODULE_INFO |
| plugin module info More... | |
| struct | _alloc_data_ |
| struct | _message_queue_t_ |
| struct | CSOUND_ |
| Contains all function pointers, data, and data pointers required to run one instance of Csound. More... | |
| struct | CSOUND_::sread__ |
| struct | CSOUND_::onefileStatics__ |
| struct | CSOUND_::lineventStatics__ |
| struct | CSOUND_::musmonStatics__ |
| struct | CSOUND_::libsndStatics__ |
Macros | |
| #define | CSOUNDCORE_H |
| #define | _MM_DENORMALS_ZERO_MASK 0 |
| #define | _MM_DENORMALS_ZERO_ON 0 |
| #define | _MM_DENORMALS_ZERO_OFF 0 |
| #define | _MM_SET_DENORMALS_ZERO_MODE(mode) |
| #define | OK (0) |
| #define | NOTOK (-1) |
| #define | CSFILE_FD_R 1 |
| #define | CSFILE_FD_W 2 |
| #define | CSFILE_STD 3 |
| #define | CSFILE_SND_R 4 |
| #define | CSFILE_SND_W 5 |
| #define | MAXINSNO (200) |
| #define | PMAX (1998) |
| #define | VARGMAX (1999) |
| #define | NOT_AN_INSTRUMENT INT32_MAX |
| #define | ORTXT h.optext->t |
| #define | INCOUNT ORTXT.inlist->count |
| #define | OUTCOUNT ORTXT.outlist->count /* Not used */ |
| #define | INOCOUNT ORTXT.inArgCount |
| #define | OUTOCOUNT ORTXT.outArgCount |
| #define | IS_ASIG_ARG(x) (csoundGetTypeForArg(x) == &CS_VAR_TYPE_A) |
| #define | IS_STR_ARG(x) (csoundGetTypeForArg(x) == &CS_VAR_TYPE_S) |
| #define | CURTIME (((double)csound->icurTime)/((double)csound->esr)) |
| #define | CURTIME_inc (((double)csound->ksmps)/((double)csound->esr)) |
| #define | MAXLEN 0x1000000L |
| #define | FMAXLEN ((MYFLT)(MAXLEN)) |
| #define | PHMASK 0x0FFFFFFL |
| #define | MAX_STRING_CHANNEL_DATASIZE 16384 |
| #define | PFRAC(x) ((MYFLT)((x) & ftp->lomask) * ftp->lodiv) |
| #define | MAXPOS 0x7FFFFFFFL |
| #define | BYTREVS(n) ((n>>8 & 0xFF) | (n<<8 & 0xFF00)) |
| #define | BYTREVL(n) |
| #define | OCTRES 8192 |
| #define | CPSOCTL(n) ((MYFLT)(1<<((int)(n)>>13))*csound->cpsocfrc[(int)(n)&8191]) |
| #define | LOBITS 10 |
| #define | LOFACT 1024 |
| #define | LOSCAL FL(0.0009765625) |
| #define | LOMASK 1023 |
| #define | SSTRCOD (float)NAN |
| #define | SSTRSIZ 1024 |
| #define | ALLCHNLS 0x7fff |
| #define | DFLT_SR FL(44100.0) |
| #define | DFLT_KR FL(4410.0) |
| #define | DFLT_KSMPS 10 |
| #define | DFLT_NCHNLS 1 |
| #define | MAXCHNLS 256 |
| #define | MAXNAME (256) |
| #define | DFLT_DBFS (FL(32768.0)) |
| #define | MAXOCTS 8 |
| #define | MAXCHAN 16 /* 16 MIDI channels; only one port for now */ |
| #define | ONEPT (csound->A4/430.5389646099018460319362438314060262605) |
| #define | LOG10D20 0.11512925 /* for db to ampfac */ |
| #define | DV32768 FL(0.000030517578125) |
| #define | PI (3.141592653589793238462643383279502884197) |
| #define | TWOPI (6.283185307179586476925286766559005768394) |
| #define | HALFPI (1.570796326794896619231321691639751442099) |
| #define | PI_F ((MYFLT) PI) |
| #define | TWOPI_F ((MYFLT) TWOPI) |
| #define | HALFPI_F ((MYFLT) HALFPI) |
| #define | INF (2147483647.0) |
| #define | ROOT2 (1.414213562373095048801688724209698078569) |
| #define | CS_AMPLMSG 01 |
| #define | CS_RNGEMSG 02 |
| #define | CS_WARNMSG 04 |
| #define | CS_NOMSG 0x10 |
| #define | CS_RAWMSG 0x40 |
| #define | CS_TIMEMSG 0x80 |
| #define | CS_NOQQ 0x400 |
| #define | IGN(X) (void) X |
| #define | ARG_CONSTANT 0 |
| #define | ARG_STRING 1 |
| #define | ARG_PFIELD 2 |
| #define | ARG_GLOBAL 3 |
| #define | ARG_LOCAL 4 |
| #define | ARG_LABEL 5 |
| #define | ASYNC_GLOBAL 1 |
| #define | ASYNC_LOCAL 2 |
| #define | CS_KSMPS (p->h.insdshead->ksmps) |
| #define | CS_KCNT (p->h.insdshead->kcounter) |
| #define | CS_EKR (p->h.insdshead->ekr) |
| #define | CS_ONEDKSMPS (p->h.insdshead->onedksmps) |
| #define | CS_ONEDKR (p->h.insdshead->onedkr) |
| #define | CS_KICVT (p->h.insdshead->kicvt) |
| #define | CS_ESR (csound->esr) |
| #define | CS_PDS (p->h.insdshead->pds) |
| #define | CS_SPIN (p->h.insdshead->spin) |
| #define | CS_SPOUT (p->h.insdshead->spout) |
| #define | INSTR 1 |
| #define | ENDIN 2 |
| #define | OPCODE 3 |
| #define | ENDOP 4 |
| #define | LABEL 5 |
| #define | SETBEG 6 |
| #define | PSET 6 |
| #define | USEROPCODE 7 |
| #define | SETEND 8 |
| #define | TOKMAX 50L /* Should be 50 but bust */ |
| #define | OPCODENUMOUTS_LOW 16 |
| #define | OPCODENUMOUTS_HIGH 64 |
| #define | OPCODENUMOUTS_MAX 256 |
| #define | MBUFSIZ (4096) |
| #define | MIDIINBUFMAX (1024) |
| #define | MIDIINBUFMSK (MIDIINBUFMAX-1) |
| #define | MIDIMAXPORTS (64) |
| #define | CS_STATE_PRE (1) |
| #define | CS_STATE_COMP (2) |
| #define | CS_STATE_UTIL (4) |
| #define | CS_STATE_CLN (8) |
| #define | CS_STATE_JMP (16) |
| #define | MARGS (3) |
| #define | MAX_INCLUDE_DEPTH 100 |
| #define | MAX_ALLOC_QUEUE 1024 |
| #define | MAX_MESSAGE_STR 1024 |
| #define | NAMELEN 40 /* array size of repeat macro names */ |
| #define | RPTDEPTH 40 /* size of repeat_n arrays (39 loop levels) */ |
| #define | LINKAGE_BUILTIN(name) |
| #define | FLINKAGE_BUILTIN(name) |
Private Data | |
Private Data in the CSOUND struct to be used internally by the Csound library and should be hidden from plugins. If a new variable member is needed by the library, add it below, as a private data member. If access is required solely by plugins (and not internally by the library), use the CreateGlobalVariable() etc. interface, instead of adding to CSOUND. If you find that a plugin needs to access existing private data, first check above for an existing interface; if none is available, add one. Please avoid giving full access, or allowing plugins to change the values of private members, by using one of the two methods below: 1) To get the data member value: returnType (*GetVar)(CSOUND *) 2) in case of pointers, data should be copied out to a supplied memory slot, rather than the pointer being obtained: | |
| #define | LBUFSIZ 32768 |
Typedefs | |
| typedef struct CORFIL | CORFIL |
| typedef struct arglst | ARGLST |
| typedef struct arg | ARG |
| typedef struct oentry | OENTRY |
| typedef struct text | TEXT |
| Storage for parsed orchestra code, for each opcode in an INSTRTXT. More... | |
| typedef struct instr | INSTRTXT |
| This struct is filled out by otran() at orch parse time. More... | |
| typedef struct namedInstr | INSTRNAME |
| typedef struct op | OPTXT |
| A chain of TEXT structs. More... | |
| typedef struct fdch | FDCH |
| typedef struct auxch | AUXCH |
| typedef AUXCH *(* | aux_cb) (CSOUND *, void *, AUXCH *) |
| this callback is used to notify the availability of new storage in AUXCH *. More... | |
| typedef struct monblk | MONPCH |
| typedef struct dklst | DKLST |
| typedef struct mchnblk | MCHNBLK |
| typedef struct event | EVTBLK |
| This struct holds the data for one score event. More... | |
| typedef struct insds | INSDS |
| This struct holds the info for a concrete instrument event instance in performance. More... | |
| typedef int(* | SUBR) (CSOUND *, void *) |
| typedef struct opds | OPDS |
| This struct holds the info for one opcode in a concrete instrument instance in performance. More... | |
| typedef struct lblblk | LBLBLK |
| typedef int(* | GEN) (FGDATA *, FUNC *) |
| typedef struct MEMFIL | MEMFIL |
| typedef struct SNDMEMFILE_ | SNDMEMFILE |
| typedef struct pvx_memfile_ | PVOCEX_MEMFILE |
| typedef struct midiglobals | MGLOBAL |
| typedef struct eventnode | EVTNODE |
| typedef struct names | NAMES |
| typedef struct threadInfo | THREADINFO |
| typedef struct MACRON | MACRON |
| typedef struct MACRO | MACRO |
| typedef struct in_stack_s | IN_STACK |
| typedef struct marked_sections | MARKED_SECTIONS |
| typedef struct namelst | NAMELST |
| typedef struct NAME__ | NAME |
| typedef struct opcodinfo | OPCODINFO |
| typedef struct engine_state | ENGINE_STATE |
| This struct will hold the current engine state after compilation. More... | |
| typedef struct _FFT_SETUP | CSOUND_FFT_SETUP |
| Nen FFT interface. More... | |
| typedef struct _alloc_data_ | ALLOC_DATA |
| typedef struct _message_queue_t_ | message_string_queue_t |
Enumerations | |
| enum | { FFT_LIB =0, PFFT_LIB, VDSP_LIB } |
| enum | { FFT_FWD =0, FFT_INV } |
Functions | |
| int | ISSTRCOD (MYFLT) |
| int | kperf_nodebug (CSOUND *csound) |
| int | kperf_debug (CSOUND *csound) |
Variables | |
| int32 | MYNAN |
| const uint32_t | csOrcMask |
| const uint32_t | csScoInMask |
| const uint32_t | csScoSortMask |
| const uint32_t | csMidiScoMask |
| const uint32_t | csPlayScoMask |
| #define _MM_DENORMALS_ZERO_MASK 0 |
| #define _MM_DENORMALS_ZERO_OFF 0 |
| #define _MM_DENORMALS_ZERO_ON 0 |
| #define _MM_SET_DENORMALS_ZERO_MODE | ( | mode | ) |
| #define ALLCHNLS 0x7fff |
| #define ARG_CONSTANT 0 |
| #define ARG_GLOBAL 3 |
| #define ARG_LABEL 5 |
| #define ARG_LOCAL 4 |
| #define ARG_PFIELD 2 |
| #define ARG_STRING 1 |
| #define ASYNC_GLOBAL 1 |
| #define ASYNC_LOCAL 2 |
| #define BYTREVL | ( | n | ) |
| #define BYTREVS | ( | n | ) | ((n>>8 & 0xFF) | (n<<8 & 0xFF00)) |
| #define CPSOCTL | ( | n | ) | ((MYFLT)(1<<((int)(n)>>13))*csound->cpsocfrc[(int)(n)&8191]) |
| #define CS_AMPLMSG 01 |
| #define CS_EKR (p->h.insdshead->ekr) |
| #define CS_ESR (csound->esr) |
| #define CS_KCNT (p->h.insdshead->kcounter) |
| #define CS_KICVT (p->h.insdshead->kicvt) |
| #define CS_KSMPS (p->h.insdshead->ksmps) |
| #define CS_NOMSG 0x10 |
| #define CS_NOQQ 0x400 |
| #define CS_ONEDKR (p->h.insdshead->onedkr) |
| #define CS_ONEDKSMPS (p->h.insdshead->onedksmps) |
| #define CS_PDS (p->h.insdshead->pds) |
| #define CS_RAWMSG 0x40 |
| #define CS_RNGEMSG 02 |
| #define CS_SPIN (p->h.insdshead->spin) |
| #define CS_SPOUT (p->h.insdshead->spout) |
| #define CS_STATE_CLN (8) |
| #define CS_STATE_COMP (2) |
| #define CS_STATE_JMP (16) |
| #define CS_STATE_PRE (1) |
| #define CS_STATE_UTIL (4) |
| #define CS_TIMEMSG 0x80 |
| #define CS_WARNMSG 04 |
| #define CSFILE_FD_R 1 |
| #define CSFILE_FD_W 2 |
| #define CSFILE_SND_R 4 |
| #define CSFILE_SND_W 5 |
| #define CSFILE_STD 3 |
| #define CSOUNDCORE_H |
| #define CURTIME (((double)csound->icurTime)/((double)csound->esr)) |
| #define CURTIME_inc (((double)csound->ksmps)/((double)csound->esr)) |
| #define DFLT_DBFS (FL(32768.0)) |
| #define DFLT_KR FL(4410.0) |
| #define DFLT_KSMPS 10 |
| #define DFLT_NCHNLS 1 |
| #define DFLT_SR FL(44100.0) |
| #define DV32768 FL(0.000030517578125) |
| #define ENDIN 2 |
| #define ENDOP 4 |
| #define FLINKAGE_BUILTIN | ( | name | ) |
| #define FMAXLEN ((MYFLT)(MAXLEN)) |
| #define HALFPI (1.570796326794896619231321691639751442099) |
| #define HALFPI_F ((MYFLT) HALFPI) |
| #define IGN | ( | X | ) | (void) X |
| #define INCOUNT ORTXT.inlist->count |
| #define INF (2147483647.0) |
| #define INOCOUNT ORTXT.inArgCount |
| #define INSTR 1 |
| #define IS_ASIG_ARG | ( | x | ) | (csoundGetTypeForArg(x) == &CS_VAR_TYPE_A) |
| #define IS_STR_ARG | ( | x | ) | (csoundGetTypeForArg(x) == &CS_VAR_TYPE_S) |
| #define LABEL 5 |
| #define LBUFSIZ 32768 |
| #define LINKAGE_BUILTIN | ( | name | ) |
| #define LOBITS 10 |
| #define LOFACT 1024 |
| #define LOG10D20 0.11512925 /* for db to ampfac */ |
| #define LOMASK 1023 |
| #define LOSCAL FL(0.0009765625) |
| #define MARGS (3) |
| #define MAX_ALLOC_QUEUE 1024 |
| #define MAX_INCLUDE_DEPTH 100 |
| #define MAX_MESSAGE_STR 1024 |
| #define MAX_STRING_CHANNEL_DATASIZE 16384 |
| #define MAXCHAN 16 /* 16 MIDI channels; only one port for now */ |
| #define MAXCHNLS 256 |
| #define MAXINSNO (200) |
| #define MAXLEN 0x1000000L |
| #define MAXNAME (256) |
| #define MAXOCTS 8 |
| #define MAXPOS 0x7FFFFFFFL |
| #define MBUFSIZ (4096) |
| #define MIDIINBUFMAX (1024) |
| #define MIDIINBUFMSK (MIDIINBUFMAX-1) |
| #define MIDIMAXPORTS (64) |
| #define NAMELEN 40 /* array size of repeat macro names */ |
| #define NOT_AN_INSTRUMENT INT32_MAX |
| #define NOTOK (-1) |
| #define OCTRES 8192 |
| #define OK (0) |
| #define ONEPT (csound->A4/430.5389646099018460319362438314060262605) |
| #define OPCODE 3 |
| #define OPCODENUMOUTS_HIGH 64 |
| #define OPCODENUMOUTS_LOW 16 |
| #define OPCODENUMOUTS_MAX 256 |
| #define ORTXT h.optext->t |
| #define OUTCOUNT ORTXT.outlist->count /* Not used */ |
| #define OUTOCOUNT ORTXT.outArgCount |
| #define PFRAC | ( | x | ) | ((MYFLT)((x) & ftp->lomask) * ftp->lodiv) |
| #define PHMASK 0x0FFFFFFL |
| #define PI (3.141592653589793238462643383279502884197) |
| #define PI_F ((MYFLT) PI) |
| #define PMAX (1998) |
| #define PSET 6 |
| #define ROOT2 (1.414213562373095048801688724209698078569) |
| #define RPTDEPTH 40 /* size of repeat_n arrays (39 loop levels) */ |
| #define SETBEG 6 |
| #define SETEND 8 |
| #define SSTRCOD (float)NAN |
| #define SSTRSIZ 1024 |
| #define TOKMAX 50L /* Should be 50 but bust */ |
| #define TWOPI (6.283185307179586476925286766559005768394) |
| #define TWOPI_F ((MYFLT) TWOPI) |
| #define USEROPCODE 7 |
| #define VARGMAX (1999) |
| typedef struct _alloc_data_ ALLOC_DATA |
this callback is used to notify the availability of new storage in AUXCH *.
It can be used to swap the old storage for the new one and return it for deallocation.
| typedef struct _FFT_SETUP CSOUND_FFT_SETUP |
Nen FFT interface.
| typedef struct engine_state ENGINE_STATE |
This struct will hold the current engine state after compilation.
| typedef struct in_stack_s IN_STACK |
This struct holds the info for a concrete instrument event instance in performance.
| typedef struct namedInstr INSTRNAME |
This struct is filled out by otran() at orch parse time.
It is used as a template for instrument events.
| typedef struct marked_sections MARKED_SECTIONS |
| typedef struct _message_queue_t_ message_string_queue_t |
| typedef struct midiglobals MGLOBAL |
This struct holds the info for one opcode in a concrete instrument instance in performance.
A chain of TEXT structs.
Note that this is identical with the first two members of struct INSTRTEXT, and is so typecast at various points in code.
| typedef struct pvx_memfile_ PVOCEX_MEMFILE |
| typedef struct SNDMEMFILE_ SNDMEMFILE |
| typedef int(* SUBR) (CSOUND *, void *) |
| typedef struct threadInfo THREADINFO |
| int ISSTRCOD | ( | MYFLT | ) |
| int kperf_debug | ( | CSOUND * | csound | ) |
| int kperf_nodebug | ( | CSOUND * | csound | ) |
| const uint32_t csMidiScoMask |
| const uint32_t csOrcMask |
| const uint32_t csPlayScoMask |
| const uint32_t csScoInMask |
| const uint32_t csScoSortMask |
| int32 MYNAN |