2 SuperCollider real time audio synthesis system
3 Copyright (c) 2002 James McCartney. All rights reserved.
4 http://www.audiosynth.com
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 // # define USE_SC_TERMINAL_CLIENT 0
24 // # define USE_SC_TERMINAL_CLIENT 1
27 #if USE_SC_TERMINAL_CLIENT
29 #include "SC_TerminalClient.h"
32 # include "QtCollider.h"
37 int main(int argc
, char** argv
)
40 return QtCollider::run(argc
, argv
);
42 SC_TerminalClient
app("sclang");
43 return app
.run(argc
, argv
);
47 #else // !USE_SC_TERMINAL_CLIENT
49 #include "PyrSymbol.h"
50 #include "PyrObject.h"
51 #include "InitAlloc.h"
56 static FILE *postfile
= stdout
;
58 void setPostFile(FILE *file
) { postfile
= file
; }
61 void postfl(const char *fmt
, ...);
62 void postfl(const char *fmt
, ...)
66 vfprintf(postfile
, fmt
, vargs
);
71 int vpost(const char *fmt
, va_list vargs
);
74 int vpost(const char *fmt
, va_list vargs
)
76 return vfprintf(postfile
, fmt
, vargs
);
80 void post(const char *fmt
, ...);
81 void post(const char *fmt
, ...)
85 vfprintf(postfile
, fmt
, vargs
);
89 void error(const char *fmt
, ...);
90 void error(const char *fmt
, ...)
92 fprintf(postfile
, "ERROR: ");
95 vfprintf(postfile
, fmt
, vargs
);
99 void postText(const char *text
, long length
);
100 void postText(const char *text
, long length
)
102 fwrite(text
, sizeof(char), length
, postfile
);
105 void postChar(char c
);
106 void postChar(char c
)
117 long scMIDIout(int port
, int len
, int statushi
, int chan
, int data1
, int data2
);
118 long scMIDIout(int port
, int len
, int statushi
, int chan
, int data1
, int data2
)
124 void tellPlugInsAboutToCompile();
125 void tellPlugInsAboutToCompile()
129 void tellPlugInsAboutToRun();
130 void tellPlugInsAboutToRun()
135 void closeAllGUIScreens();
136 void closeAllGUIScreens()
146 void initGUIPrimitives();
147 void initGUIPrimitives()
152 void initSCViewPrimitives();
153 void initSCViewPrimitives()
157 void initCocoaFilePrimitives();
158 void initCocoaFilePrimitives()
162 void initCocoaBridgePrimitives();
163 void initCocoaBridgePrimitives()
168 void initRendezvousPrimitives();
169 void initRendezvousPrimitives()
177 pyr_init_mem_pools(2*1024*1024, 256*1024);
182 runLibrary(s_run
); fflush(postfile
);
189 #endif // USE_SC_TERMINAL_CLIENT