Sfx Frequently Asked Questions

Not yet. The current technology preview release implements core
language features, but does not implement the full standard. Click here
to find out abou the current state of the Sfx implementation.

Q: What audio file input formats does Sfx support?

Sfx uses the DirectShow/ActiveMovie audio decoders to import audio
files. As a result, Sfx will accept any audio file format for which
DirectShow/ActiveMovie audio decoder filters are installed. This currently
includes file formats such as AIFF, MP3, many varieties of WAV files, and
many more formats as well depending on which filters are installed.

The best way to find out whether the format is supported is to
double-click on the file in an Explorer window. If the system plays the
audio file, then you can use it as an input file.

Q: What is the project window for in the Sfx development
environment?

The project window is used to define the source files that are used to
build and run an Sfx orchestra. When the Sfx bitstream implementation
comes up, files from the project window will be used to build the
bitstream. Thus, placing an audio or midi file in the project window will
cause that file (appropriately encoded using MPEG4 semantics) to be placed
in the MPEG4 bitstream.

Currently, the project window determines which files will be used as
orchestra and score source files, and additionally determines the location
of audio files used in table generators. Read the next section to find out
how sample files are located and used.

Q: How does the sample table generator locate source audio?

The behaviour of the sample table generator, when using string
arguments, is non-normative (i.e. the standard says that the behaviour of
the sample table generator is implementation dependent). This is so,
because when a project is encoded using the MPEG4 bitstream encoding,
sample data is encoded in the bitstream. The use of filenames as arguments
to the sample table generator is therefore purely a convenience feature
for bitstream authors during development. When the Sfx
implementation of bitstream encoding is released, the Sfx compiler will
automatically re-write sample table generators that use filenames to use
the correct stream identifier when exporting to MPEG4 bitstream format.

Currently, the if a filename is provided to the sample table generator
function, the compiled orchestra will locate the sample file using one of
the following two procedures:

(1) Using the Project File

If the supplied filename does not contain directories, and if the
filename matches the name of an audio file in the project list, then the
file given in the project file will be used. The compiled orchestra will
internally encode the path to the sample file relative to the project file
(".sfw" file). This allows projects, orchestras, scores and
audio files to be distributed as a bundle, and moved together into
different directories or onto new machines.

Project files are located by first looking for the file using a path
relative to the project file (.sfw file). If the file can't be located
there, then the file is located by looking for the file using the last
absolute pathname that was used to access the file.

Right-clicking on the audio file within the project list brings up a
property dialog that can be used to set properties of the sample, such as
the loop-start, loop-end, base frequency, parameters for the audio
file, and also allows the author to select which channel of audio to use.
Importing of loop parameters from audio files is not yet supported.

(2) Directly.

If the named audio file is not contained in the project files, the the
orchestra will attempt to locate the audio file in the same directory as
the compiled orchestra, or failing that, using the name as an absolute
pathname. Channels within the audio file can be selected by appending
"#" followed by the desired channel number at the end of the
filename. (e.g. "d:\\win2k\\media\\ding.wav#0" would
select the left channel of audio from ding.wav). If no channel
selector is provided for a multi-channel audio file, the first (left)
channel will be selected. There is currently no way to set audio sample
properties for audio files using the direct access method.

Samples can also be loaded by stream ID (using a number instead of a
filename). To set the stream ID for an audio sample, first add the source
file to the project; then, right click on the audio file in the project
file list, choose "Properties...", and set the Stream ID in the
property dialog.

What would normally be MIDI controls are provided to the opcode as
arguments so that the opcode can be used both as a MIDI instrument and as
a SASL instrument. The following code provides a fully GM/GS-compatible
MIDI soundfont instrument (including support for drum channels):

The extensions used to create SoundFont instruments are described in
the Sfx Extensions page of this web-site.

Q: Why do the SoundFont examples not do anything?

To get the SoundFont sample to work, you must first install SoundFonts
on your system. Sfx does not currently come with any SoundFonts. However,
there are many places on the Web where soundfonts can be downloaded or
purchased.

Worth a particular recommendation is the EMU General Midi SoundFont
collection from EMU Systems (part number EMU8100-04CD) available online at

For a measly $20 this will give you a complete set of 2MB 4MB and 8MB
General Midi/GS compatible SoundFonts for use with Sfx. The quality is
superb. Highly recommended! When used in conjunction with Sfx, the results
are as good as or better than most commercial dedicated synthesizers.

Once the SoundFonts has been copied onto your harddrive, let Sfx know
about them by using the "SoundFonts" tab of the SfxEdit options
dialog (menu "View\Options...").