MelCom: A Text-to-Midi Melody Compiler

 

MelCom Language: A Starting Example
Overview

Using MelCom

Download

The Language:
Starting Example
The Basics
Intermediate
Advanced
Examples

Contact

 

Consider the following piece of music.

These 6 measures of music can be expressed textually in MelCom language as follows:

**n[A-B-C]
*t[100]
4: 8g 8a 4g 4a
8: 4a 8cc 8b- 8a 8g 8f
8e 8d 8c 8d 16e 16f 16e 16d 4e
8d 4e 8f 8g 16e 16f 4g
8a 4g 8f 8e 8d 8c 8d
8.e 16d 8c 8d 16c 16B- 16B- 16A 4A

Here are some initial explanations of this MelCom representation:

  • The first line is a header line specifying that English note names (a, b, c, d, e, f, and g) will be used.
     
  • The second line says that the tempo from now on will be 100 quarter-notes per minute.
     
  • Each of the next 6 lines represents the notes in a measure of the given piece. Each note starts with a number that is the reciprocal of the duration; for instance, 8 means an eighth-note. The colon (:) represents a rest. Hence, "4:" means a rest of a quarter-note duration.

It is not necessary that each measure be on a separate line. One can have many measures on the same line, and one may spread a single measure over multiple lines. For readability purpose only, one may use a vertical line (|) as a bar line. As an example, following is an alternative layout of the same piece of music.

**n[A-B-C]
*t[100]
4: 8g 8a 4g 4a | 8: 4a 8cc 8b- 8a 8g 8f |
8e 8d 8c 8d 16e 16f 16e 16d 4e | 8d 4e 8f 8g 16e 16f 4g |
8a 4g 8f 8e 8d 8c 8d | 8.e 16d 8c 8d 16c 16B- 16B- 16A 4A

For those who would prefer using the French note names: d, r, m, f, s, l, t (for Do, Re, Mi, Fa, Sol, La , Ti or Si), The header line and the notes need be changed as follows:

**n[D-R-M]
*t[100]
4: 8s 8l 4s 4l | 8: 4l 8dd 8t- 8l 8s 8f |
8m 8r 8d 8r 16m 16f 16m 16r 4m | 8r 4m 8f 8s 16m 16f 4s |
8l 4s 8f 8m 8r 8d 8r | 8.m 16r 8d 8r 16d 16T- 16T- 16L 4L