Addons

Addons

Also the algorithms operating on the music data are kept in seperate libraries, called addons or plugins. Three addons are always loaded as default: QuantizeAll, QuantizeLength and FixedLength. Other addon can be specified as a commandline parameter: "Brahms -a dump -a parallels ...", or loaded dynamically from the filemenu afterwards.

Addons can be used in differend scopes, listed here ordered from small to large:

When writing an addon, the scope in which the new addon shall be able to operate has to be specified. Of course multiple scope are possible. The "global" scope allows to provide functionality which does not operate on a song or any part of it. An example for this is the "EarTraining" addon.

In Brahms, most operations can be undone via the multilevel undo mechanism. Writing an addon, one has to specify whether the operation shall be able to be undone, in which case the methods undo() and redo() have to be implemented, see below.

So far, we have the following addons:

Table 2.1. Addons

name library scope category description
QuantizeAll libBrahmsAddonQuantizeAll selection, part, track, song quantize this addon quantizes the events' start positions as well as their durations to the currently selected grid value.
QuantizeLength libBrahmsAddonQuantizeLength selection, part, track, song quantize this quantizes only the events' duration values.
FixedLength libBrahmsAddonFixedLength selection, part, track, song quantize the events' duration values are set to the currently selected grid value.
Dump libBrahmsAddonDump selection, part, track, song, global testing this addon dumps the notes' values to the standard output stream. It can and should be used as a template for newbies, who intend to write addons.
ExtractLyrics libBrahmsAddonExtractLyrics part, track, song output invoking this addon causes Brahms to dump all lyrics to the standard output stream.
Tex libBrahmsAddonTex part, track output this is thought as a test platform to switch Brahms printing from mup to tex. Since musixtex is not modular, this module only texes parts and tracks, not songs. Only monophone voices are supported. Everyone is welcome to write a full featured tex module!
Stretch libBrahmsAddonStretch selection, part, track, song edit this stretches everything by the factor of two (the parts' and events' positions as well as durations)
EarTraining libBrahmsAddonEarTraining global harmony this is an example for an addon which makes use of the gui. A window pops up providing several tools to test the users quality of hearing harmonies, like active and passive interval training.
Parallels libBrahmsAddonParallels song harmony this addon performs an analysis of the song, searching for quint and octav parallels - true as well as hidden. Invoking this addon, a new score track is created and filled with copies of notes which are part of parallels. The hidden paralles are coloured.
Riemann libBrahmsAddonRiemann song harmony this addon analyses the notes from the song for riemannian harmonic functions. It is far from being complete, I am developing this myself. Let me know, if you're interested in joining this probably most interesting area of Brahms functionality.

It is thought to put all extra functionality into addon extension. (Later on, when AudioTracks are fully supported, addons will be able to do a FFT analysis of wave files, or even create a ScoreTrack from an AudioTrack by analysing the frequencies).

I still think of a gui based logical editor as needed major addon for the near future.

The EarTraining Addon
The EarTraining Addon

KDE Logo