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.2. Addons

namelibraryscopecategorydescription
QuantizeAlllibBrahmsAddonQuantizeAllselection, part, track, songquantizethis addon quantizes the events' start positions as well as their durations to the currently selected grid value.
QuantizeLengthlibBrahmsAddonQuantizeLengthselection, part, track, songquantizethis quantizes only the events' duration values.
FixedLengthlibBrahmsAddonFixedLengthselection, part, track, songquantizethe events' duration values are set to the currently selected grid value.
DumplibBrahmsAddonDumpselection, part, track, song, globaltestingthis 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.
ExtractLyricslibBrahmsAddonExtractLyricspart, track, songoutputinvoking this addon causes Brahms to dump all lyrics to the standard output stream.
TexlibBrahmsAddonTexpart, trackoutputthis 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!
StretchlibBrahmsAddonStretchselection, part, track, songeditthis stretches everything by the factor of two (the parts' and events' positions as well as durations)
EarTraininglibBrahmsAddonEarTrainingglobalharmonythis 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.
ParallelslibBrahmsAddonParallelssongharmonythis 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.
RiemannlibBrahmsAddonRiemannsongharmonythis 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

For editing music, Brahms provides different editors. There is the score editor, where notes are displayed and can be modified as musicians would do on note paper or in a score. On the other hand, there is a piano roll editor. New editors and ways of processing music using plugins can be added really easily, as Brahms is very modular.

KDE Logo