Dynamic Game Music - Made Easy
AddThis Social Bookmark Button

Briefly about Audioflow

Audioflow key features

Getting Started

After a quick tour of Audioflow Composer, this chapter will act as a guide to the first steps of using Audioflow Composer to make a musical score. The chapter will have information about the basic block types as well as how to play and edit blocks.

Basic Concepts

Network
An Audioflow Network is a number of blocks, connected by links, defining how to play sounds to form music.
Score
A Score is a Network together with references to sound assets and other data related to the Network.
Soundtrack
A Soundtrack is a Score together with an FMOD Sound Bank.
Block
A basic element of Audioflow is the concept of a Block, an entity that can be played in a sequence. A block may contain other Blocks.
Link
To play blocks in sequence, they are coupled together using Links, which are represented as an arrow from one block to another.

Views and Panels

When you launch Audioflow Composer, the screen is divided into sections:

Note

picture showing the main screen with annotations

Network View
The Network View is where you create blocks and links and thus define the contents of your Soundtrack. At the top of the Network View is the Block Path, showing the Block hierarchy location of the current view.
Tool View
The Tool View contains four different panels, Wave Asset Panel, Block Asset Panel, Emotions Panel, and Block List Panel. Switching between the panels is done by pressing the tabs at the top of the Tool View.
Wave Asset Panel
This panel contains all sounds imported into your Audioflow Score and
Block Asset Panel
This panel contains all basic block types, as well as any Block Assets you have created yourself (see Block Assets for more information).
Emotions Panel
This panel enables creating and deleting Emotions and adding them to or removing them from blocks (see Emotions for more information).
Block List Panel
This panel contains an overview of all blocks in the Network.

Using the Network View

The Network View is used for editing Blocks. This section will cover navigating the Network View and editing blocks.

Block Editing

In general, all blocks can be moved around by holding the left mouse button over the block and dragging it to a new position. Note that the 'outlets' (the dark semidisks in the right side of most blocks) cannot be used to move a block.

Per default, blocks are arranged in a grid. To toggle the grid on and off, press Ctrl+I.

A Block can be selected by left-clicking on it. In this state, you can:

  • Delete it by pressing Delete.
  • Duplicate it using Ctrl+D.
  • Copy / Cut it by pressing the standard Ctrl+C or Ctrl+X and paste it later using Ctrl+V.

Multiple blocks can be selected by holding down the Shift key and clicking on multiple blocks. Drag-selection is also possible by holding down the left mouse button on an empty area of the network and dragging a box; this will select all blocks that are touched by the box. All blocks can be selected using Ctrl+A.

Any changes can be undone with Ctrl+Z and redone with Ctrl+Y.

Using Group Blocks

A Group Block is a block that can contain other blocks. In Audioflow, Group Blocks are used to structure a soundtrack hierarchically. Group Blocks also enable playback of multiple Audio Blocks simultaneously, and they provide an easy way to control settings such as volume and pitch for all blocks contained within the Group Block.

Group Blocks can be linked to other blocks, and are played by the Audioflow sequencer the same way as Audio Blocks.

Creating and Editing Group Blocks

To create a Group Block, you have a few options:

  1. First toggle the Block Asset Panel by clicking the 'Blocks' tab in the top of the Tool View. Dragging the empty Group Block asset into the Network will create a new Group Block.
  2. Pressing G will create a new empty Group Block under the mouse cursor.
  3. Selecting one or more other blocks and pressing Ctrl+G will create a new Group Block containing the other blocks. Any links between the grouped blocks are retained, but links to and from blocks outside of the newly created Group Block are not necessarily retained. This is probably the most efficient way to create Group Blocks.

You can rename a Group Block by double-clicking its current title.

Empty Group Blocks make no sound when played, in fact they have a length of exactly 0.

The settings of a Group Block can be adjusted exactly like those of an Audio Block by clicking the settings button. Refer to Block settings in the Composer reference for more information.

Entry Blocks

Note

screenshot showing adding an entry block to the network.

When a Group Block should be played, the Audioflow sequencer needs to know where to start, playing the blocks inside the Group Block. If there is only one block inside the Group Block, it automatically plays that block, but if there are several block to choose from, ''it will select one at random''. If this is not the desired behaviour, we have to explicitly specify the starting block.

For this purpose, we have a special Block called an ''Entry Block''. It can be added to the Network by dragging it from the Block Asset Panel, or by pressing E.

The Entry Block makes no sound when played, the sequencer simply starts playback from the Entry Block and follows a link from the Entry Block to other blocks.

Example

Note

screenshot showing the example.

You have Audio Blocks A and B inside Group Block G, and want block A to play, when Group Block G is played. To signify that playback starts with Block A, You create an Entry Block inside G, and link it to Block A. When Group Block G is played, the Entry Block makes the sequencer start playback immediately with Block A.

Playing Multiple Blocks at Once

If multiple Entry Blocks are created within a Group Block, something interesting happens. The Audioflow sequencer will actually play from both Entry Blocks in parallel. It does this by creating two so-called ''sequencer threads'', each of which performs sequencing in the normal way, following links and playing blocks (these are not threads in the operating system sense, they only exist internally in the sequencer).

So to play two blocks at once, you put them into a Group Block and link them with two Entry Blocks.

Example

Note

screenshot showing the example.

You have Audio Blocks A and B, and want to play A and B simultaneously. You add two new Entry Blocks linked to A and B, mark all 4 Blocks using drag-selection, and group them using Ctrl+G. When playing the newly created group block, both A and B are played at the same time.

As playing multiple blocks at once can include playing multiple Group Blocks as well, this is a very powerful concept that can be used to created complex layered soundtracks,

When a sequencer thread is playing, it may reach a dead end. So when is playback of a Group Block with multiple Entry Blocks finished? It is finished when every sequencer thread has reached a dead end.

So in the earlier example, if Audio Block A was twice the length of Audio Block B, The Group Block would only be finished playing when Audio Block A was finished.

Exit Blocks

In certain situations it is useful to stop a Group Block before its longest contained Block is finished playing. For example an Entry Block could be connected to a number of Audio Blocks connected in a loop. In this situation, the Group Block would keep playing forever. The Exit Block is used for this purpose.

When an Exit Block is reached by a sequencer thread, the playback of the entire Group Block is stopped and an outgoing link of the Group Block is followed, if any.

You can add an Exit Block to the Network by toggling the Block Asset Panel by clicking the 'Blocks' tab in the top of the Tool View, and dragging the Exit Block asset into the Network, or, alternatively by pressing X.

Note that Exit Blocks have no outlet for outgoing links, a consequence of the way Exit Blocks control playback.

Group Block Settings

As mentioned earlier, the settings of Blocks can be edited by clicking the settings button (the small gear icon at the top right of the Block). This is also the case with Group Blocks, that have the same settings as Audio Blocks, as well as some new settings, unique to the Group Block.

Normally, the settings of Blocks created in the network are relative to the or directly inherited from the Group Block that contains them. For example, adjusting the volume or pitch of a Group Block will change the volume or pitch of any Audio Blocks contained within.

It is even possible to change the global settings for the entire Soundtrack, using the Network Settings, accessed by clicking the settings button (the small gear) on the leftmost Block in the Block Path labeled 'Network'.

The Network Settings are actually the settings for an invisible Group Block, the Root Block, that contains all other blocks in the Network.

Refer to Block Settings in the Composer reference for more information about Group Block settings.

Structure

Group Blocks provide a very general method for organizing Blocks in Audioflow. It may be overwhelming to have such a general tool without any preimposed structure. Having a structure defined by the music tool is the norm of current tools.

However, we believe that the generality of Audioflows structure is one of its great strengths, and this section will try to convey some broadly applicable approaches to using Group Blocks.

Group Blocks as Cues

The most important feature of Group Blocks is that it and thus its contents can be launched as a single Block from the game or application. Structuring your Soundtrack into a few master Group Blocks that each represent a different part of your game or application makes it easy for the game or application to launch a particular part of the Soundtrack.

Example

Note

screenshot showing the example.

You have created 4 Group Blocks containing music for 4 different parts of your game, labeled 'Menu Screen', 'Level 1', 'Level 2', and 'Game Over'. When these blocks are launched in the Composer, they play the music corresponding to their own part of the game. In the game code, we simply play these named blocks, e.g. when the menu screen is displayed, the 'Menu Screen' block is played.

Group Blocks as Reusable Components

When you create a Group Block, it is very easy to duplicate it and use it in another place in your Network. Duplicating a Group Block is performed using the shortcut key Ctrl+D, or alternatively copy / cut it by pressing the standard Ctrl+C or Ctrl+X and paste it using Ctrl+V.

The new copies can be modified by changing their internal structure, adding or removing elements, or by modifying the settings, e.g. the volume or pitch.

Group Blocks as Shuffle Bins

Group Blocks are also useful when a number of Blocks should be played randomly, or a single random Block should be played from a selection of blocks.

When a number of Blocks are put into a Group Block without specifying an Entry Block, playing the Group Block will choose one of its contained Blocks at random. If the Blocks should be played continuously, we simply loop the Group Block; every time it loops it chooses a new contained block at random.

Example

Note

screenshot showing the example.

Blocks A, B, and C are grouped into Group Block G using the shortcut key Ctrl+G. Now, playing Group Block G will result in playing A, B, or C randomly. The loop settings of G can be modified to allow for repeatly playing random Blocks.

Group Blocks as Junction Points

Another way of repeatedly playing random Blocks is to link them all to an empty Group Block. Every Block must have both an outgoing and incoming link connected to the Group Block. Now, playing the Group Block will immediately jump to one of the other Blocks at random. After that Block is finished, the sequencer returns to the Group Block, immediately jumping to a new random Block.

Example

Note

screenshot showing the example.

Blocks A, B, and C are all doubly linked to the empty Group Block G. When playing G, the other Blocks will repeatedly play in random order.

Using Silence Blocks and the Beatmatcher

Delaying the sequencer before playing a Block can be performed using a Silence Block, and Blocks can be delayed to match a beat using the Beatmatcher, thus synchronizing blocks of differing durations to start playing at exactly the same time. These operations depend on having a well-defined tempo and signature.

Tempo and Signature

To modify tempo and signature settings for the Network, click the settings button (the small gear) on the leftmost Block in the Block Path labeled 'Network'.

It is also possible to specify different tempo and signature settings for a Group Block, and thus, every block contained within it.

Refer to Time Settings in the Composer reference for more information about Tempo and Signature.

Silence Block

The Silence Block simply plays no sound for a specified amount of time.

Double-clicking the Silence Block shows the settings. The silence time can be specified in two ways:

Duration
Selecting 'Duration' in the drop-down box and entering a number in the 'Duration' text box changes the length of the Silence Block to the specified number of seconds. The number need not be a whole number.
Beats
Selecting 'Beats' in the drop-down box and entering a number in the 'Beats' text box changes the length of the Silence Block to the specified number of beats. The number need not be a whole number.

Beatmatching

The Beatmatcher has similar functionality to the Silence Block, in that it plays no sound for a specified amount of time.

The Beatmatcher, however, adjusts its own duration to a specific beat in the tempo and signature of its enclosing Group Block. When adjusting the settings of the Beatmatcher, you select a Division which could be 1/4 notes, 1/8 notes, etc. This adjusts the number of cells in a grid, where you can select beats of a measure, that then defines the beats that the Beatmatcher uses to align its length.

Example

If you select a Dvision value of 1/4, and selects all the cells in the grid, the Beatmatcher will adjust its length, so that it always ends on a 1/4 note in the bar.

Note

If you select no beats in the Beatmatcher, it always has a length of 0 seconds, and thus has no effect.

Exporting and Playing a Soundtrack

At this point, you should have the ability to build music from Blocks. It is time to bring the music into your game or application.

Where to Start

To be able to play a Soundtrack from a game or application, it is necessary to define some named cue points, from which the Soundtrack can be started. This is described in the section Group Blocks as Cues.

For example, if we name a Group Block that contains the music for the main menu of our game 'Main Menu', we can now refer to this music using the name.

Exporting a Soundtrack

Normally, if you use the menu items 'File:Open' and 'File:Save', you can open and save an Audioflow '''Score'''. The Score contains the Network with all its Blocks, as well as other data related to the Network, such as Emotions, Tags and Block Assets, all described in further detail later in this manual.

The Waveforms used by the Score are saved as ''references'', so the Score itself does not contain the original wave files.

Note

Moving the wave files on your system may corrupt the Score.

An Audioflow Soundtrack consists of two files:

  • The Score, saved as an .auf file.
  • An FMOD Wavebank containing all the waveforms references by the Score, packed into a single .fsb file.

Exporting these files is as easy as selecting the menu item 'File:Save Soundtrack', and entering a name and a save location.

Using the Audioflow API

FXIME: which files do we need, how to initialize Audioflow,

Using the Audioflow API from a C# program requires the steps listed below. Note that the description is based on Visual Studio, but a similar sequence of steps should be done in any other C# IDE:

  • Add a reference to lib\AudioflowCSharp.dll from the Audioflow install directory (normally C:\Program Files\Audioflow to your project.
  • Add the file lib\audioflow.dll from the Audioflow install directory to your project, and adjust its properties:
    • Set Build Action to 'Content'.
    • Set Copy to Output Directory to 'Copy if newer'.
  • You can also add the Score and the FMOD Wavebank to the project in the same manner.

When this is done, we will be able to use Audioflow in our project.

The simplest example using Audioflow would be something like this:

 
class Program {
    static void Main(string[] args) {
 
        // Output Audioflow log to this file. Important for tracking down errors.
        Audioflow.Controller.SetLog("Audioflow.log");
 
        // Start Audioflow.
        Audioflow.Controller.Initialize();
 
        // Load Soundtrack, specify filenames for Score and FMOD soundbank.
        Audioflow.Controller.LoadSoundTrack( @"test.auf", @"test.fsb" );
 
        // Play from our starting block, 'Main Menu'.
        Audioflow.Controller.PlayBlock("Main Menu");
 
        // Play for 5 seconds
        float playTime_s = 0f;
        while(playTime_s < 5f) {
            System.Threading.Thread.Sleep(100);
            playTime_s += 0.1f;
 
            // Update Audioflow sequencer.
            Audioflow.Controller.Update();
        }
 
        // Stop playback. This is not strictly necessary in this example.
        Audioflow.Controller.Stop();
 
        // Stop Audioflow and deallocate resources.
        Audioflow.Controller.ShutdownEngine();
    }
}

Controlling Playback

Emotions

Block Assets

Block Assets allow re-use of blocks in a Network.

If you have created a complex Group Block containing many other blocks, you may