abc2svg documentation - %%MIDI command

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).

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, 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

Example (click on the music to play it):

X:1
M:3/4
L:1/4
Q:1/4=100
K:C
%%MIDI program 6 % GM Harpsichord
efg|\
%%MIDI program 51 % GM SynthStrings 2
def|\
%%MIDI program 72 % GM Piccolo
c\
%%MIDI control 7 80
d\
%%MIDI control 7 50
B|\
%%MIDI control 7 20
c3|]
X:2
M:6/8
L:1/8
Q:3/8=60
K:Em
%%MIDI program 56 % GM Trumpet
%%MIDI chordprog 74 % GM Recorder
%%MIDI gchordon
B,|"Em"E2G "D"FGA|"G"G2F "C"E2G|"Bm"F2E "D"DEF|"Em"E3|]

abc2svg documentation source author - page hosted by Free