Sfront patches for Visual C

From: Michael Gogins (gogins@nyc.pipeline.com)
Date: Tue Aug 24 1999 - 21:07:24 EDT


I got sound out of the min example after making a few patches to your new
code, and now I am all excited about sfront again. Thanks for your very
prompt response regarding printf.

I hope that you will incorporate my patches, or the equivalent, and also
that you will consider making some changes to the sfront system. First the
patches:

#ifdef GOGINS // runtime.c line 70
  srand(19753193L);
#else
  srand48(19753193L);
#endif // GOGINS

#ifdef GOGINS // runtime.h line 29
#else
#include <unistd.h>
#endif // GOGINS

#ifdef GOGINS // globals.c line 22
extern const char *IDSTRING = "GOGINS";
extern const char *LIBDIR = "c:\\mkg\\Silence\\NeoSound\\sfront\\lib";
#else
#endif // GOGINS

#ifdef GOGINS // tree.h line 29
#include <float.h>
#define isnan _isnan
#define srand48 srand
extern const char *IDSTRING;
extern const char *LIBDIR;
#else
#include <unistd.h>
#endif // GOGINS

Now for my suggestions.

Of course I would prefer it if sfront produced linked executable code and
not C source code. This could be approximated if sfront were changed to do
everything that the example makefiles and "make" commands now do. During the
C code generation phase, sfront would #include into sa.c all, or at least
the appropriate, .c files from the lib directories. After that, sfront could
shell out to the operating system and actually run the C compiler to produce
an executable orchestra. There would only one big source file to compile.
The C compiler flags would be an option for sfront. And after that, sfront
could even run the orchestra. This would enable sfront to be used in the
same way as Csound or Cmix.

Ideally, sfront would simply take one or more mp4, saol, sasl, and mid
filenames and optionally produce either a standalone application, or a
shared library (on Windows, a DLL). This library should invariably implement
one or more standard "C" interfaces for running the orchestra. This would
enable other applications to load and use the compiled SAOL orchestras.
Obviously this is the same idea as a VST 2 plugin, and in fact a VST 2
plugin interface should be one of the interfaces implemented in such a
shared library.

Another interface would be implementations for native methods of a Java
class that can easily be plugged into JavaSound for audio and MIDI input and
output. I will be working on these ideas, the JavaSound one first, and as
soon as I have defined the Java interface I will send, for your information,
the C header file and stub file, which could become another source in the
lib directory. If you used either VST 2 or JavaSound you could in the end
forget about implementing any other kind of audio or control input or
output.



This archive was generated by hypermail 2b29 : Wed May 10 2000 - 12:15:27 EDT