Csound API  6.01
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Data Structures | Macros | Typedefs | Variables
csoundCore.h File Reference
#include "sysdep.h"
#include <pthread.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 "pools.h"

Data Structures

struct  CORFIL
 
struct  OPARMS
 
struct  arglst
 
struct  arg
 
struct  oentry
 
struct  oentries
 
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  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_
 
struct  S_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  MODULE_INFO
 plugin module info More...
 
struct  CSOUND_
 Contains all function pointers, data, and data pointers required to run one instance of Csound. More...
 

Macros

#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 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 XINCODE   ORTXT.xincod
 
#define XINARG1   (p->XINCODE & 1)
 
#define XINARG2   (p->XINCODE & 2)
 
#define XINARG3   (p->XINCODE & 4)
 
#define XINARG4   (p->XINCODE & 8)
 
#define XINARG5   (p->XINCODE &16)
 
#define XOUTCODE   ORTXT.xoutcod
 
#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 ISSTRCOD(X)   isnan(X)
 
#define SSTRSIZ   200
 
#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   1.02197486 /* A440 tuning factor */
 
#define LOG10D20   0.11512925 /* for db to ampfac */
 
#define DV32768   FL(0.000030517578125)
 
#define PI   (3.141592653589793238462643383279502884197)
 
#define TWOPI   (6.283185307179586476925286766559005768394)
 
#define PI_F   ((MYFLT) PI)
 
#define TWOPI_F   ((MYFLT) TWOPI)
 
#define INF   (2147483647.0)
 
#define AMPLMSG   01
 
#define RNGEMSG   02
 
#define WARNMSG   04
 
#define RAWMSG   0x40
 
#define TIMEMSG   0x80
 
#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 MARGS   (3)
 
#define LINKAGE_BUILTIN(name)
 
#define FLINKAGE_BUILTIN(name)
 

Typedefs

typedef struct CORFIL CORFIL
 
typedef struct arglst ARGLST
 
typedef struct arg ARG
 
typedef struct oentry OENTRY
 
typedef struct oentries OENTRIES
 
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 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 S_MACRO S_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...
 

Variables

int32 MYNAN
 

Macro Definition Documentation

#define ALLCHNLS   0x7fff
#define AMPLMSG   01
#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)
Value:
((n>>24 & 0xFF) | (n>>8 & 0xFF00L) | \
(n<<8 & 0xFF0000L) | (n<<24 & 0xFF000000L))
#define BYTREVS (   n)    ((n>>8 & 0xFF) | (n<<8 & 0xFF00))
#define CPSOCTL (   n)    ((MYFLT)(1<<((int)(n)>>13))*csound->cpsocfrc[(int)(n)&8191])
#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_ONEDKR   (p->h.insdshead->onedkr)
#define CS_ONEDKSMPS   (p->h.insdshead->onedksmps)
#define CS_PDS   (p->h.insdshead->pds)
#define CS_SPIN   (p->h.insdshead->spin)
#define CS_SPOUT   (p->h.insdshead->spout)
#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 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 FLINKAGE_BUILTIN (   name)
Value:
NGFENS* name##_init(CSOUND *csound) \
{ (void) csound; return name; }
Contains all function pointers, data, and data pointers required to run one instance of Csound...
Definition: csoundCore.h:899
Definition: csoundCore.h:634
#define FMAXLEN   ((MYFLT)(MAXLEN))
#define IGN (   X)    (void) X
#define INCOUNT   ORTXT.inlist->count
#define INF   (2147483647.0)
#define INOCOUNT   ORTXT.inArgCount
#define ISSTRCOD (   X)    isnan(X)
#define LINKAGE_BUILTIN (   name)
Value:
long name##_init(CSOUND *csound, OENTRY **ep) \
{ (void) csound; *ep = name; return (long) (sizeof(name)); }
Contains all function pointers, data, and data pointers required to run one instance of Csound...
Definition: csoundCore.h:899
Definition: csoundCore.h:234
#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_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 NOTOK   (-1)
#define OCTRES   8192
#define OK   (0)
#define ONEPT   1.02197486 /* A440 tuning factor */
#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 RAWMSG   0x40
#define RNGEMSG   02
#define SSTRCOD   (float)NAN
#define SSTRSIZ   200
#define TIMEMSG   0x80
#define TWOPI   (6.283185307179586476925286766559005768394)
#define TWOPI_F   ((MYFLT) TWOPI)
#define VARGMAX   (1999)
#define WARNMSG   04
#define XINARG1   (p->XINCODE & 1)
#define XINARG2   (p->XINCODE & 2)
#define XINARG3   (p->XINCODE & 4)
#define XINARG4   (p->XINCODE & 8)
#define XINARG5   (p->XINCODE &16)
#define XINCODE   ORTXT.xincod
#define XOUTCODE   ORTXT.xoutcod

Typedef Documentation

typedef struct arg ARG
typedef struct arglst ARGLST
typedef struct auxch AUXCH
typedef struct CORFIL CORFIL
typedef struct dklst DKLST
typedef struct engine_state ENGINE_STATE

This struct will hold the current engine state after compilation.

typedef struct event EVTBLK

This struct holds the data for one score event.

typedef struct fdch FDCH
typedef int(* GEN)(FGDATA *, FUNC *)
typedef struct in_stack_s IN_STACK
typedef struct insds INSDS

This struct holds the info for a concrete instrument event instance in performance.

typedef struct namedInstr INSTRNAME
typedef struct instr INSTRTXT

This struct is filled out by otran() at orch parse time.

It is used as a template for instrument events.

typedef struct lblblk LBLBLK
typedef struct mchnblk MCHNBLK
typedef struct MEMFIL MEMFIL
typedef struct monblk MONPCH
typedef struct NAME__ NAME
typedef struct namelst NAMELST
typedef struct oentries OENTRIES
typedef struct oentry OENTRY
typedef struct opcodinfo OPCODINFO
typedef struct opds OPDS

This struct holds the info for one opcode in a concrete instrument instance in performance.

typedef struct op OPTXT

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 S_MACRO S_MACRO
typedef struct SNDMEMFILE_ SNDMEMFILE
typedef int(* SUBR)(CSOUND *, void *)
typedef struct text TEXT

Storage for parsed orchestra code, for each opcode in an INSTRTXT.

Variable Documentation

int32 MYNAN