Music Transformation and Visualization

Music Processing Suite offers a transformation infrastructure to convert a number of music representation formats, including:

Refer to the following diagram for an overview:

Most of the transformations are covered in this chapter. For transformations regarding music analysis, refer to the corresponding chapter.

Rendering Context Tree Model Visualizations

Visual representations of context tree models can be generated by clicking the button in the toolbar at the top of the application. The action is applicable to .mcl files, which must be opened in an editor or selected before the button is clicked.

The resulting graph is stored as a .dot file with the file name <source file>_TreeModel.svg, which can be processed with Graphviz. If you want to open the resulting graphs, make sure Graphviz is installed and configured as described in section Graphviz Installation.

For rendering options, see section Visualization Options.

Rendering Context Layer Model Representations

To transform a musical composition to a context layer model representation, simply select a source file and click the button in the toolbar at the top of the application.

Files with the following extensions can be converted to a context layer model:

In case of .mcl files, the conversion can also be invoked if the file is currently opened in an editor which is currently focused.

As a result, an .svg file with the name <source file>_StreamModel.svg will be created next to the source file. It will automatically be opened using a suitable application or editor. To configure a custom application to open .svg files, refer to the official Eclipse documentation.

Refer to the following section for rendering options.

Visualization Options

To adjust visualization options for context layer models and context layer models, follow these steps:

  1. Open the MPS Preferences
    1. On Windows and Linux: In the menu bar, choose Window → Preferences
    2. On Mac: In the menu bar, choose Music Processing Suite (application menu) → Preferences
  2. Navigate to Music Processing Suite → Visualization

The following preference page will be shown.

The following visualization options are available:

ParameterDescription
Omit Simple Reference Nodes in Context Tree Model GraphsBy default, references are visualized by means of a reference node and a dotted line to the referenced node. If this option is activated, only the dotted line will be displayed. This is only possible if the reference node does not contain additional child nodes.
Render Context Layer Model SVGs in Monochrome ColorsUses gray shades for stream model visualizations.
Context Layer Model Scaling FactorDefines the number of horizontal graphical units used to represent a whole note. Increase this value if labels overlap their container bounds in stream model SVG visualizations.

Transforming Compositions to Scores

MPS supports the generation of musical scores in .pdf and .midi format for various input formats. The music notation software LilyPond is used for this purpose. Before using this feature, make sure that LilyPond is installed and configured as described in section LilyPond Installation. Score generation is triggered using the button in the toolbar at the top of the application.

The following input file types are supported:

In case of .mcl files, the conversion can also be invoked if the file is currently opened in an editor which is currently focused.

The system will internally convert the input file to a context layer model and derive a score representation of that model. Subsequently, the score representation will be exported in the form of a LilyPond file with the file name pattern <source file base name>_Score.ly. The Eclipse plugin Elysium, which is automatically installed with MPS, will take care of the compilation of the LilyPond file, resulting in <source file base name>_Score.pdf and <source file base name>_Score.midi files of the score.

Score Generation Options

When generating a score for the first time, a launch configuration is automatically generated and opened. Launch configurations allow the customization of the score generation for each source file individually. The launch configuration dialog looks like this:

After making the desired adjustments, click the Apply button and then click Run to generate the score.

To change launch configurations later, click the black arrow next to the button in the toolbar and click Run Configurations.... Open the category MPS Score Generation and select the desired launch configuration.

The following options are available:

ParameterDescription
Output FormatAvailable output formats are LilyPond (.ly files) and MusicXML (.musicxml or .mxl files, depending on whether compression is enabled).
Generate Tempo SpecificationsIndicates whether tempo specifications are generated at the beginning of the piece and when the tempo changes.
Generate Chord SymbolsIf activated, chord symbols are generated above the staves.
Omit Instrument NamesOmits instrument names on the left hand side of the staves. Also removes indention at the beginning of the first staff or staff group.
Omit Short Instrument NamesShort instrument names are usually instrument abbreviations printed at the left hand side of staves after the very first staff or staff group, for example Cl. instead of Clarinet. Check this box to omit these.
Insert Line Breaks before each Musical SectionIf set, labeled sections (e.g. Verse, Chorus) start in a new staff block.
Generate Fret Board DiagramsIf activated, fret board diagrams for the selected instrument are rendered above the staves illustrating the fingering of the respective chords.

Score launch configurations can be reused, edited and deleted at any time. Refer to section Launch Configurations for further details.

Transforming Compositions to SuperCollider

To convert a composition into executable code for the sound synthesis language SuperCollider, simply click the button in the toolbar at the top of the application. A file named <source file base name>.scd will be created as a result, containing the code. It can be opened in SuperCollider or directly executed from MPS, as explained in the following section.

Executing SuperCollider Code

The generated SuperCollider code can directly be executed in a running SuperCollider instance. If you want to use this feature, a corresponding extension has to be installed in your SuperCollider Extensions directory. To install the MPS extension, copy the file MusicProcessingSuiteInterface.scd located in the directory SuperCollider of your installation root directory (which is wrapped into a directory named Contents/Eclipse in the MPS.app container on Mac OS X) to your SuperCollider Extensions directory. Refer to http://doc.sccode.org/Guides/UsingExtensions.html for help locating the Extensions directory.

Once the extension is installed (and SuperCollider restarted if already running), the resulting SuperCollider code can directly be executed by clicking the button in the toolbar.

It is also possible to perform code execution with a key binding. It can be defined under PreferencesGeneralKeys. Search for the action Execute SuperCollider Code and define your own key binding. The recommended scope is In Windows. The configuration is shown in the following screenshot:

Deriving Context Tree Models

Context tree models can automatically be derived for existing compositions. To invoke this functionality, select an input file and click the button in the toolbar.

Supported input file types are:

The resulting context tree model will be stored under the file name <source file base name>_DerivedModel.mcl next to the input file.

Launch Configurations

Eclipse stores configuration parameters for runnable processes in so called Launch Configurations. MPS creates default launch configurations for the following processes automatically:

These launch configurations can be reused, edited and deleted at any time. To show available launch configurations, click the black arrow next to the button in the toolbar and click Run Configurations....

In the following dialog, all launch configurations are displayed grouped by launch types. All launch configurations can be run, edited and deleted. In the example below, a score generation launch configuration is shown.