Beast Architecture
From Testbit
Contents |
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
- SFIDL - The IDL compiler ([sfidl.1.html sfidl(1)]) used for language bindings and plugins
- BseWaveTool - A small program to generate multi-sample .BSEWAVE files
- BEAST - a Gtk+ based GUI front-end ([beast.1.html beast(1)]) for Bse
- GXK - a library containing extensions to Gtk+, such as XML-parser for widget templates or an action administration system
- BSESCM - a Guile based scheme shell ([bsescm.1.html bsescm(1)]) for Bse
- Bse - synthesis and sequencing library
- Sfi - Interface library, consisting of:
- a value abstractiong SfiValue (based on GValue)
- a serializable parameter abstraction based on GParamSpec
- a threading abstraction SfiThread (based on GThread)
- primitive type implementations (record, sequenzes, rings)
- a glue layer to allow function calls and signals across process boundaries
- a simple communication layer based on SfiValue for process boundaries
- basic serialization mechanisms to allow implementations of persistent object storage
- miscellaneous utilities.
- GLib-Extra - utility functions which are subject to be folded back into GLib at some point.
Components
- 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.
- Beast - a Gtk+ based GUI front-end (see beast.1) for Bse.
- Bse - the sequencing and synthesis core, consisting of:
- Plugin interface,
- MIDI Event processing logic,
- MIDI File import,
- Undo/redo stack,
- Object framework,
- Glue layer + scripting objects,
- Song, track, part, mixer and wave objects,
- Synthesis networks,
- Sequencer (seperately threaded),
- Synthesis Engine (seperately threaded),
- Input output drivers for PCM and MIDI,
- OSS MIDI and PCM driver,
- Standard synthesis modules.
Samples and Wave Files
Sample Data is organized at three levels:
- Wave Chunks - a chunk contains one sample
- Waves - multiple chunks can be put into a wave; this allows storing different samples which should be played for different notes
- 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.


