-=Introduction=-

Welcome to the SXMS Example Program.  This should hopefully help users new to using the SXMS DLL.

The program includes 8 mini examples.  When you first start up the program, you will be presented with a menu allowing you to select an example to display.  When displaying the examples, use this text as a guide so you can fully understand what the example is accomplishing.

A bit of warning before continuing with the example.  Each example allows you to return back to the main menu to select a different example.  However, these examples were not designed to work together and by going from one example to the next without closing the program might cause unknown errors.  It is recommended that when you wish to view a different example that you close down the program and restart.

This text will have the examples split up according to the order displayed by the menu.  It is best if you start with the first example and work your way down.  This will allow you to slowly get into using SXMS rather than starting at one of the harder subjects from the beginning.

Remember that the best way to learn is by looking at what someone else has done.  So feel free to look at the gmd for the code(s) of each example.  I have each example separated by what objects they use (although some examples will share objects between each other).  Also, look at the other scripts, as some of the code was done in scripts, rather than in the actual objects.

The SXMS 2.0 scripts are all contained in the SXMS2 folder in the example.  DO NOT EDIT those scripts as they will cause the DLL to not function correctly.

This example was made for just that, an example.  This program will not tell you how to use the SXMS 2.0 DLL since it is way more complex than any example program can display.  Make sure to read the included documentation and experiment.


-=Simplest File Player=-

This is about as simple as it gets to playing audio.  This example allows you to load a file (FMUSIC or FSOUND) and play it back.  The objects for this example are contained in the "Multi-Example Buttons" folder as I use these same objects for more than one of the examples.  Also, check the "Norm" folder in the scripts section to see the SXMS coding that was used.


-=Simple Media Player=-

I got asked a lot about how to make a play list and about the drag bar scrolling.  So I made this example to help those people out.  It allows 10 songs to be loaded, which can then be selected by clicking on the icon next to the displayed name.  You will need to press play each time a song it selected from the play list.  To remove a song from play list, right-click the icon by it.  The play list is designed to load into the next available slot.  If no slots are available, then file isn't loaded.


-=Channel Manager=-

This example displays VU meters for each software channel.  (All examples use 32 channels, since that is what I initialized the system to.  However, you can have up to 1024 software channels.  For best effect, you should load a mod file in, as these formats take multiple channels to play  (FMUSIC).  Play an mp3 or wav and it will only play in channel 0.  FSOUND formats only need 1 channel per song, while FMUSIC requires more.  The icons below each channel meter is the panning display.  It tells you which speaker the channel is being played out of.


-=Sound Effects=-

This is actually an example of the sample functions (which used to be called the SFX functions).  The sample functions allow loading of FSOUND format, and can be used for multiple and quick playback of sound.  When playback is done, it is placed in an available channel.

Load a sound, preferably a small one.  Then click close to the X on the screen.  The audio should play in any available channel.  If you click multiple times, you will noticed the newest played sound plays in the next available channel.  Also, when audio is played, I have the example setup so that it's panning and volume is set depending on how close you click near the X.  Unlike GM, SXMS allows you to control each audio independently by channel.  Click around the example window to notice the effect.

If you right-click anywhere on the example window, it will play the audio in channel 31.  This is just a demonstration showing that you can also force audio to play in a channel.  If audio is playing in a channel you want to place new audio in, it will cut the old one, and start the new sound in the channel.  This is why if you try to play more audio at a time then you have channels, then you start to notice cutting.


-=DirectX 8.1 Special FX=-

Load a song into the example.  Play the song without any effects...  Once you get the idea, stop the song, turn on some effects (use Distort or Gargle for most noticeable effect) and replay the audio.  Sounds different huh.  The FX functions allows one to put some special effects onto a sound.  This could be used to make reverb settings, add echo, or other types of desired effects.  To switch, you must have the song stopped.  This is cause effects cannot be added or removed from a currently played sound.

Now most of the effects are just using there default settings.  However, for this example, I have allowed you to fine tune how the "echo" effect works.  For best effect, turn off all other effects but echo, then as the song is playing, mess around with the lower bars.

Wet/Dry is how much of the audio is effect.  All the way left makes for no echo.  All the way right makes for only echo.  Feedback is how much of the audio is fed back into the effect.  Left delay and right delay are how long until the echo is heard in that speaker.  Set one higher than the other to get an interesting effect.

You must have DirectX 8.1 or better on your computer for these functions to work.


-=Recording=-

This example allows you to record 15 seconds of audio.  To record, just press the blue button.  Note that the recording source is dependant on what you have selected in your sound properties.  Once done recording, you can play back the recording using the green arrow.  If you like what you recorded, you can save the audio (as the wav format) by pressing the X button.  When playback is happening, it can be controlled just like any other sampled sound.  You can essentially playback the audio right as your recording, but you have to make sure the "recording cursor" stays in front of the "playback" cursor, otherwise you'll get distortion.


-=Visualizations=-

This example just shows that the SXMS can do advanced visual output using the GetSpectrum DSP.  check the code and help for more information on that.


-=WinAmp Plugin Support=-

Don't want to use Fmod?  Then don't, you can use WinAmp dll's instead.  The WinAmp support for SXMS is much more stable then XGM_Amp, and also includes functions not found in XGM_Amp.

For the example, you must load a plugin and plugout in order to hear any audio.  The only known working plugouts are out_ds.dll (DirectSound) and out_wave.dll (Wave output).  As for inputs, it is mainly a guess and test to see which input plugins work.  Most video ones will not, as video is a new feature in WinAmp that I have been unable to support.

WARNING!  Make sure to load a plugout before loading a plugin.  This is because the plugin needs to set settings with a plugout before loading.  If no plugout is found, then it errors.

Once you got a plugout and plugin setup, just load an accepted audio by the plugin and play.  You will not see any visual output (the meters) cause this is not using fmod.

When a plugin is loaded, you may press the A or C buttons to check the about screens and configure the input plugin if needed.  Make sure a plugin is loaded before selecting these buttons.