Beast Architecture

= Beast - Project Architecture = Authors: Tim Janik, Stefan Westerfeld

This document provides an architectural overview of the Beast audio synthesis package and related components.

Programs and Libraries



 * 1) SFIDL - The IDL compiler ([sfidl.1.html sfidl(1)]) used for language bindings and plugins
 * 2) BseWaveTool - A small program to generate multi-sample .BSEWAVE files
 * 3) BEAST - a Gtk+ based GUI front-end ([beast.1.html beast(1)]) for Bse
 * 4) GXK - a library containing extensions to Gtk+, such as XML-parser for widget templates or an action administration system
 * 5) BSESCM - a Guile based scheme shell ([bsescm.1.html bsescm(1)]) for Bse
 * 6) Bse - synthesis and sequencing library
 * 7) Sfi - Interface library, consisting of:
 * 8) * a value abstractiong SfiValue (based on GValue)
 * 9) * a serializable parameter abstraction based on GParamSpec
 * 10) * a threading abstraction SfiThread (based on GThread)
 * 11) * primitive type implementations (record, sequenzes, rings)
 * 12) * a glue layer to allow function calls and signals across process boundaries
 * 13) * a simple communication layer based on SfiValue for process boundaries
 * 14) * basic serialization mechanisms to allow implementations of persistent object storage
 * 15) * miscellaneous utilities.
 * 16) GLib-Extra - utility functions which are subject to be folded back into GLib at some point.

Components



 * 1) BSE-Shell - a shell interfacing to Bse, such as the Guile based scheme shell bsescm.1. It's used for scripting Beast and to run standalone scripts.
 * 2) Beast - a Gtk+ based GUI front-end (see beast.1) for Bse.
 * 3) Bse - the sequencing and synthesis core, consisting of:
 * 4) * Plugin interface,
 * 5) * MIDI Event processing logic,
 * 6) * MIDI File import,
 * 7) * Undo/redo stack,
 * 8) * Object framework,
 * 9) * Glue layer + scripting objects,
 * 10) * Song, track, part, mixer and wave objects,
 * 11) * Synthesis networks,
 * 12) * Sequencer (seperately threaded),
 * 13) * Synthesis Engine (seperately threaded),
 * 14) * Input output drivers for PCM and MIDI,
 * 15) * OSS MIDI and PCM driver,
 * 16) * Standard synthesis modules.

Samples and Wave Files
Sample Data is organized at three levels:


 * 1) Wave Chunks - a chunk contains one sample
 * 2) Waves - multiple chunks can be put into a wave; this allows storing different samples which should be played for different notes
 * 3) Wave Libraries - multiple waves can be put into a wave library

Extra Information (XInfo Strings) for Wave Files
XInfos consist of a list of "key=value" pairs. Values need to be valid UTF-8 strings, while keys may consist only of the lowercase letters 'a'-'z', the digits '0'-'9' and a dash '-'.

Wave Chunk specific XInfos

 * label - The user visible name for this wave chunk.
 * blurb - A comment describing this wave chunk.
 * osc-freq - Note frequency (oscillator frequency) the chunk should be played back at. In other words, the note that was played when the chunk was recorded.
 * loop-type - The loop type needs to be set to indicate that the sample should be looped. Possible values are:
 * "none" - no loop
 * "jump" - plays from loop start to loop end, then jumps back to loop start
 * "ping-pong" - plays from loop start to loop end and then backwards from loop end to loop start
 * loop-start - The offset in samples for the start of the loop.
 * loop-end - The offset in samples for the end of the loop.
 * loop-count - A maximum limit for how often the loop should be repeated.
 * volume - This can be used to adjust the volume of a wave chunk without changing the raw/compressed audio data actually stored. When omitted, it defaults to 1.0 (no volume adjustment). Other values are for instance 0.5 (play sample half as loud, corresponding to a -6dB adjustment) and 0.25 (corresponds to a -12dB adjustment). The range of valid volume adjustments is: 0 < volume <= 1.0, any other value will be ignored.
 * fine-tune The fine tune allows to change the speed or pitch at which a sample is played back in cent. This does not affect the raw/compressed audio data actually stored. The default is a fine tune of 0 cent which avoids any detuninng. For example a fine tune setting of 100 cents will pitch up the sample by a semitone and 1200 cents cause a full octave shift.
 * gus-patch-envelope - Contains the envelope points for a GUS Patch envelope.

Wave specific XInfos

 * label - The user visible name for this wave.
 * blurb - A comment describing this wave.
 * authors - A list of the authors who participated in creating the wave file.
 * license - The license specifiing redistribution and other legal terms for the wave file.
 * blurb - A descriptive text for the wave file.
 * play-type - Indicates the set of required play back facilities for a wave. Supported values are:
 * adsr-wave-1 - for mono wave files: A minimal ADSR envelope which does fade-in at the beginning and fade-out at the end of the note is used, to prevent clicks. The pitch bend midi and volume controllers are supported.
 * adsr-wave-2 - for stereo wave files: A minimal ADSR envelope which does fade-in at the beginning and fade-out at the end of the note is used, to prevent clicks. The pitch bend and volume midi controllers are supported.
 * plain-wave-1 - for mono wave files: No envelope is used, and the whole sample is played, no matter how long the actual note is. This is useful for drum samples. The volume midi controller is supported.
 * plain-wave-2 - for stereo wave files: No envelope is used, and the whole sample is played, no matter how long the actual note is. This is useful for drum samples. The volume midi controller is supported.
 * gus-patch - for GUS Patches (which need a special envelope).

Wave Library specific XInfos
There are currently no XInfos defined for Wave Libraries, because Wave Libraries are not yet supported.