cscore.h

Go to the documentation of this file.
00001 /*
00002     cscore.h:
00003 
00004     Copyright (C) 1991 Barry Vercoe, John ffitch
00005 
00006     This file is part of Csound.
00007 
00008     The Csound Library is free software; you can redistribute it
00009     and/or modify it under the terms of the GNU Lesser General Public
00010     License as published by the Free Software Foundation; either
00011     version 2.1 of the License, or (at your option) any later version.
00012 
00013     Csound is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU Lesser General Public License for more details.
00017 
00018     You should have received a copy of the GNU Lesser General Public
00019     License along with Csound; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00021     02111-1307 USA
00022 */
00023 
00024 #ifndef  CSCORE_H
00025 #define  CSCORE_H
00026 
00027 #include <stdio.h>
00028 
00029 #ifndef MYFLT
00030 #include "sysdep.h"
00031 #endif
00032 #include "csound.h"
00033 
00034 typedef struct cshdr {
00035         struct cshdr *prvblk;
00036         struct cshdr *nxtblk;
00037         short  type;
00038         short  size;
00039 } CSHDR;
00040 
00041 /* Single score event structure */
00042 typedef struct {
00043         CSHDR h;
00044         char  *strarg;
00045         char  op;
00046         short pcnt;
00047         MYFLT p2orig;
00048         MYFLT p3orig;
00049         MYFLT p[1];
00050 } EVENT;
00051 
00052 /* Event list structure */
00053 typedef struct {
00054         CSHDR h;
00055         int   nslots;
00056         int   nevents;
00057         EVENT *e[1];
00058 } EVLIST;
00059 
00060 /* This pragma must come before all public function declarations */
00061 #if (defined(macintosh) && defined(__MWERKS__))
00062 #  pragma export on
00063 #endif
00064 
00065 /* Functions for working with single events */
00066 PUBLIC EVENT  *cscoreCreateEvent(CSOUND*, int);
00067 PUBLIC EVENT  *cscoreDefineEvent(CSOUND*, char*);
00068 PUBLIC EVENT  *cscoreCopyEvent(CSOUND*, EVENT*);
00069 PUBLIC EVENT  *cscoreGetEvent(CSOUND*);
00070 PUBLIC void    cscorePutEvent(CSOUND*, EVENT*);
00071 PUBLIC void    cscorePutString(CSOUND*, char*);
00072 
00073 /* Functions for working with event lists */
00074 PUBLIC EVLIST *cscoreListCreate(CSOUND*, int);
00075 PUBLIC EVLIST *cscoreListAppendEvent(CSOUND*, EVLIST*, EVENT*);
00076 PUBLIC EVLIST *cscoreListAppendStringEvent(CSOUND*, EVLIST*, char*);
00077 PUBLIC EVLIST *cscoreListGetSection(CSOUND*);
00078 PUBLIC EVLIST *cscoreListGetNext(CSOUND *, MYFLT);
00079 PUBLIC EVLIST *cscoreListGetUntil(CSOUND*, MYFLT);
00080 PUBLIC EVLIST *cscoreListCopy(CSOUND*, EVLIST*);
00081 PUBLIC EVLIST *cscoreListCopyEvents(CSOUND*, EVLIST*);
00082 PUBLIC EVLIST *cscoreListExtractInstruments(CSOUND*, EVLIST*, char*);
00083 PUBLIC EVLIST *cscoreListExtractTime(CSOUND*, EVLIST*, MYFLT, MYFLT);
00084 PUBLIC EVLIST *cscoreListSeparateF(CSOUND*, EVLIST*);
00085 PUBLIC EVLIST *cscoreListSeparateTWF(CSOUND*, EVLIST*);
00086 PUBLIC EVLIST *cscoreListAppendList(CSOUND*, EVLIST*, EVLIST*);
00087 PUBLIC EVLIST *cscoreListConcatenate(CSOUND*, EVLIST*, EVLIST*);
00088 PUBLIC void    cscoreListPut(CSOUND*, EVLIST*);
00089 PUBLIC int     cscoreListPlay(CSOUND*, EVLIST*);
00090 PUBLIC void    cscoreListSort(CSOUND*, EVLIST*);
00091 PUBLIC int     cscoreListCount(CSOUND*, EVLIST *);
00092 
00093 /* Functions for reclaiming memory */
00094 PUBLIC void    cscoreFreeEvent(CSOUND*, EVENT*);
00095 PUBLIC void    cscoreListFree(CSOUND*, EVLIST*);
00096 PUBLIC void    cscoreListFreeEvents(CSOUND*, EVLIST*);
00097 
00098 /* Functions for working with multiple input score files */
00099 PUBLIC FILE   *cscoreFileOpen(CSOUND*, char*);
00100 PUBLIC void    cscoreFileClose(CSOUND*, FILE*);
00101 PUBLIC FILE   *cscoreFileGetCurrent(CSOUND*);
00102 PUBLIC void    cscoreFileSetCurrent(CSOUND*, FILE*);
00103 
00104 /* This pragma must come after all public function declarations */
00105 #if (defined(macintosh) && defined(__MWERKS__))
00106 #  pragma export off
00107 #endif
00108 
00109 #endif

Generated on Sun Nov 9 00:04:52 2008 for Csound and CsoundAC by  doxygen 1.5.6