Thursday, May 26, 2011

Generating Digital Audio Using SiON

In this tutorial I’ll be showing you how to get started with SiON, an AS3 software synthesizer library which generates sound using only code.


Final Result Preview

In the end this is what we’re going to obtain:

Click on the darker rectangle area to start/stop the balls movement.


Getting Necessary Files

First you need to get the SiON library. You can download it either as a SWC file or as uncompressed ActionScript files. To do this go to SiON Downloads and select the desired download method.

After you’ve downloaded the source code add it to your global class path.

Notice that on this page you can also download the ASDoc documentation and older versions of the library.

In this tutorial we’ll make use of the well known minimalcomps library, developed by Keith Peters; if you don’t have it go ahead and grab it: minimalcomps.

Also add the minimalcomps library to your global class path and let’s get started.

Note: As always I’ll be using FlashDevelop throughout this tutorial. You can use whatever code editor you like although I recommend sticking with FlashDevelop.


Step 1: What is SiON?

The SiON library is a software synthesizer library built in ActionScript 3.0 and works in Flash Player 10 or higher.

With SiON you can generate dynamic sounds on the run without the need of loading any audio files. Also makes it very easy to synchronize sounds with display objects (eg. object hitting a wall, explosion etc).

From the multitude of features it has I’ll show you the essentials of working with it: using MML (Music Macro Language) data to generate sound, using voice presets and effectors on playing sounds, setting the tempo (BPM), panning and changing volume and lastly I’ll show you how to sync sounds with display objects.


Step 2: Setting up the Project

Let’s start by creating a new project. Open your code editor and create a new ActionScript 3 project [...]

Read more: Generating Digital Audio Using SiON

No comments:

Post a Comment