1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
<HTML>
<TITLE>COMPILING</TITLE>
<CENTER><A NAME="compiling"></A>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <A HREF="CSCORE.html">Top of this section</A> - <A HREF="./advanced.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./modules.html">Next</A>
<HR></CENTER>
<H2>
<U>Compiling a Cscore program</U></H2>
A Cscore program can be invoked either as a Standalone program or
as part of Csound:
<BR>
<UL><TT> cscore scorename > outfilename</TT>
<BR><TT>or <BR>
csound -C [otherflags] orchname scorename</TT></UL>
<P>To create a standalone program, write a <B>cscore.c</B> program as shown
above and test compile it with '<I>cc cscore.c'</I>. If the
compiler cannot find "<I>cscore.h</I>", try using <I>-I/usr/local/include</I>,
or just copy the <I>cscore.h </I>module from the <B>Csound</B> source directory
into your own. There will still be unresolved references, so you must now
link your program with certain <B>Csound </B>I/O modules. If your<B>
Csound</B> installation has created a <I>libcscore.a</I>, you can type
<BR>
<UL> <TT>cc -o cscore cscore.c -lcscore</TT></UL>
<P>Else set an environment variable to a <B>Csound</B> directory containing
the already compiled modules, and invoke them explicitly:
<BR>
<UL> <TT>setenv CSOUND /ti/u/bv/csound</TT>
<BR><TT> cc -o cscore cscore.c $CSOUND/cscoremain.o
$CSOUND/cscorefns.o \</TT>
<BR><TT> $CSOUND/rdscor.o $CSOUND/memalloc.o</TT></UL>
<P>The resulting executable can be applied to an input scorefilein by typing:
<BR>
<UL> <TT>cscore scorefilein > scorefileout</TT></UL>
<P>To operate from csound, first proceed as above then link your program
to a complete set of <B>Csound </B>modules. If your <B>Csound</B>
installation has created a <I>libcsound.a</I>, you can do this by typing
<BR>
<UL> <TT>cc -o mycsound cscore.c -lcsound -lX11
-lm (X11 if your installation included it)</TT></UL>
<P>Else copy <I>*.c, *.h</I> and <I>Makefile</I> from the <B>Csound </B>source
directory, replace <I>cscore.c </I>by your own, then run '<I>make csound</I>'.
The resulting executable is your own special <B>csound</B>, usable as above.
The <I>-C</I> flag will invoke your <B>cscore </B>program after the input
score is sorted into '<I>score.srt</I>'. With no lplay, the subsequent
stages of processing can be seen in the files '<I>cscore.out</I>' and '<I>cscore.srt</I>'.<BR>
<BR>
<CENTER><P>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <A HREF="CSCORE.html">Top of this section</A> - <A HREF="./advanced.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./modules.html">Next</A>
<HR></CENTER>
<P><CENTER>
<B><I><FONT COLOR="#006600">HTML Csound Manual - <FONT SIZE=-1>©
Jean Piché & Peter J. Nix, 1994-97</FONT></FONT></I></B>
</CENTER>
</HTML>
|