abc2svg documentation - %%MIDI commands

MIDI channel channel number

This command sets the MIDI channel of a voice.

The channel number must be in the range [1 .. 16] when playing is done by an internal or external MIDI device.

By default, the MIDI channel number is the voice number plus one when less than 9 or the voice number plus two when greater than or equal to 9.
The voice number is in the range [0 .. n-1] from the order of the declaration of the voices (it is not the voice identifier).

The channel number 10 is used for percussion.

This command is compatible with the ABC program abcMIDI.

MIDI chordprog MIDI program number [ octave=<n> ]

This command defines the MIDI program to use for the accompaniment.

MIDI chordvol volume

This command defines the volume of the accompaniment (range 0..127 - default value ~75).

MIDI control control number value

This command sets the value of the MIDI controller control number. Both values must be smaller than 128.

This command is compatible with abcMIDI.

When playing with the HTML5 audio API (thanks to a SF2 font), only three controllers are handled:

0MSB bank number
7Volume
32LSB bank number

Note: The bank 256 is the percussion bank.

MIDI gchordon / MIDI gchordoff

These commands enable or disable accompaniment.

Contrary to abcMIDI, the accompaniment is not active when there are chord symbols in tunes with only one voice.

MIDI program [channel number] program number

This command sets the program number and possibly the channel number of a voice.

The program number is in the range [0 .. 127] for being compatible with abcMIDI.

MIDI temperamentequal ndiv

This command defines a tempered scale defined by 'ndiv' equal divisions of the octave.

It is compatible with abcMIDI with an implicit octave_cents = 1200 cents and default fifth_steps and sharp_steps.

As an example, you may try this extract of "Sıpıhr peşrev".

When using this command, the accidentals are reduced to "^<n>" and "_<n>" where <n> is in the range 1 .. (ndiv / 6 + 1).
The simple accidentals "^" and "_" give odd results when ndiv is odd!

This command works with both abcm2ps and abc2svg. The accidental glyphs are defined

Examples (click on the music to play it):

Definitions of the Türkish Arel - Ezgel accidentals

abc2svg documentation source author - page hosted by Free