- txt mid
Johann Pachelbel - Canon (thank icy for inputting the score)
- txt mid
Johann Sebastian Bach - Minuet
- txt mid
Johann Sebastian Bach - Invention 14th
- txt mid
Johann Sebastian Bach - Preludio
- txt mid
John Rutter - For the Beauty of the Earth
Sorry for my English. Please visit the Chinese version if you understand Chinese.
MIDI Composer accepts a series of words as input. Words are separated by spaces (including
space, tab and new-line) or bar-line "|". Each word conforms a certain format and represents one
or more notes, or a MIDI controller message.
Note words
A note word is in the form of [note][duration]. In [note], use 1234567 0 or CDEFGAB P to
represent the 7 notes on the keyboard and the rest. Prefix - or + to the number or letter to lower
or raise one octave, prefix ! or # to lower or raise half tone. Immediately following [note] is
[duration], . / \ and - represent adding a half, cutting a half, multiplying 1/3 (useful in
writing triplets) and adding a quarter note to the duration, respectively. If no [duration]
exists, the duration will be a quarter note. Summarization:
| note prefix | duration |
| - | lower one octave |
. | add a half |
| + | raise one octave |
/ | cut a half |
| ! | lower half tone |
\ | multiply by 1/3 |
| # | raise half tone |
- | add a quarter note |
| % | nature | |
Some examples and more complicated writings: (Notice the spaces!)
| +#4/. 0// | 3/16 note high fa sharp, 1/16 note rest |
| 5 1/ 2/ 3/ 4/ 5 1 1 | minuet (Bach) |
| 5 1234/ 511 |
same as above, notes with equal durations may be connected |
| (135) (-613) |
major and minor triad, simultaneous notes should be bracketed |
| (135)(246)(357)(46+1) | appliction of the two rules above |
| 1~3~5~ (135+1) | ~ stands for tie, do not stop until the same note occurs (and no more ties) |
| [52] | the 52nd note, useful with percussions on channel 9 |
None note words
Following is the descriptions of some none note words (N is a none negative, letters inside
brackets may be left out):
| initial value | |
| $N | 0 |
select channel, N=0~15, channel 9 for percussions |
| I(nstrument)=N | 0 | select instrument, N=0~127 |
| S(ignature)=N/N | 2/4 |
set time signature, like 2/4 3/4 4/4 3/8 6/8 etc. |
| T(empo)=N | 750000 |
set tempo, each quarter note last N microseconds |
| V(olume)=N | 127 |
set channel volume, N=0~127 |
| P(osition)=N | 64 |
set channel postion, N=0~127, 0 for left most, 127 for right most |
| // | |
single-line comment, characters until line end would be ignored |
| /* | |
multi-lines comment begin, characters between /* and */ would be ignored |
| */ | |
multi-lines comment end |
Note shift words
When the notes on the staff go too high or too low or modulate, note shift words may be useful
in simplifying the writing. For example, ++1 ++2 ++3 ++4 may be written as ++ 1 2 3 4, where ++
means all notes thereafter will raise two octaves. Explanation on note shift words (always
remember that 1~7 is equal with C~B):
| initial value | |
| - | | lower one octave, repetition permitted |
| + | | raise one octave, repetition permitted |
| 1(C)=N | 60 |
set 1(C) to specified pitch N, N=10~127, in unit of half tone |
| 1(C)=note | | set 1(C) to pitch that note stand for,
pitch that note stand for is relative to the last 1(C)=N |
| 1..7(C..B)accidental | 1234567% |
all corresponding notes thereafter will lower or raise half tone or revert |
It's worth to mention that, when a note prefix only modifies the immediate following note,
a note shift word will affect all the notes that come after it. If a note is affected by a long
range sharp or flat, note prefix % may be use to revert the note to its nature tone. Here is
an example, the following lines all play with an identical result:
C=60 1234567+1 567+1+2+3+#4+5 +1+2+3+4+5+6+7++1
C=60 1234567+1 C=G 1234567+1 C=+C 1234567+1
C=60 1234567+1 C=67 1234567+1 C=F 1234567+1
C=60 1234567+1 567+1+2+3+#4+5 + 1234567+1
C=60 1234567+1 4# 567+1+2+3+4+5 +1+2+3+%4+5+6+7++1
|
Strength control words
Strength of notes may be controled with words relating to < or >. < stands for
gradually increasing and > stands for gradually decreasing. Detial description (N is a none
negative):
| initial value | |
| < | |
gradually increase the strength at a default speed (see below), repetition permitted |
| > | |
gradually decrease the strength at a default speed, repetition permitted |
| = | | stop increasing/decreasing |
| >N< | 10 |
set the default increasing/decreasing speed, increase or decrease N every quarter note |
| <N> | 64 |
set the strength to N, N=1~127, and stop increasing/decreasing |
| <> | | report the strength here |
| <N | | increase the strength at a speed of N |
| >N | | decrease the strength at a speed of N |
Synchronization control words
When the staff becomes long, in order to keep synchronization between channels against
input mistake, also in order to avoid writing too long rest when a channel suspend playing,
synchronization control words are introduced:
| assert_equal |
declare that all existing channels's play time are equal, return with error otherwise |
| make_equal |
make all channels's play time equal, fill shorter channels with rests |
Instrument list
| general instruments (I=N) | | percussions ($9 [N]) |
| 0 | Acoustic Grand Piano | 64 | Soprano Sax |
| 1 | Bright Acoustic Piano | 65 | Alto Sax |
| 2 | Electric Grand Piano | 66 | Tenor Sax |
| 3 | Honky-tonk Piano | 67 | Baritone Sax |
| 4 | Electric Piano 1 (Rhodes Piano) | 68 | Oboe |
| 5 | Electric Piano 2 (Chorused Piano) | 69 | English Horn |
| 6 | Harpsichord | 70 | Bassoon |
| 7 | Clavinet | 71 | Clarinet |
| 8 | Celesta | 72 | Piccolo |
| 9 | Glockenspiel | 73 | Flute |
| 10 | Music Box | 74 | Recorder |
| 11 | Vibraphone | 75 | Pan Flute |
| 12 | Marimba | 76 | Blown Bottle |
| 13 | Xylophone | 77 | Shakuhachi |
| 14 | Tubular Bells | 78 | Whistle |
| 15 | Dulcimer (Santur) | 79 | Ocarina |
| 16 | Drawbar Organ (Hammond) | 80 | Lead 1 (square wave) |
| 17 | Percussive Organ | 81 | Lead 2 (sawtooth wave) |
| 18 | Rock Organ | 82 | Lead 3 (calliope) |
| 19 | Church Organ | 83 | Lead 4 (chiffer) |
| 20 | Reed Organ | 84 | Lead 5 (charang) |
| 21 | Accordion (French) | 85 | Lead 6 (voice solo) |
| 22 | Harmonica | 86 | Lead 7 (fifths) |
| 23 | Tango Accordion (Band neon) | 87 | Lead 8 (bass + lead) |
| 24 | Acoustic Guitar (nylon) | 88 | Pad 1 (new age Fantasia) |
| 25 | Acoustic Guitar (steel) | 89 | Pad 2 (warm) |
| 26 | Electric Guitar (jazz) | 90 | Pad 3 (polysynth) |
| 27 | Electric Guitar (clean) | 91 | Pad 4 (choir space voice) |
| 28 | Electric Guitar (muted) | 92 | Pad 5 (bowed glass) |
| 29 | Overdriven Guitar | 93 | Pad 6 (metallic pro) |
| 30 | Distortion Guitar | 94 | Pad 7 (halo) |
| 31 | Guitar harmonics | 95 | Pad 8 (sweep) |
| 32 | Acoustic Bass | 96 | FX 1 (rain) |
| 33 | Electric Bass (fingered) | 97 | FX 2 (soundtrack) |
| 34 | Electric Bass (picked) | 98 | FX 3 (crystal) |
| 35 | Fretless Bass | 99 | FX 4 (atmosphere) |
| 36 | Slap Bass 1 | 100 | FX 5 (brightness) |
| 37 | Slap Bass 2 | 101 | FX 6 (goblins) |
| 38 | Synth Bass 1 | 102 | FX 7 (echoes, drops) |
| 39 | Synth Bass 2 | 103 | FX 8 (sci-fi, star theme) |
| 40 | Violin | 104 | Sitar |
| 41 | Viola | 105 | Banjo |
| 42 | Cello | 106 | Shamisen |
| 43 | Contrabass | 107 | Koto |
| 44 | Tremolo Strings | 108 | Kalimba |
| 45 | Pizzicato Strings | 109 | Bag pipe |
| 46 | Orchestral Harp | 110 | Fiddle |
| 47 | Timpani | 111 | Shanai |
| 48 | String Ensemble 1 (strings) | 112 | Tinkle Bell |
| 49 | String Ensemble 2 (slow strings) | 113 | Agogo |
| 50 | SynthStrings 1 | 114 | Steel Drums |
| 51 | SynthStrings 2 | 115 | Woodblock |
| 52 | Choir Aahs | 116 | Taiko Drum |
| 53 | Voice Oohs | 117 | Melodic Tom |
| 54 | Synth Voice | 118 | Synth Drum |
| 55 | Orchestra Hit | 119 | Reverse Cymbal |
| 56 | Trumpet | 120 | Guitar Fret Noise |
| 57 | Trombone | 121 | Breath Noise |
| 58 | Tuba | 122 | Seashore |
| 59 | Muted Trumpet | 123 | Bird Tweet |
| 60 | French Horn | 124 | Telephone Ring |
| 61 | Brass Section | 125 | Helicopter |
| 62 | SynthBrass 1 | 126 | Applause |
| 63 | SynthBrass 2 | 127 | Gunshot |
| |
| 35 | Acoustic Bass Drum |
| 36 | Bass Drum 1 |
| 37 | Side Stick |
| 38 | Acoustic Snare |
| 39 | Hand Clap |
| 40 | Electric Snare |
| 41 | Low Floor Tom |
| 42 | Closed Hi Hat |
| 43 | High Floor Tom |
| 44 | Pedal Hi-Hat |
| 45 | Low Tom |
| 46 | Open Hi-Hat |
| 47 | Low-Mid Tom |
| 48 | Hi Mid Tom |
| 49 | Crash Cymbal 1 |
| 50 | High Tom |
| 51 | Ride Cymbal 1 |
| 52 | Chinese Cymbal |
| 53 | Ride Bell |
| 54 | Tambourine |
| 55 | Splash Cymbal |
| 56 | Cowbell |
| 57 | Crash Cymbal 2 |
| 58 | Vibraslap |
| 59 | Ride Cymbal 2 |
| 60 | Hi Bongo |
| 61 | Low Bongo |
| 62 | Mute Hi Conga |
| 63 | Open Hi Conga |
| 64 | Low Conga |
| 65 | High Timbale |
| 66 | Low Timbale |
| 67 | High Agogo |
| 68 | Low Agogo |
| 69 | Cabasa |
| 70 | Maracas |
| 71 | Short Whistle |
| 72 | Long Whistle |
| 73 | Short Guiro |
| 74 | Long Guiro |
| 75 | Claves |
| 76 | Hi Wood Block |
| 77 | Low Wood Block |
| 78 | Mute Cuica |
| 79 | Open Cuica |
| 80 | Mute Triangle |
| 81 | Open Triangle |
|
Example staff
$0 +3+#2// | +3+#2+37+2+1// | 6/ 0//
$1 C=-C 0/ | 0. | -636//
$0 136// | 7/ 03#57// | +1/ 03+3+#2// |
$1 0/. | -33#5// 0/. | -636// 0/. |
assert_equal
|
References
|