欢迎访问视障者音乐制作交流基地(www.szzyyzz.com)!
我们的网站致力于为使用读屏软件的视障群体(以下简称“读屏族”)提供音乐制作方面的技术和信息。
如您是读屏族,我们希望能在这里为您提供您最需要的内容
如您是明眼朋友,可能会对论坛中的一些用语感到无比疑惑,那是因为这些都是基于读屏软件下的操作术语。
虽然这个论坛对于明眼人也许帮助不大,但我们却很希望能得到您的援助,您可以以远程协助的方式为读屏族解决音乐制作过程中所遇到的困难……

首页

 找回密码
 立即注册

QQ登录

只需一步,快速开始

7
查看: 6533|回复: 7
打印 上一主题 下一主题

[其他书籍] abcmidi user guide

[复制链接]

116

主题

703

帖子

5411

积分

版主

Rank: 12Rank: 12Rank: 12

积分
5411
QQ
跳转到指定楼层
楼主
发表于 2015-2-8 11:05:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,浏览本站更多内容。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
楼主 rofy530说:

  1. What's new
  2. December 12 2012. New feature bent notes. April 10 2012. New feature customized stress models.
  3. Guide to Advanced Features of Abc2midi
  4. Introduction
  5. Abc2midi is a program that converts an abc music notation file to a MIDI file. The program was developed by James Allwright in the early 1990s and has been supported by Seymour Shlien since 2003. The program contains many features, such as expansion of guitar chords, drum accompaniment, and support for microtones, that do not exist in other packages. This guide focuses on those features that are particular to abc2midi. It assumes a general understanding of the abc notation syntax. Some knowledge of the MIDI standard is also an asset.
  6. First, abc2midi has some serious limitations and perhaps a few known bugs. Abc2midi ignores all DC (Da Capo), DS (Da Segno), al Fine symbols. You will either need to explicitly repeat sections or use the P: command to control these repeats. There are many limitations in the handling of lyrics and the creation of Karaoke MIDI files. If the lyrics, are embedded in repeats (eg. |: and :|) they will not be repeated in the MIDI file. To create a proper MIDI file you will have to expand the repeats explicitly in the abc file (eliminating the repeat symbols). This is particularly important, if there are different lyrics in the repeats. In general the repeat symbols cause a minor annoyance since it is common to leave out the opening repeat (|:) in common music notation. Abc2midi needs to know where it returns during a repeat; it silently inserts the opening repeat when it is missing but it may put it in the wrong place if there is an anacrusis. When a music line contains overlays using (sometimes called splits), they are not handled correctly when they occur in a part (eg. P:A). I have not figured out how to do it properly. (The software to handle splits is very complicated since they are put into a separate tracks. The handling of repeats and splits is hard enough.)
  7. Abc2midi is coded in C language; the latest version of the source code is found in the abcMIDI-20*.zip package which can be downloaded from [url]http://ifdo.ca/~seymour/runabc/top.html[/url] or [url]http://sourceforge.net/projects/abc/[/url] . Executables for some systems can be found in The ABC Plus project .
  8. The source code was designed to compile on many different platforms and operating systems. As a result, there is no graphical user interface built in; however, other programs such as runabc provide the graphical user interface to abcMIDI and other packages.
  9. It is necessary to run abc2midi from a command window in order to supply run time parameters. (This applies to all programs in the abcMIDI package.) If you double click on one of the executables, the screen might blink but nothing else will happen.
  10. Abc2midi creates either a type 0 or type 1 MIDI file. If the abc tune is simple (no voices or accompaniment), abc2midi creates a type 0 file consisting of only one track. For other tunes, abc2midi creates a type 1 file or a multitrack MIDI file. The first track conventionally contains ancillary information such as the name of the tune and other comments. The other tracks contain the different voices and accompaniment.
  11. The MIDI standard provides 16 channels, each of which can be controlled independently. Commonly, the channels are mapped into separate musical instruments, allowing 16 instruments to be played at the same time. The different instruments are referred to as “programs” and there is a special MIDI command which maps a channel to a specific program. There are 128 possible programs available and they are referred to by a number from 0 to 127.
  12. Abc2midi automatically assigns a new track and channel to each voice in the abc tune. (You can change the channel assignment, with the “%%MIDI channel” command.) If the voice contains splits, ie distinct music lines in a measure, the voice will be mapped into multiple tracks. The bass/chord accompaniment is put into one track but the bass and chordal accompaniment have different MIDI channels. The drum and drone accompaniments are also put into separate tracks and channels.
  13. Since abc2midi creates an audio representation of the abc file, there are a number of commands that are particular to this program that may be embedded in the abc file. These commands are all prefixed with %%MIDI starting from the first column of the line. There are about 40 such commands. For example,
  14. %%MIDI program 64
  15. assigns the soprano saxophone to the melody line or the particular voice it is attached to.
  16. To avoid the problem of breaking up a music line in order to place a %%MIDI command, for example,
  17. A2 B2|\
  18. %%MIDI drumon
  19. C2 D2|
  20. you can place the MIDI instruction inside an info field using the following syntax.
  21. A2 B2|[I:MIDI= drumon] C2 D2|
  22. The '=' following the MIDI is very important. The info field syntax allows you to place several MIDI commands in one inline block, for example
  23. [I: MIDI = program 73 MIDI=chordprog 29]
  24. (Spaces are optional.)
  25. Some other commands embedded in the abc body are enclosed by exclamation marks, eg !mf! and affect abc2midi. There are a few parameters included in the K: and V: field commands which are particular to abc2midi. For example,
  26. K: C transpose=-2
  27. addresses the problem with the Bb clarinet where the music is printed in C, but actually played in Bb. Other parameters are presented directly in the run time parameters of abc2midi, but can be overriden by the contents of the abc file.
  28. Key Signature Extensions
  29. The K: is made up of a base note AG possibly followed by b for flat or # for sharp. This specifies a major key. A minor key can be specified by adding an m while Mixolydian and Dorian modes can be specified by adding Mix and Dor respectively eg
  30. K:Eb
  31. K:EDor
  32. K:EbDor
  33. The following table relates the number of sharps or flats you see on the stave to what is in the K: field :
  34. 4 sharps EMaj F#Dor G#Phr A#Lyd B#Mix C#Min
  35. 3 sharps AMaj BDor CPhr DLyd EMix F#Min
  36. 2 sharps DMaj EDor FPhr GLyd AMix BMin
  37. 1 sharp GMaj ADor BPhr CLyd DMix EMin
  38. 0 sharp CMaj DDor EPhr FLyd GMix AMin
  39. 1 flat FMaj GDor APhr BLyd CMix DMin
  40. 2 flats BbMaj CDor DPhr ELyd FMix GMin
  41. 3 flats EbMaj FDor GPhr ALyd BbMix CMin
  42. 4 flats AbMaj Bbdor CPhr DLyd EMix FMin
  43. 5 flat DbMaj Ebdor FPhr GLyd AbMix BbMin
  44. As an extension, abc2midi also recognizes "Maj" for Major "Min" for Minor, "Phr" for Phrygian, "Lyd" for Lydian, "Aeo" for Aeolian and "Loc" for Locrian. Thus CMaj, EPhr, FLyd, AAeo and BLoc will all generate a stave with no sharps or flats. If you use one of these modes in the key signature, it is recommended that you add a comment giving the number of sharps or flats for the benefit of other people who may not be familiar with modes. eg
  45. K: DLoc % 3 flats
  46. The key signature may be followed by modifiers. A modifier consists of ^^, ^ =, _ or __ followed by ag or AG. As an example, ^g means every a should be played sharp unless otherwise marked in the music. This adds ^g to the existing key signature. For example
  47. K: G ^c^g
  48. will produce a key signature similar to A major. Following the abc draft 2.0 standard, inserting the string exp in the key signature will cause abc2midi to override the existing key signature. Thus
  49. K: A exp _b
  50. will remove the f,c and g sharps and put a b-flat instead. You may use both upper and lower case letters as key modifiers since they are distinguished by abcm2ps.
  51. The modifiers in the key signature now allow you to put microtones. For example: K:C _1/2B will flatten the key of B by half of a semitone. Note that in the current implementation, microtones do not propagate and accidentals will not affect following B notes in the measure. Certain combinations may not work as expected. For example K:F _1/2B may be treated the same way as K: C _1/2B. See the microtone section for more details.
  52. Another extension of the K: field is that it can include a clef specifier an octave specifier and a transpose specifier eg
  53. K:G clef=soprano octave=-1 transpose=-1
  54. The clef is recognized by typesetting programs such as yaps and abc2mps and in some situations it will cause abc2midi to transpose the notes up or down by an octave. Recognized clefs are treble, bass, baritone, tenor, alto, mezzo and soprano. There are also variants of these clefs; treble-8, tenor-8, treble+8 covering ranges which are an octave below and an octave above the normal treble clef. Other variants are not recognized at this time. No transposition is assumed for the bass clef since many abc files enter the notes with all the commas.
  55. The octave specifier is a convenience to make entering music easier. It allows the user to avoid repeatedly entering commas or apostrophes when entering a sequence of low or high notes. Both yaps and abc2midi will transpose the notes by the specified number of octaves during the parsing stage.
  56. eg the passage B,,, C,, D,, E,, F,, could be written more compactly as
  57.    I:octave=-2
  58.    B, CDEF
  59.    I:octave=0
  60. Some instruments such as the Bb clarinet automatically transpose the written music. For example in the case of the clarinet, the music is written in the key of C but the instrument plays it in the key of Bb. For multivoiced tunes, the %%MIDI transpose indication is not that useful since it transposes all the voices by the specified amount. The transpose=n subcommand in the K: field tells abc2midi to transpose a particular voice by n semitones without affecting how it appears in the printed score. For example for the tune,
  61. X:1
  62. T:tranposing
  63. M:1/8
  64. L:2/4
  65. K:C
  66. V:1
  67. K:C transpose=-1
  68. CDEF|GABc|
  69. V:2
  70. K:C
  71. CDEF|GABc
  72. V:1
  73. CDEF|GABc|
  74. V:2
  75. CDEF|GABc
  76. Voice 1 will be played one semitone lower than indicated. These transposition features are disabled for channel 10 which is reserved for percussion instruments.
  77. Channels and Programs
  78. %%MIDI channel n
  79. assigns MIDI channel n (in the range 1-16) to the current voice or melody.
  80. %%MIDI program [c] n
  81. selects program n (in the range 0-127) to channel c. If c is not given, the program is assigned to the current channel being used. Most modern tone generators follow the General MIDI standard, which defines the instrument type for each program number. These instruments are listed at the end of this section. Note that for multivoiced files, the program command is placed in the track associated with the voice previously declared. If the %%MIDI indications affect channels in other tracks, it is recommended that they be placed before the first track or first declared voice. The following example is used to illustrate the use of the “%%MIDI channel” command. This is not the recommended practice for changing programs since it ties up 4 channels unnecessarily.
  82. X:10 T:雅芳夾具%諾丁漢音樂數據庫S:保羅·威爾遜,通過菲爾·羅M:6/8 Q:四分之一= 180 K:EM %% MIDI程序5 %% 10 MIDI程序6 20 %% MIDI程序7月30日%% MIDI程序8 40 %%的MIDI通道5 B |“EM”端到端B2B | GAB E3 |“D7”FED AGF | FED AGF | %% MIDI通道6“EM”端到端B2B |“EM”GAB E3 | “D7”FED A2A |“EM”GEE E2 :: %% MIDI通道7 D |“G”G2G B2B |“D7”ABA D3 |“G”G2G B2B |“AM”D2D“D7”CBA |“G” G2G B2B |“D7”ABA D3 | \ %% MIDI通道8“EM”EFG“A7”FED |“EM”E3-E2:|
  83. X:10 T:雅芳夾具%諾丁漢音樂數據庫S:保羅·威爾遜,通過菲爾羅維M:6/8 Q:四分之一= 180 K:EM %% MIDI程序5 %% 10 MIDI程序6 20 %% MIDI程序7 30 %% MIDI程序8 40 %%的MIDI通道5 B |“EM” E2E B2B | GAB E3 |“D7”FED AGF | FED AGF | %% MIDI通道6“EM”端到端B2B |“EM”GAB E3 |“D7”FED A2A |“EM”GEE E2 :: %% MIDI通道7 D |“G”G2G B2B |“D7”ABA D3 |“G”G2G B2B |“AM”D2D“D7”CBA |“G”G2G B2B |“D7”ABA D3 | \ %% MIDI通道8“EM” EFG“A7”FED |“EM”E3-E2:|
  84. Instead you should use the same channel to change the program as shown here.
  85. X:10 T:雅芳夾具%諾丁漢音樂數據庫S:保羅·威爾遜,通過菲爾·羅M:6/8 Q:四分之一= 180 K:EM %% MIDI程序10 B |“EM”端到端B2B | GAB E3 | “D7”FED AGF | FED AGF | %% MIDI程序20“EM”端到端B2B |“EM”GAB E3 |“D7”FED A2A |“EM”GEE E2 :: %% MIDI程序30 D |“G”G2G B2B |“D7”ABA D3 |“G”G2G B2B |“AM”D2D“D7”CBA |“G”G2G B2B |“D7”ABA D3 | \ %% MIDI程序40“EM”EFG“A7”FED | “EM”E3-E2:|
  86. X:10 T:雅芳夾具%諾丁漢音樂數據庫S:保羅·威爾遜,通過菲爾·羅M:6/8 Q:四分之一= 180 K:EM %% MIDI程序10 B |“ EM“端到端B2B | GAB E3 |”D7“FED AGF | FED AGF | %% MIDI程序20”EM“端到端B2B |”EM“GAB E3 |”D7“FED A2A |”EM“GEE E2 :: %% MIDI計劃30 D |“G”G2G B2B |“D7”ABA D3 |“G”G2G B2B |“AM”D2D“D7”CBA |“G”G2G B2B |“D7”ABA D3 | \ %% MIDI程序40“ EM“EFG”A7“FED |”EM“E3-E2:|
  87. Here is how it sounds like. Note that that channel numbers must be from 1 to 16; however, program numbers must be from 0 to 127.
  88. General MIDI Programs
  89. 0. Acoustic Grand Piano
  90. 1. Bright Acoustic Piano
  91. 2. Electric Grand Piano
  92. 3. Honky-tonk Piano
  93. 4. Electric Piano 1
  94. 5. Electric Piano 2
  95. 6. Harpsichord
  96. 7. Clavi
  97. 8. Celesta
  98. 9. Glockenspiel
  99. 10. Music Box
  100. 11. Vibraphone
  101. 12. Marimba
  102. 13. Xylophone
  103. 14. Tubular Bells
  104. 15. Dulcimer
  105. 16. Drawbar Organ
  106. 17. Percussive Organ
  107. 18. Rock Organ
  108. 19. Church Organ
  109. 20. Reed Organ
  110. 21. Accordion
  111. 22. Harmonica
  112. 23. Tango Accordion
  113. 24. Acoustic Guitar (nylon)
  114. 25. Acoustic Guitar (steel)
  115. 26. Electric Guitar (jazz)
  116. 27. Electric Guitar (clean)
  117. 28. Electric Guitar (muted)
  118. 29. Overdriven Guitar
  119. 30. Distortion Guitar
  120. 31. Guitar harmonics
  121. 32. Acoustic Bass
  122. 33. Electric Bass (finger)
  123. 34. Electric Bass (pick)
  124. 35. Fretless Bass
  125. 36. Slap Bass 1
  126. 37. Slap Bass 2
  127. 38. Synth Bass 1
  128. 39. Synth Bass 2
  129. 40. Violin
  130. 41. Viola
  131. 42. Cello
  132. 43. Contrabass
  133. 44. Tremolo Strings
  134. 45. Pizzicato Strings
  135. 46. Orchestral Harp
  136. 47. Timpani
  137. 48. String Ensemble 1
  138. 49. String Ensemble 2
  139. 50. SynthStrings 1
  140. 51. SynthStrings 2
  141. 52. Choir Aahs
  142. 53. Voice Oohs
  143. 54. Synth Voice
  144. 55. Orchestra Hit
  145. 56. Trumpet
  146. 57. Trombone
  147. 58. Tuba
  148. 59. Muted Trumpet
  149. 60. French Horn
  150. 61. Brass Section
  151. 62. SynthBrass 1
  152. 63. SynthBrass 2
  153. 64. Soprano Sax
  154. 65. Alto Sax
  155. 66. Tenor Sax
  156. 67. Baritone Sax
  157. 68. Oboe
  158. 69. English Horn
  159. 70. Bassoon
  160. 71. Clarinet
  161. 72. Piccolo
  162. 73. Flute
  163. 74. Recorder
  164. 75. Pan Flute
  165. 76. Blown Bottle
  166. 77. Shakuhachi
  167. 78. Whistle
  168. 79. Ocarina
  169. 80. Lead 1 (square)
  170. 81. Lead 2 (sawtooth)
  171. 82. Lead 3 (calliope)
  172. 83. Lead 4 (chiff)
  173. 84. Lead 5 (charang)
  174. 85. Lead 6 (voice)
  175. 86. Lead 7 (fifths)
  176. 87. Lead 8 (bass + lead)
  177. 88. Pad 1 (new age)
  178. 89. Pad 2 (warm)
  179. 90. Pad 3 (polysynth)
  180. 91. Pad 4 (choir)
  181. 92. Pad 5 (bowed)
  182. 93. Pad 6 (metallic)
  183. 94. Pad 7 (halo)
  184. 95. Pad 8 (sweep)
  185. 96. FX 1 (rain)
  186. 97. FX 2 (soundtrack)
  187. 98. FX 3 (crystal)
  188. 99. FX 4 (atmosphere)
  189. 100. FX 5 (brightness)
  190. 101. FX 6 (goblins)
  191. 102. FX 7 (echoes)
  192. 103. FX 8 (sci-fi)
  193. 104. Sitar
  194. 105. Banjo
  195. 106. Shamisen
  196. 107. Koto
  197. 108. Kalimba
  198. 109. Bag pipe
  199. 110. Fiddle
  200. 111. Shanai
  201. 112. Tinkle Bell
  202. 113. Agogo
  203. 114. Steel Drums
  204. 115. Woodblock
  205. 116. Taiko Drum
  206. 117. Melodic Tom
  207. 118. Synth Drum
  208. 119. Reverse Cymbal
  209. 120. Guitar Fret Noise
  210. 121. Breath Noise
  211. 122. Seashore
  212. 123. Bird Tweet
  213. 124. Telephone Ring
  214. 125. Helicopter
  215. 126. Applause
  216. 127. Gunshot
  217. Guitar Chords
  218. Guitar chord accompaniment adds more life to any tune. For example compare Dennis Murphys Reel with no accompaniment with Dennis Murphys Reel with accompaniment . Guitar chords are indicated using double quotes; for example, "D" in the body of the sample.
  219. X:3 T:丹尼斯·墨菲%諾丁漢音樂數據庫S:通過PR M:4/4 L:1/4 K:D D / 2E / 2 |:“D”F / 2G / 2F / 2E / 2 D3 / 2B / 2 | AD FA |“EM”GE E3 / 2D / 2 |“A7”CB C / 2B / 2A |“D”F / 2G / 2F / 2E / 2 D3 / 2B / 2 |“D”AD FA | “EM”GE“A7”E3 / 2F / 2 |“D”版D2 ::“D”AF F / 2E / 2F |“G”博伽克/ 2F / 2G |“D”AF F / 2E / 2D | “A7”E / 2F / 2E / 2D / 2 BA |“D”AF F / 2E / 2F |“G”博伽梵歌G3 / 2A / 2 |“A7”巴GC |“D”版D2:|
  220. X:3 T:丹尼斯·墨菲%諾丁漢音樂數據庫S:通過PR M:4/4 L:1/4 K:D D / 2E / 2 |:“D”F / 2G / 2F / 2E / 2 D3 / 2B / 2 | AD FA |“EM”GE E3 / 2D / 2 |“A7”CB C / 2B / 2A |“D”F / 2G / 2F / 2E / 2 D3 / 2B / 2 |“D”AD FA |“EM” GE“A7”E3 / 2F / 2 |“D”版D2 ::“D”AF F / 2E / 2F |“G”博伽克/ 2F / 2G |“D”AF F / 2E / 2D |“A7” E / 2F / 2E / 2D / 2 BA |“D”AF F / 2E / 2F |“G”博伽梵歌G3 / 2A / 2 |“A7”巴GC |“D”版D2:|
  221. Guitar chords must use upper case AG followed by optional # or b, then the name of a chord type eg "m", "aug", "7". abc2midi currently recognizes the following chord names :
  222.   m, 7, m7, maj7, M7, 6, m6, aug, +, aug7, dim, dim7, 9, m9, maj9, M9,
  223. 11, dim9, sus, sus9, 7sus9, 5

  224. Lower case ag followed by optional # or b will generate a single note (the fundamental) only.
  225. The chord notation also allows chords such as "G/B" or "G/b". The note following the / is interpreted in one of two ways:
  226. If the note following / does not exist as part of the given chord, it is added to the chord below the root note of the chord (G in the above example).
  227. If the note following / does exist in the chord, then the notes of the chord are rearranged so that it becomes the lowest pitch note of the chord. This is known as an inversion of the chord. It does not matter whether the note following the / is upper or lower case. They are both treated the same. The following examples are equivalent.
  228. X:1 T:和弦類型M:2/4 L:1/4 K:c%% MIDI gchord FC“C / E”Z2 |“CM7 / G”Z2 |“C / F”Z2 |“C / F “Z2 | X:2 T:和弦擴大M:2/4 L:1/4 K:C”^ C / E“E ,, [CG,E,] | \”^ CM7 / G“G ,, [歐洲央行,G,] | \“^ C / F”F ,,, [G,E,C,] | \“^ C / F”F ,,, [G,E,C,] |
  229. X:1 T& :和弦類型M:2/4 L:1/4 K:c%% MIDI gchord FC“C / E”Z2 |“CM7 / G”Z2 |“C / F”Z2 |“C / F”Z2 | X :2 T:和弦擴大M:2/4 L:1/4 K:C“^ C / E”E ,, [CG,E,] | \“^ CM7 / G”G ,, [ECB,G, ] | \“^ C / F”F ,,, [G,E,C,] | \“^ C / F”F ,,, [G,E,C,] |

  230. gchord4
  231. You may find some abc tunes that abuse this notation and use quotes for things that are not guitar chords. Usually these are tunes that have been typeset but never played by a computer. If you do not want to just delete things in quotes, you can insert one of the characters _, ^, @, < or > after the first quote eg "_Chorus" "_Very Loud". This causes abc2midi to ignore the following text. However, typesetting programs should recognize the first character as telling them where to print the following text.
  232. Abc2midi expands the guitar chords into a specific pattern of notes and places them into a separate track in the midi file. For common time signatures such as 2/4,3/4 and 4/4, there are specific patterns already defined; for unusual time signatures, the user must define the patterns. For example:
  233. gchord1
  234. expands to
  235. gchord2
  236. The guitar chord consists of two components, the bass note and the chord. Each component is assigned a separate MIDI channel, so that the user is able to play them on separate instruments. For example, listen to the following arrangement of Dennis Murphy's Reel The abc file containing these special instructions abc2midi is shown here.
  237. X: 3
  238. T:Dennis Murphy's
  239. % Nottingham Music Database
  240. S:via PR
  241. M:4/4
  242. L:1/4
  243. K:D
  244. %%MIDI program 64
  245. %%MIDI chordprog 24
  246. %%MIDI bassprog 45
  247. %%MIDI beat 87 77 67 4
  248. %%MIDI chordvol 88
  249. %%MIDI bassvol 82
  250. d/2e/2|:"D"f/2g/2f/2e/2 d3/2B/2|AD FA|"Em"GE e3/2d/2|"A7"cB c/2B/2A|
  251. "D"f/2g/2f/2e/2 d3/2B/2|"D"AD FA|"Em"GE "A7"e3/2f/2|"D"ed d2::
  252. "D"Af f/2e/2f|"G"Bg g/2f/2g|"D"Af f/2e/2d|"A7"e/2f/2e/2d/2 BA|
  253. "D"Af f/2e/2f|"G"Bg g3/2a/2|"A7"ba gc|"D"ed d2:|
  254. Here is an explanation of all the %%MIDI instructions.
  255. %%MIDI program 64
  256. tells abc2midi to assign the soprano saxophone to the melody line (or the current voice). The General Midi Standard assigns 128 instrument sounds to the program numbers. Assuming that the program numbers start from zero, the soprano saxophone has the number 64.
  257. %%MIDI chordprog 24
  258. likewise assigns the acoustic guitar (nylon), to the chords and
  259. %%MIDI bassprog 45
  260. assigns the pizzicato strings to the bass. The loudness (called velocities in MIDI nomenclature) of the bass and chord accompaniment are specified separately using the bassvol and chordvol parameters. They range between 0 and 127, where 127 is the loudest. The beat command is used to control the loudness of the melody or other voices. This is described in a separate section.
  261. Since November 2011, abc2midi now accepts octave=n where n is between -2 and 2 inclusive in the chordprog and bassprog MIDI command. This shifts the pitch of the bass and chordal accompaniment by the specified number of octaves from their usual positions. For example,
  262. %%MIDI bassprog 45 octave=1
  263. will shift the acoustic guitar up one octave.
  264. The manner in which the guitar chords are translated into bass and chords is controlled by the %%MIDI gchord string.
  265. %%MIDI gchord [string]
  266. Sets up how guitar chords are generated. The string is a sequence of letters, each followed by an optional length:
  267. z
  268. rest
  269. c
  270. chord
  271. f
  272. fundamental (root note of chord)
  273. b
  274. fundamental plus chord
  275. G/H/I/J
  276. individual notes starting from the lowest note of the chord
  277. g/h/i/j
  278. an octave above these
  279. For example for the C major chord "C", g refers to C, h refers to E and i refers to G. But for "C/E" (the first inversion of the C major chord), g refers to E, h refers to G and i refers to C.
  280. The gchord strings have been set for common time signatures such as 2/4, 4/4, 3/4/, 6/8 and 9/8. For example, in the above example the gchord string was assumed to be fzczfzcz where f designates fundamental, c designates chord and z designates a rest. These letters may be followed by numbers which multiply the length of these entities by the factor. For example, an alternative gchord string could be f2cf2c. For other time signatures such as 7/8, it is necessary to indicate the gchord string for example,
  281. %%MIDI gchord f2f2cz2
  282. Please note that the default gchord string is issued any time a time signature change is specified in the body of the music. This means that if one of the bars has an extra beat and you encircled the bar with M: declarations, then the gchord string would be reset to the default string associated with that time signature. It is necessary to send another %%MIDI gchord declaration after the the time signature in order to set this back to the desired gchord string.
  283. Also note that the standard note length of a single note f,c,z or d is not determined by the L: command. Instead it is adjusted so that the entire gchord string fits in a bar. (The same will apply to the drum string described later.) For example, if you have
  284. %%MIDI gchord fffff
  285. the bar will be divided evenly into five fundamental notes irrespective of the time signature (T:) and unit length indication. ( L:).
  286. The gchord command has been extended to allow you to play the individual notes comprising the guitar chord. This allows you to play broken chords or arpeggios. The new codes g,h,i,j, G,H,I,J reference the individual notes starting from the lowest note of the chord (not necessarily the root in the case of inverses). For example, for the C major chord, g refers to C, h refers to E and i refers to G. For a gchord command such as
  287. %%MIDI gchord ghih
  288. Abc2midi will arpeggiate the C major guitar chord to CEGE. The upper case letters G,H,I, and J refer to the same notes, except they are transposed down one octave. Note that for the first inversion of the C major chord (indicated by "C/E"), E would be the lowest note, so g would reference the note E. To hear an example using the command
  289. %%MIDI gchord ghig
  290. click on Dennis Murphy's Reel arpeggiatted . The first few bars of the arpeggiated tune look like this.
  291. gchord3
  292. If the guitar chord does not change in consecutive bars, it is not necessary to repeat the guitar chord in each bar. Once the guitar chord accompaniment has been started with the first guitar chord indication, there is only one way to turn it off.
  293. %%MIDI gchordoff
  294. Turns off guitar chords.
  295. %%MIDI gchordon
  296. Turns on guitar chords (they are turned on by default at the start of a tune after the first guitar chord). If you do not hear the guitar chord accompaniment after the first guitar chord indication, it is probably because there is no default gchord string for the particular time signature. You will need to include a gchord string.
  297. Since 2010 you can now have more than one gchord accompaniment track. Here is an example:
  298. X:1 T:gchord multivoice擴展M:4/4 L:1/4 K:GV:1 %% MIDI gchord GHIH“G”Z4 | Z4 | \ %% MIDI gchordoff Z4 | V:2 %% MIDI chordprog 12 %% MIDI gchord GHIHG Z4 |“D”Z4 | Z4 |
  299. X:1 T:gchord multivoice擴展M:4/4 L:1/4 K:GV:1 %% MIDI gchord GHIH“G”Z4 | Z4 | \ %% MIDI gchordoff Z4 | V:2 %% MIDI chordprog 12 %% MIDI gchord GHIHG Z4 |“D”Z4 | Z4 |
  300. Chord name
  301. %%MIDI chordname name n1 n2 n3 n4 n5 n6
  302. Defines how to play a guitar chord called "name". n1 is usually 0 and n2, n3 to n6 give the pitches of the other notes in semitones relative to the root note. There may be fewer than 6 notes in the chord, but not more. If "name" is already defined, this command redefines it. Unlike most other commands, chordname definitions stay in effect from where they are defined to the end of the abc file. The following illustrates how m, 7, m7 and maj7 could be set up if they were not already defined.
  303. %%MIDI chordname m 0 3 7
  304. %%MIDI chordname 7 0 4 7 10
  305. %%MIDI chordname m7 0 3 7 10
  306. %%MIDI chordname maj7 0 4 7 11
  307. Drone accompaniment
  308. %%MIDI droneon
  309. This starts a continuous drone used in bagpipe music. The drone consists of two notes (by default A, and A,,) played on a bassoon at a MIDI loudness (velocity) 80. You can configure the drone sound using the %%MIDI drone command described below.
  310. %%MIDI droneoff
  311. This turns off the drone.
  312. %%MIDI drone n1 n2 n3 n4 n5
  313. Configures the drone chord. n1 = MIDI program, n2 = MIDI pitch 1, n2 = MIDI pitch 2, n4 = MIDI velocity 1, and n5 = MIDI velocity 2. By default they have already been set to 70 45 33 80 80.
  314. For example: click on Banks and Braes .
  315. 無人機
  316. X: 1
  317. T:Banks and Braes
  318. M:6/8
  319. L:1/8
  320. S:Slow March
  321. K:HP
  322. %%MIDI program 109
  323. %%MIDI gracedivider 4
  324. %%MIDI drone 70 45 33 61 54
  325. %%MIDI droneon
  326. |: {Gdc}d2{g}d{g}ede|\
  327. {g}faf{gef}e2{g}d/2e/2|\
  328. {g}f3/2e/2d{g}dB{G}A|\
  329. {g}A3/2B/2d{gef}e2{g}A|
  330. {Gdc}d2{g}d{g}ede|\
  331. {g}faf{gef}e2{g}d/2e/2|\
  332. {g}f3/2e/2d{g}dB{G}A|\
  333. {g}A3/2B/2d{gdc}d2| {g}A:|

  334. Explanation: the drone command selects the Bassoon, key of A, and A,, for the drone and the loudness levels 61 and 54 respectively. The melody is played on the bagpipes; the gracedivider command will be explained later.
  335. Drum Accompaniment
  336. The General MIDI Standard provides 47 percussion instruments. The percussion instruments are accessed from MIDI channel 10 (assuming you are counting from 1). Each percussion instrument is associated with a specific MIDI pitch starting from 35 and ending at 81 inclusive. (The table is given below.) The drum accompaniment provides a method of repeating a certain pattern every bar. The pattern is specified as follows.
  337. %%MIDI drum string [drum pitch numbers] [drum velocities]
  338. This sets up a drum pattern. The string determines when there is a drum beat and the drum pitch values determine what each drum strike sounds like. Drum velocities indicate which range from 0 to 127 indicate the loudness of each drum hit. eg %%MIDI drum d2zdd 35 38 38 100 50 50 The string may contain 'd' for a drum strike or 'z' for a rest. By default a voice starts with no drum pattern. The drum string is treated in a similar manner as the gchord string and is expanded to fill the whole bar (with one exception to be discussed later).
  339. %%MIDI drumon
  340. is needed to enable the drumming. The drum pattern is repeated during each bar until a
  341. %%MIDI drumoff
  342. is encountered. The %%MIDI drum command may be used within a tune to change the drum pattern. This command places the drum sounds on channel 10 and assumes that your tone generator complies with the General Midi standard - if it does not, then you may hear tones instead of drum sounds. (Note the old method of using the instruction !drum! and !nodrum! is being deprecated.) For example: click on Macedonska Sedenka sample .
  343. X:1 T:Macedonska Sedenka刪節樣本○:馬其頓C:繁體。R:kopanica Z:HTTP://swiss.csail.mit.edu/~jaffer/Music Q:四分之一= 220 M:11/8 L:1/8 K:c%% MIDI gracedivider 2 %%的MIDI通道1 %% MIDI程序1 71 %% MIDI chordprog 71 %% MIDI chordvol 40 %% MIDI bassprog 58 %% MIDI gchord f2c2c3f2c2 %% MIDI drumon %% MIDI鼓d2d2d2dd2d2 43 43 41 37 43 43 |:“G”DZ ^ FG GFA~G2 = FE | EF DF~E2e^ CD的dG | ^ CD EF DFD~E2版| 1“D”^光盤BD~= C2 B“G”BG DG:| 2“D”^光盤BD~= C2 B“G”B2 Z2 ||
  344. X:1 T:Macedonska Sedenka刪節樣本○:馬其頓C:繁體。R:kopanica Z:HTTP://swiss.csail.mit.edu/~jaffer/Music Q:四分之一= 220 M:11/8 L:1/8 K:c%% MIDI gracedivider 2 %%的MIDI通道1 %% MIDI程序1 71 %% MIDI chordprog 71 %% MIDI chordvol 40 %% MIDI bassprog 58 %% MIDI gchord f2c2c3f2c2 %% MIDI drumon %% MIDI鼓d2d2d2dd2d2 43 43 41 37 43 43 |:“G”DZ ^ FG GFA~G2 = FE | EF DF~E2e^ CD的dG | ^ CD EF DFD~E2版| 1“D”^光盤BD~= C2 B“G”BG DG:| 2“D”^光盤BD~= C2 B“G”B2 Z2 ||
  345. The %%MIDI drum line can sound quite monotonous if it is repeated each bar. To circumvent this problem, a new MIDI command
  346. %%MIDI drumbars n
  347. where n is a small number will spread out the drum string over n consecutive bars. By default drumbars is set to 1 maintaining compatibility with existing abc files. Ensure that the drumstring is evenly divisible between the drumbar bars. The drumbars command must precede the drum command. Also the time signature should not change between bars in a drumbar unit. The following example illustrates the use of drumbar command.
  348. X:1 T:分割鼓字符串轉換成兩間酒吧M:2/4 L:1/8 K:摹%% MIDI鼓zdzdzdzd 39 59 50 60 %% MIDI drumon Z4 | Z4 | Z4 | Z4 | %% MIDI drumbars 2 %% MIDI鼓zdzdzdzd 39 59 50 60 Z4 | Z4 | Z4 | Z4 |
  349. X:1 T:分割鼓字符串轉換成兩間酒吧M:2/4 L:1/8 K:摹%% MIDI鼓zdzdzdzd 39 59 50 60 %% MIDI drumon Z4 | Z4 | Z4 | Z4 | %% MIDI drumbars 2 %% MIDI鼓zdzdzdzd 39 59 50 60 Z4 | Z4 | Z4 | Z4 |
  350. Since 2010 you can also have separate drum accompaniment for separate voices. Here is an example:
  351. X:1 T:鼓multivoice擴展M:4/4 L:1/4 K:GV:1 %% MIDI鼓DDDD 45 45 45 45 70 50 60 50 %% MIDI drumon Z4 | Z4 | \ %% MIDI drumoff Z4 | V:2 %% MIDI鼓DDDDD 54 54 54 54 54 70 50 50 60 50 Z4 | \ %% MIDI drumon Z4 | Z4 |
  352. X:1 T:鼓multivoice擴展M:4/4 L:1/4 K: GV:1 %% MIDI鼓DDDD 45 45 45 45 70 50 60 50 %% MIDI drumon Z4 | Z4 | \ %% MIDI drumoff Z4 | V:2 %% MIDI鼓DDDDD 54 54 54 54 54 70 50 50 60 50 Z4 | \ %% MIDI drumon Z4 | Z4 |
  353. The following table shows the MIDI pitch to percussion assignment.
  354. MIDI pitch assignment to drum channel
  355. 35. Acoustic Bass Drum
  356. 36. Bass Drum 1
  357. 37. Side Stick
  358. 38. Acoustic Snare
  359. 39. Hand Clap
  360. 40. Electric Snare
  361. 41. Low Floor Tom
  362. 42. Closed Hi Hat
  363. 43. High Floor Tom
  364. 44. Pedal Hi-Hat
  365. 45. Low Tom
  366. 46. Open Hi-Hat
  367. 47. Low-Mid Tom
  368. 48. Hi Mid Tom
  369. 49. Crash Cymbal 1
  370. 50. High Tom
  371. 51. Ride Cymbal 1
  372. 52. Chinese Cymbal
  373. 53. Ride Bell
  374. 54. Tambourine
  375. 55. Splash Cymbal
  376. 56. Cowbell
  377. 57. Crash Cymbal 2
  378. 58. Vibraslap
  379. 59. Ride Cymbal 2
  380. 60. Hi Bongo
  381. 61. Low Bongo
  382. 62. Mute Hi Conga
  383. 63. Open Hi Conga
  384. 64. Low Conga
  385. 65. High Timbale
  386. 66. Low Timbale
  387. 67. High Agogo
  388. 68. Low Agogo
  389. 69. Cabasa
  390. 70. Maracas
  391. 71. Short Whistle
  392. 72. Long Whistle
  393. 73. Short Guiro
  394. 74. Long Guiro
  395. 75. Claves
  396. 76. Hi Wood Block
  397. 77. Low Wood Block
  398. 78. Mute Cuica
  399. 79. Open Cuica
  400. 80. Mute Triangle
  401. 81. Open Triangle
  402. Percussion Voice
  403. When the drum pattern changes from bar to bar or contains more than one drum hit played at a time (chord), it is preferable to put the percussion in a separate voice. Setting the MIDI channel to 10 indicates that the notes address individual percussion instruments rather than specifying pitches. Here is an example showing how this is done.
  404. X: 1
  405. T: drum voice
  406. M: 4/4
  407. L: 1/8
  408. Q:1/4=120
  409. K:C % 0 sharps
  410. V:1
  411. %%MIDI channel 10
  412. %%MIDI program 0
  413. C,,C,, D,,C,,z2 C,,2| \
  414. C,,C,, D,,C,, C,,D,, C,,2| \
  415. C,,C,, D,,C,,z2 C,,2| \
  416. C,,C,, D,,C,, C,,D,, C,,2| \
  417. Note C,, maps into MIDI pitch 36 which is interpreted as “Bass Drum 1” and note D,, maps into MIDI pitch 38 which is interpreted as “Acoustic Snare” . When the notes are displayed using abcm2ps, the following score is seen.
  418. drumsamp
  419. It is awkward to have all the strings of commas; also, the Bass clef should be replaced with a percussion clef. The “MIDI drummap” command allows the user to remap the MIDI pitches in the drum voice to more convenient ABC notes. For example:
  420. X: 1
  421. T: drum voice - remapped
  422. M: 4/4
  423. L: 1/8
  424. Q:1/4=120
  425. K: C
  426. V:1 clef=perc
  427. %%MIDI channel 10
  428. %%MIDI program 0
  429. %%MIDI drummap G 36
  430. %%MIDI drummap D 38
  431. GG DGz2 G2| \
  432. GG DG GD G2| \
  433. GG DGz2 G2| \
  434. GG DG GD G2| \
  435. “%%MIDI drummap G 36” maps MIDI pitch 36 to G instead of C,,. Likewise, D is mapped to MIDI pitch 38. The score can now appear as follows.
  436. drumsampmap
  437. The following table indicates the default note to percussion assignment.
  438. Abc note assignment to MIDI drum channel
  439. B,,, Acoustic Bass Drum
  440. C,, Bass Drum 1
  441. ^C,, Side Stick
  442. D,, Acoustic Snare
  443. ^D,, Hand Clap
  444. E,, Electric Snare
  445. F,, Low Floor Tom
  446. ^F,, Closed Hi Hat
  447. G,, High Floor Tom
  448. ^G,, Pedal Hi-Hat
  449. A,, Low Tom
  450. ^A,, Open Hi-Hat
  451. B,, Low-Mid Tom
  452. C, Hi Mid Tom
  453. ^C, Crash Cymbal 1
  454. D, High Tom
  455. ^D, Ride Cymbal 1
  456. E, Chinese Cymbal
  457. F, Ride Bell
  458. ^F, Tambourine
  459. G, Splash Cymbal
  460. ^G, Cowbell
  461. A, Crash Cymbal 2
  462. ^A, Vibraslap
  463. B, Ride Cymbal 2
  464. C Hi Bongo
  465. ^C Low Bongo
  466. D Mute Hi Conga
  467. ^D Open Hi Conga
  468. E Low Conga
  469. F High Timbale
  470. ^F Low Timbale
  471. G High Agogo
  472. ^G Low Agogo
  473. A Cabasa
  474. ^A Maracas
  475. B Short Whistle
  476. c Long Whistle
  477. ^c Short Guiro
  478. d Long Guiro
  479. ^d Claves
  480. e Hi Wood Block
  481. f Low Wood Block
  482. ^f Mute Cuica
  483. g Open Cuica
  484. ^g Mute Triangle
  485. a Open Triangle

  486. Beats
  487. Abc2midi automatically applies accents to the beats based on the time signature. The MIDI beat command indicates the amount of accent as well as the general loudness of the voice.
  488. %%MIDI beat abcn
  489. Four parameters are needed to specify the loudness level of the notes in the melody line. The first note in a bar has velocity a . Other "strong" notes have velocity b and all the rest have velocity c . a, b and c must be in the rang 0-127. The parameter n determines which notes are "strong". The beat number of each note is determined on the basis of the time signature and the accumulated note length. If the beat number is a multiple of n, then the note is "strong".
  490. The loudness of the notes indicated above the following notes would be appropriate for a, b, c and n set to 95, 85, 75 and 2 respectively.
  491. beat1
  492. This would sound like this . Without the accents it would sound like this . Some instruments such as the church organ have no emphasized notes. It may be appropriate to have all notes played at an even level by including the following command.
  493. %%MIDI nobeataccents
  494. To revert to emphasizing notes in the usual way (default), add
  495. %%MIDI beataccents
  496. The volume specifiers !ppp! to !fff! are equivalent to the following :
  497. !ppp!  = %%MIDI beat 30 20 10 1
  498. !pp!  = %%MIDI beat 45 35 20 1
  499. !p!  = %%MIDI beat 60 50 35 1
  500. !mp!  = %%MIDI beat 75 65 50 1
  501. !mf!  = %%MIDI beat 90 80 65 1
  502. !f!  = %%MIDI beat 105 95 80 1
  503. !ff!  = %%MIDI beat 120 110 95 1
  504. !fff!  = %%MIDI beat 127 125 110 1
  505. An alternative way of specifying where the strong and weak stresses fall within a bar uses a beatstring.
  506. %%MIDI beatstring <string of f, m and p>
  507. 'f' means velocity a (normally strong), 'm' means velocity b (medium velocity) and 'p' means velocity c (soft velocity). For example, if the time signature is 7/8 with stresses on the first, fourth and sixth notes in the bar, we could use the following:
  508. %%MIDI beatstring fppmpmp
  509. which would be played as follows:
  510. beatstring
  511. By default, the velocities associated with the strong, medium and weak beats are 105, 95 and 85. To change them, issue the %%MIDI beat command or insert the dynamic indicators like !mf! in the bar.
  512. Stress Model
  513. Phil Taylor has introduced a more sophisticated stress algorithm in his BarFly program for the Mac. This model not only changes the loudness of the notes but also alters the duration of the notes. The bar is split into a number of equal segments where each segment is assigned a note loudness (velocity) and an expansion factor. The partitioning of the bar into segments and the segment coefficients depend upon the rhythm designator (eg. jig) and the time signature. Abc2midi provides two different models that apply this stress program. The first model which modifies the articulation of the notes rather than the duration of the beats and it was easiest to implement. The second model, which closely resembles BarFly, actually distorts the time scale in the bar or beat by expanding or contracting the segments. Abc2midi uses built in tables (based on Phil Taylor's models) which store the various configurations. All the configurations preserve the duration of the musical bar.
  514. To hear the affect of the different models, listen to the following MIDI files produced from the double jig, 'Sailor's Wife' .
  515. ‧ plain
  516. ‧ stress model 1
  517. ‧ 應力模型2
  518. Abc2midi默認使用節拍模型也提供了一些支撐,以動態指示符諸如+ MF +(對於mezzoforte)+ PPP +(對於弱音)等要加載酒鬼應力模型相反,它是必要的,包括在運行時參數- BF在執行字符串。 For example,
  519. abc2midi myfile.abc -BF
  520. You may follow -BF by either the numeral 1 or 2 to select the desired stress model. In order, for the BarFly stress model to work, the file must contain a rhythm designator, for example,
  521. R: hornpipe
  522. and an a appropriate time signature matching one of the built in configurations. It does not matter whether there are upper or lower case letters; however, if the rhythm designator is in two words, eg,
  523. R: Double Hornpipe
  524. there should only be one space between the two words. If abc2midi does not recognize the rhythm descriptors, you will get a message similar to this.
  525. **warning** rhythm designator Lesnoto 7/8 is not one of
  526. Hornpipe 4/4 Hornpipe C| Hornpipe 2/4 Hornpipe 9/4 Hornpipe 3/2
  527. Hornpipe 12/8 Double hornpipe 6/2 Reel 4/4 Reel C| Reel 2/4
  528. Slip Jig 9/8 Double Jig 6/8 Single Jig 6/8 Slide 6/8 Jig 6/8
  529. Ragtime 12/8 Strathspey C Fling C Set Dance 4/4 Set Dance C|
  530. Waltz 3/4 Slow March C| Slow March C March C| March C
  531. March 6/8 March 2/4 Polka k1 3/4 Polka 4/4 saucy 3/4
  532. Slip jig 3/4 Tango 2/4
  533. and the usual beat model will be used. Nevertheless, you can still call up your own stress model using a MIDI directive shown below
  534. %%MIDI ptstress myfolder/test.txt

  535. where ptstress points to a file test.txt in the folder called myfolder.
  536. The abcMIDI distribution package comes with several sample stress files in the pt/ folder. By default abc2midi will use stress model 2 but you can select model 1 using the following MIDI directive.
  537. %%MIDI stressmodel 1
  538. In order demonstrate how these stress models affect the note durations, consider the following simple test file.
  539. X: 1
  540. T:test
  541. M:4/4
  542. L:1/4
  543. R: myrhythm
  544. K:G
  545. %%MIDI ptstress abcmidi/pt/test.txt
  546. |cBAG|c/B/A/B/AG|
  547. In music notation, this file would appear as follows. 壓力樣本
  548. The stress descriptor file test.txt looks like:
  549. 4
  550. 120 1.4
  551. 60 0.6
  552. 120 1.4
  553. 60 0.6
  554. 第一行表示在酒吧的段數。每個以下行指定的速度和膨脹係數。速度是一個MIDI術語這是關係到音符的響度。(較昂貴的MIDI鍵盤下面有各個按鍵,將返回的關鍵是如何重創速度探測器)的膨脹係數指定多少信息的一個特定段內持續擴大(或縮小)。總的所有擴展係數(這裡4.0)的必須等於段的數量。否則桿的持續時間將不被保留。在下一個示意圖,表明應用任何應力模型前,MIDI文件的鋼琴卷表示。垂直線分離成音樂四分音符間隔也對應於段在這種情況下,應力模型1不能展開任何註釋,所以所有的膨脹因子是歸一化,使得最大為1.0。在一個段中的音符通過增加鈔票間間隔,基本上控制音符的關節運動縮短。這將在下面說明。如果記重疊兩段,歸一擴展係數被平均在兩個段由所述音符的每個段中。該部分加權應力模型2,膨脹或由指定的膨脹係數收縮的音符。實際上,這對應於擴展或收縮的段。該算法映射音符的開始和結束的時間,進扭曲空間。


  555. 模式1

  556. 模式2
  557. If you are calling up the stress model manually using the %%MIDI ptstress directive, it is unnecessary to include the rhythm designator R: in the abc tune. Neverthesless, if you wish to use model 2, the -BF option must be included in the runtime parameters of abc2midi.
  558. The %%MIDI ptstress directive allows you to specify the stress parameters directly without going through an intermediate file. For example,
  559. %%MIDI ptstress 3 100 1.4 80 1.0 60 0.6
  560. indicates there are 3 segments, the first segment has loudness 100 and expansion factor 1.4, the second segment has loudness 80 and expansion factor 1.0 and etc. The program first tries to parse the directive as numbers; if it is not successful it assumes the string is a file name.
  561. There are 32 default stress models built in the code of abc2midi so that it is unnecessary to distribute an external file with the abc2midi executable. You can customize these default models by causing abc2midi to read a specific file using the -CSM <filename.txt> option (see runtime options below). The given file must comply with the following format exactly as illustrated below.

  562. March
  563. 6/8
  564. 6 3
  565. 110 1.2
  566. 80 0.9
  567. 80 0.9

  568. Lesnoto
  569. 7/8
  570. 7 7
  571. 110 1.3
  572. 90 1.0
  573. 80 0.7
  574. 100 1.2
  575. 90 0.8
  576. 100 1.2
  577. 90 0.8

  578. 每個型號都帶有一個空行結束。第一行是節奏指示符。這之後是在時間簽名中的下一行。在第三行的兩個數字指定變量nseg和NVAL。例如,對於三月節奏指示符,nseg是6和NVAL是3.酒鬼應力模型段酒吧成nseg段。該NVAL以下行指定每個段的特徵。如果NVAL小於nseg,在NVAL行中的值被循環,直到所有段被指定。響度(MIDI速度)和持續時間被指定為每個段。
  579. There are two models in the above example. The first model, March 6/8 already exists in abc2midi. The characteristic of this model is modified with the information in this file. The second model, Lesnoto 7/8 is new. abc2midi appends this model to the given set. Up to 16 new models may be introduced.
  580. Sample files for customizing the stress models are provided with the abcMIDI sources in the pt/ subdirectory. The file customstress.txt is similar to the above. The file default_stress.txt is a copy of the built in models. If you modify this file and load it into abc2midi using the -CSM option, you can adapt the characteristics of the stress models to a particular tempo or instrument.
  581. Tempo
  582. The tempo is usually indicated with the Q: field command, eg. Q:1/4=180 which is interpreted as 180 quarter beats per minute. In compliance with the abc standard 2.0, you may also indicate the tempo using directives such as "lento", "allegro", "vivace" etc.
  583. The following table based on [url]http://www.music.vt.edu/musicdictionary/appendix/tempo/tempo1.html[/url] was used to translate the indications:
  584. Larghissimo 1/4=40 Moderato 1/4=104
  585. Adagissimo 1/4=44 Allegretto 1/4=112
  586. Lentissimo 1/4=48 Allegro 1/4=120
  587. Largo 1/4=56 Vivace 1/4=168
  588. Adagio 1/4=59 Vivo 1/4=180
  589. Lento 1/4=62 Presto 1/4=192
  590. Larghetto 1/4=66 Allegrissimo 1/4=208
  591. Adagietto 1/4=76 Vivacissimo 1/4=220
  592. Andante 1/4=88 Prestissimo 1/4=240
  593. Andantino 1/4=96
  594. Note: case is ignored (eg. ALLEGRO Allegro or allegro are treated the same). The directive must be enclosed in double quotes.
  595. Reference: [url]http://abc.sourceforge.net/standard/abc2-draft.html#Q:%20-%20tempo[/url]
  596. Example:
  597. X:1
  598. T:tempo
  599. M:2/4
  600. L:1/4
  601. K:G
  602. Q: "Adagio"
  603. CD|EF|
  604. Q: "Adagio" 1/4=40
  605. GA|Bc|
  606. (In the second tempo command, the 1/4=40 overrides the default 1/4=59.)
  607. Dynamics
  608. %%MIDI beatmod n
  609. increments by n (or decrements if n is negative) the velocities a, b and c described above. It is also used in implementing crescendo and diminuendo.
  610. The !crescendo(! and !crescendo)! delineate the start and end of a crescendo. Alternatively, you can use !<(! and !>)!. Abc2midi does not implement a gradual loudness increase, but instead increases the loudness at the start and end of the crescendo by a fixed amount. (See %%MIDI beatmod and %%MIDI deltaloudness for more information.)
  611. %%MIDI deltaloudness n
  612. where n is a small positive number. By default the crescendo and dimuendo instructions modify the beat variables a, b, and c by 15 velocity units. This instruction allows you to change this default. Here is an example:
  613. X:1
  614. T: crescendo
  615. M: 4/4
  616. L: 1/4
  617. K: C
  618. %%MIDI deltaloudness 30
  619. !mp!CDEF|!crescendo(!GABc!crescendo)!|cBAG|FEDC|
  620. 這聽起來像這樣。像往常一樣,音符力度放在上面手工票據。從我自己的經驗,動態的水平都相當依賴於MIDI播放器使用的音色庫,讓東西在一個系統上聽起來合理聽起來可能在另一個系統有點做作。
  621. 漸強
  622. The W: field (upper case W) can be used for lyrics to be typeset separately if the abc is printed out. The w: field (lower case w) in the body of a tune supplies a line of lyrics to be matched syllable by syllable to the last line of notes. These are usually printed below the notes if the abc is typeset. abc2midi uses these to generate karaoke MIDI files. Since 2010 a karaoke MIDI file can contain more than one set of lyrics in separate voices. Lyrics by default are embedded in the same MIDI track as the notes. If the runtime parameter -STFW (separate tracks for words) is included when starting abc2midi, then the lyrics will be placed in separate adjoining MIDI tracks. When the karaoke MIDI file is played using an appropriate player program, the lyrics appear on the screen with the current syllable highlighted. Within the lyrics, the following symbols may be used :
  623. <space> break between words
  624. - break between syllables within a word
  625. | advance to next bar
  626. _ indicates last syllable is to be held for another note
  627. * indicates a one note rest for the singer.
  628. ~ appears as a space but connects syllables each side into one.
  629. \- appears as - in the output
  630. \ continuation character.  Next w: field is part of the same line.

  631. A rest is not matched by any lyrics. A tied note eg d2-d2 is treated as 2 notes (or however many parts it is written as), despite the fact that it only plays as a single note.
  632. abc2midi ignores space characters if they occur either (a) between the end of a word/syllable and a hyphen or underscore or (b) between a hyphen or underscore and the beginning of a word/syllable. However, some software incorrectly treats a hyphen as a separate word if there is a space between it and the previous syllable, so, for example, you should write go-ing and not go - ing to ensure that your abc is portable between programs.
  633. Here are some examples taken from [url]http://abc.sourceforge.net/standard/abc2-draft.html[/url]
  634. w: syll-a-ble is aligned with three notes
  635. w: syll-a--ble is aligned with four notes
  636. w: syll-a -ble (equivalent to the previous line)
  637. w: time__ is aligned with three notes
  638. w: of~the~day is treated as one syllable (ie aligned with one note)
  639.                   but appears as three separate words
  640. The following example illustrates most of these :
  641. gf|e2dc B2A2|B2G2 E2D2|.G2.G2 GABc|d4 B2
  642. w: Sa-ys my au-l' wan to your aul' wan\
  643. w: Will~ye come to the Wa-x-ies dar-gle?

  644. Note that the continuation character is used in a rather strange manner. One w: field and all continuations will match one line of music, whether or not the line of music ends with a continuation character. You can think of the \ in a music line dividing that line into sections and \ in aw: field further dividing these section into sub-sections.
  645. It is possible for a music line to be followed by several w: fields. This can be used together with the part notation to create verses. The first w: field is used the first time that part is played, then the second and so on. If the tune uses repeats, these must be placed at the end of a line of music in order to make sure that the start of aw: field matches up with the repeat.
  646. The following is an example of lyrics appearing in separate voices.
  647. X:1
  648. T:Multivoiced lyrics
  649. M:2/4
  650. L:1/16
  651. K:C
  652. V:1
  653. C4 C4 | E4 G4 | c8 |]
  654. w: 1 2 3 4 5
  655. V:2
  656. C4 E4 | C4 B,4 | C8 |]
  657. w: 11 12 13 14 15
  658. Transposition
  659. Transposition allows you to typeset the music in one key and play it in another key. This is common with many musical instruments. For example, sheet music for the Bb clarinet written in the key C will be played one tone lower. Abc2midi provides various ways of applying transposition to a single voice or all the voices in the tune and these methods have their peculiar idiosyncracies. To illustrate, see the following example.
  660. X:1
  661. T: transpose
  662. M: 4/4
  663. L: 1/4
  664. K: CV: 1
  665. cdef|gabc'|
  666. V: 2 transpose=2
  667. %%MIDI program 70
  668. CDEF|GABc|
  669. V:3
  670. C,D,E,F|G,A,B,C|
  671. all the notes in voice 2 will be transposed up one tone. The notes in the other voices are unaffected. On the other hand, in the next example
  672. X:1
  673. T: transpose
  674. M: 4/4
  675. L: 1/4
  676. K: CV: 1
  677. cdef|gabc'|
  678. V: 2
  679. %%MIDI program 70
  680. %%MIDI transpose 2
  681. CDEF|GABc|
  682. V:3
  683. C,D,E,F|G,A,B,C|
  684. The notes in both voices 2 and 3 are transposed up one tone. To make life more complicated, transposition can also be indicated in the K: field command -- for example K:C transpose=2. (The behaviour is similar to the %%MIDI transpose command.) It is recommended that users experiment on simple abc files to become familiar with the way transpose command works. Though this behaviour is not logical, it is too late to change it since there are already existing abc databases assuming this implementation.
  685. Besides the MIDI transpose command, there is also the MIDI rtranspose command described as follows.
  686. %%MIDI rtranspose n
  687. performs relative transpose by the specified number of semitones. ie %%MIDI transpose a followed by %%MIDI rtranspose b results in a transposition of a+b. %%MIDI transpose b will result in a transposition of b semitones, regardless of any previous transposition.
  688. Transposition by an entire octave is indicated in the K: or V: field command. For example
  689. K:G clef=soprano octave=-1 transpose=-1
  690. abcm2ps recognizes the clef indication and displays the notes correctly; however, in order for abc2midi to convert the music correctly it is also necessary to add octave=-1 and transpose=-1. Recognized clefs are treble, bass, baritone, tenor, alto, mezzo and soprano. There are also variants of these clefs; treble-8, tenor-8, treble+8 covering ranges that are an octave below and an octave above the normal treble clef. Other variants are not recognized at this time. No transposition is assumed for the bass clef since many abc files enter the notes with all the commas.
  691. The octave specifier is a convenience to make entering music easier. It allows the user to avoid repeatedly entering commas or apostrophes when entering a sequence of low or high notes. Both yaps and abc2midi will transpose the notes by the specified number of octaves during the parsing stage. eg the passage B,,, C,, D,, E,, F,, could be written more compactly as
  692.    I:octave=-2
  693.    B, CDEF
  694.    I:octave=0
  695. Articulation
  696. Articulation:
  697. %%MIDI trim x/y
  698. where x and y are two numbers. This command controls the articulation of notes and chords by placing silent gaps between the notes. The length of these gaps is determined by x/y and the unit length specified by the L: command. These gaps are produced by shortening the notes by the same amount. If the note is already shorter than the specified gap, then the gap is set to half the length of the note. The fraction x/y indicates a note duration in the same manner as specified in the abc file. The actual duration is based on the unit length specified by the L: field command. It is recommended that x/y be a fraction close to zero. The denominator, y does not need to be a power of 2. Trimming is disabled inside slurs as indicated by parentheses.
  699. You can turn off all note trimming by setting x to 0, eg 0/1. By default, note trimming is turned off at the beginning of a tune or voice command. Here is an example:
  700. X: 1
  701. T:Dennis Murphy's -- articulated
  702. % Nottingham Music Database
  703. S:via PR
  704. M:4/4
  705. L:1/4
  706. K:D
  707. Q:1/4=180
  708. %%MIDI program 71
  709. d/2e/2|
  710. %%MIDI trim 0/4
  711. f/2g/2f/2e/2 d3/2B/2|AD FA|GE e3/2d/2|cB c/2B/2A|
  712. %%MIDI trim 1/4
  713. f/2g/2f/2e/2 d3/2B/2|AD FA|GE e3/2f/2|ed d2|
  714. 這聽起來像這樣。
  715. Arpeggiation
  716. With version 1.54 Dec 4 2004 of abc2midi, notes in chords (eg [FAc]) are not played in the same instant but offset and shortened by 10 MIDI time units. Thus the first note in the chord (eg F) is played for the full indicated time, the second note (eg A) starts 10 MIDI units later and is shortened by the same amount and the third note starts another 10 MIDI units later and is shortened by another 10 units. This introduces an "expressivo" option and avoids the heavy attack. (This does not apply to gchords or multivoiced chords.) The amount of the delay and shortening may be configured by the MIDI command
  717. %%MIDI chordattack n
  718. where n is a small number. If n is zero, then abc2midi should behave as in earlier versions. The delay n is in MIDI time units where there are 480 units in a quarter note beat. The program may not run correctly if n is too large and there are short chords.
  719. %%MIDI randomchordattack n
  720. where n is a small number. This is similar to above, except the delay of each note in the chord varies randomly between 0 and n-1. Therefore each chord is played differently. Here is an example.
  721. X:1 T:arpeggiate M:2/4 L:1/4 Q:1/4 = 60K的:C %% MIDI chordattack 0 CEGB] [GBDF] | \ %% MIDI chordattack 20 CEGB] [GBDF] |
  722. X:1 T:arpeggiate M:2/4 L:1/4 Q:1/4 = 60K的:C %% MIDI chordattack 0 CEGB] [GBDF] | \ %% MIDI chordattack 20 CEGB] [GBDF ] |
  723. 這聽起來像這樣。
  724. Grace Notes
  725. %%MIDI grace a/b
  726. sets the fraction of the next note that grace notes will take up. a must be between 1 and b-1. The grace notes may not sound natural in this approach, since the length of the individual grace notes varies with the complexity of the grace and the length of the following note. Here is a sample abc file.


  727. X:1
  728. T: grace fraction
  729. M: 2/4
  730. L: 1/8
  731. K: C
  732. %%MIDI grace 1/4
  733. {E}D2 {GFE}D2| {DCDC}C4|
  734. %%MIDI grace 1/2
  735. {E}D2 {GFE}D2| {DCDC}C4|
  736. %%MIDI grace 3/4
  737. {E}D2 {GFE}D2| {DCDC}C4|
  738. 這聽起來像這樣。
  739. A different approach (which is now the default) assumes that the grace notes always have fixed duration specified by a fraction of the unit length. To use the other approach you would specify
  740. %%MIDI gracedivider b
  741. where b specifies how many parts to divide the unit length specified by the L: field command. For example, if b = 4 and L: = 1/8, then every grace note would be 1/(8*4) or a 32nd note. Time would be stolen from the note to which the grace note is applied. If that note is not long enough to handle the grace sequence, then the grace notes would be assigned 0 duration. Here is an example.
  742. X:1 T:恩典分M:2/4 L:1/8 K:c%% MIDI gracedivider {4}e{D2} GFE D2 | {} DCDC C4 | %% MIDI gracedivider 2 {E} {D2 GFE } D2 | {} DCDC C4 |
  743. X:1 T:恩典分M:2/4 L:1/8 K:c%% MIDI gracedivider {4}e{D2} GFE D2 | {} DCDC C4 | %% MIDI gracedivider 2 {E} {D2} GFE D2 | {} DCDC C4 |
  744. 這聽起來好一點。
  745. Note that the MIDI command has no effect on grace notes introduced using the M, R, T, !trill!, !mordent! indications.
  746. 在某些情況 ??下,你可能想abc2midi忽略所有的裝飾音標記。要做到這一點,添加“-NGRA”(無裝飾音)的運行參數列表。
  747. Bent Notes
  748. A bent note is a musical note which is varied in pitch. Typically a note may be bent on a continuous pitch instrument such as a trombone or string instrument. It is also heard on a penny whistle.
  749. The !bend! instruction modulates the pitch of the following note by applying a sequence of MIDI pitchwheel commands while the note is still playing. Abc2midi splits the note into 8 segments and the pitch is incremented in small units (fraction of a semitone) for each segment. The MIDI pitchwheel affects all notes that are playing in the same channel, so it does not work well with chords unless the individual notes in the accord are assigned individual channels (ie in separate voices). For most General Midi devices, the pitchwheel provides a range of about plus or minus 2 semitones. The pitchwheel value of 8192 corresponds to a zero pitch change while 0 and 16383 are the minimum (negative pitch shift) and maximum values.
  750. You can adjust the characteristics of the bend using the MIDI command bendvelocity
  751. %%MIDI bendvelocity n1 n2
  752. where n1 and n2 are two integers specifying the incremental change in pitch and the rate of change of the incremental pitch (in other words the bend velocity and bend acceleration). The units of n1 and n2 correspond to the units of the MIDI pitchwheel. By default, if you do not specify them, they assume the values of 100 and 300. Thus for each consecutive segment, the bend increment (bend velocity) increases by 300 so its values are 100, 400, 700, 1000 and etc. Therefore the pitchwheel values are 8192+100, 8192+400, 8192+700, and etc. for each consecutive segment.
  753. Here is a sample abc file.
  754. X:1
  755. T: bending
  756. M: 2/4
  757. L: 1/8
  758. K: G
  759. %%MIDI program 26 Electric Guitar
  760. %%MIDI bendvelocity 100 300
  761. D4 |!bend!D4|\
  762. %%MIDI bendvelocity 100 -300
  763. !bend!D4|\
  764. %%MIDI bendvelocity -1000 500
  765. !bend!D4|
  766. 相應的MIDI文件聽起來像這樣。
  767. The !bend! command now works with microtoned notes.
  768. There is also a more general command
  769. %%MIDI bendstring n1 n2 n3 ...
  770. for specifying the pitch trajectory for bent notes. The integers n1, n2, etc. specify the pitchwheel increments for each of the n time periods where n is the number of integers provided and does not exceed 16. For example
  771. %%MIDI bendstring 100 100 -100 -100
  772. will divide the note length into four segments. The pitchwheel values will be 8192+100, 8192+200, 8192+100, and 8192 for the four segments (assuming that the note was not effected by a microtone).
  773. Portamento
  774. Portamento is a pitch to pitch glide that can be produced by MIDI synthesizers. The quality of the output depends on the synthesizer, the selected musical instrument, and the interval between notes. Here is an example:
  775. X:1
  776. T: portamento
  777. M: 4/4
  778. L: 1/4
  779. K: C
  780. %%MIDI program 2
  781. CDEF|GABc|
  782. %%MIDI portamento 60
  783. CDEF|GABc|
  784. CEGB|dfac'|
  785. 這聽起來像這樣。
  786. To apply portamento to either the bass or chord accompaniment, add one or both of the commands:
  787. %%MIDI portamento bass n
  788. %%MIDI portamento chord n
  789. where n is a number between 0 and 63.
  790. Pedal
  791. The instructions +ped+ and +ped-end+ simulate the sustain pedal on the piano. In the following example,
  792. X:1 T:PED在pianomusic M:CL:1/8 K:c高音K:譜號=低音Q:四分之一= 60 %% MIDI程序70 + PED + G,A,B,C + PED-結束+ DE |
  793. X:1 T:PED在pianomusic M:CL:1/8 K:c高音K:譜號=低音Q:四分之一= 60 %% MIDI程序70 + PED + G,A,B,C + PED高端+ DE |
  794. the notes, G,A,B,C are sustained. Though the bassoon does not have a sustain pedal, the scale is played on that instrument to make the effect more obvious.
  795. MIDI Control
  796. %%MIDI control [bass/chord] n1 n2
  797. This generates a MIDI control event. If the word "control" is followed by "bass" or "chord", the event will be applied to the bass or chord channel, otherwise it will be applied to the current channel. n1 and n2 are numbers in the range 0-127. Generally, n1 selects a control parameter and n2 is the value to which it is set. A couple of examples :
  798. %%MIDI control 7 50
  799. will set the main volume of the channel to 50
  800. %%MIDI control 10 0
  801. 將油鍋參數(左/右平衡)設定為0。有哪些列nummerous MIDI控制器號碼此處。一些這些控制都由%%的MIDI命令實現,例如“%%的MIDI滑音”。
  802. Microtones
  803. Microtones are indicated by following a ^ or _ with a fraction. ^/C is played as one quarter tone (ie half a semitone) above C. _/C is played as one quarter tone (ie half a semitone) below C. ^^/4F is played as 1/4 of a semitone above F#; however I do not recommend using this form since it may not be supported or available in a future version of abc2midi. The microtone fraction may be a value between -2 and +2. So ^3/2F would alter F to F# plus a half a semitone. Another way to get to a half a semitone above F# is to go down a half semitone from Gb. One should consider a microtone specification to be just another type of accidental. As of January 20 2014, microtones now propagate across a bar just like accidentals. Thus for the example:
  804. _1/4B cd B|
  805. The second B is also played as _1/4B.
  806. In general, a microtone offset is indicated by a fraction using the same convention as note length (described below). Abcmidi uses the same microtone syntax as abcm2ps. (See features.txt in the abcm2ps distribution.)
  807. Note that abcm2ps only handles a limited set of microtones. If you include a 1/4 microtone in your tune, abcm2ps will produce a PostScript file which ghostscript cannot display and your will get a blank page. The Out.ps contains a call to a function which is undefined. If you wish to display a 1/4 microtone, you will need to define the function to draw the glyph. Abcm2ps provides several ways of passing the definition.
  808. Microtones are implemented using the MIDI pitchwheel command. Since the pitchwheel affects all notes played on a specific channel, a microtone applied to any note in a chord specified by rectangular brackets (eg [ACE]) will apply to all the notes in the chord. Microtone accidentals override any sharpening or flattening induced by key signatures. To illustrate
  809. K: G
  810. ^/FF =FF|
  811. does the following. Even though the key of G major causes F to be sharp, the first note is F natural raised by half a semitone. This affects the next note by making it also played as ^/F. The third and fourth notes are played as a F natural.
  812. In accordance with the General MIDI recommendations, the pitch range of the pitchwheel is set to plus or minus two semitones. Therefore abc2midi cannot go beyond this range.
  813. Microtones are implemented using the MIDI pitchbend control command. The command affects all notes in a specific MIDI channel. When several notes are played at the same time (chords), it is necessary to place the individual notes of the chord in separate MIDI channels. This introduces another level of complexity. The additional channels for playing chords must be pre-allocated using the following MIDI command.
  814. %%MIDI makechordchannels n
  815. where n is the number of additional channels needed. More details are provided below.
  816. Tuning
  817. Some of the older musical instruments such as the German accordian are tuned to A = 445 Hz rather than 440 Hz. Abc2midi can create a MIDI file tuned to any A withen a range of plus or minus a semitone. To use this option, include the -TT run time option. For example,
  818. abc2midi mytune.abc -TT 445.0
  819. Repeats
  820. The treatment of repeats has been a source of a lot of grief to some users. The problem is that common music notation permits omitting the left repeat symbol (|:) at the beginning of the score; however, abc2midi is not consistent in assuming this missing left repeat. Frequently abc2midi gives a warning or does not repeat the desired section at all. Here is part of a reel that has been edited for purposes of demonstration.
  821. X:5 T:梭磨卷%諾丁漢音樂數據庫S:米克泥煤M:4/4 L:1/4 K:DA / 2 |“D”D / 2C / 2D / 2E / 2次足總杯|“G”要“A”CA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“EM”是“A”AA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“G”是“A”CA |“G”B / 2C / 2D / 2B / 2“A”C / 2D / 2E / 2C / 2 | \“D”D2 DA:| %...
  822. X:5 T:梭磨卷%諾丁漢音樂數據庫S:米克泥煤M:4/4 L:1/4 K:DA / 2 |“D”D / 2C / 2D / 2E / 2次足總杯| “G”是“A”CA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“EM”是“A”AA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“G”是“A”CA |“G”B / 2C / 2D / 2B / 2“A”C / 2D / 2E / 2C / 2 | \“D” D2 DA:|%...
  823. When we run abc2midi, the following output appears.
  824. abc2midi Bobbin_Mill_Reel.abc
  825. Warning in line 11 : Assuming repeat
  826. writing MIDI file Bobbin_Mill_Reel5.mid
  827. Warning in line 8 : Bar 0 has 1/2 units instead of 4 in repeat
  828. Abc2midi假定左重複在樂曲的開頭。當它處理的第一條“A / 2 |”重複時,它會發出一個警告,它只有1/2拍,而不是4次。當您播放MIDI文件Bobbin_Mill_Reel5.mid有一個結巴的重複的開始。左邊重複本來應該放在anacrusis後,如下圖所示。
  829. X:5 T:梭磨卷%諾丁漢音樂數據庫S:米克泥煤M:4/4 L:1/4 K:DA / 2 |:“D”D / 2C / 2D / 2E / 2次足總杯|“G”是“A”CA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“EM”是“A”AA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“G”是“A”CA |“G”B / 2C / 2D / 2B / 2“A”C / 2D / 2E / 2C / 2 | \“D”D2 DA: |%...
  830. X:5 T:梭磨卷%諾丁漢音樂數據庫S:米克泥煤M:4/4 L:1/4 K:DA / 2 |:“D”D / 2C / 2D / 2E / 2為fA |“G”是“A”CA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“EM”是“A”AA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“G”是“A”CA |“G”B / 2C / 2D / 2B / 2“A”C / 2D / 2E / 2C / 2 | \“ D“D2 DA:|%...
  831. Now abc2midi runs correctly without warning. Abc2midi assumes a repeat only in special situations. For example, if the body was included in a part, as shown below
  832. X:7 T:梭磨卷%諾丁漢音樂數據庫S:米克泥煤M:4/4 L:1/4 P:AK:DP:AA / 2 |“D”D / 2C / 2D / 2E / 2次足總杯| “G”是“A”CA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“EM”是“A”AA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“G”是“A”CA |“G”B / 2C / 2D / 2B / 2“A”C / 2D / 2E / 2C / 2 | \“D” D2 DA:|
  833. X:7 T:梭磨卷%諾丁漢音樂數據庫S:米克泥煤M:4/4 L:1/4 P:AK:DP:AA / 2 |“D”D / 2C / 2D / 2E / 2次足總杯|“G”是“A”CA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“EM”是“A”AA |“D”D / 2C / 2D / 2E / 2 F / 2E / 2D / 2C / 2 |“G”是“A”CA |“G”B / 2C / 2D / 2B / 2“A”C / 2D / 2E / 2C / 2 | \“D”D2 DA:|
  834. Then abc2midi will not assume a left repeat; the following message appears and the section is not repeated.
  835. abc2midi Bobbin_Mill_Reel.abc寫MIDI文件Bobbin_Mill_Reel6.mid錯誤在第12行:發現意外:|在第12行錯誤:發現意外:|在第12行錯誤:發現意外:|
  836. abc2midi Bobbin_Mill_Reel.abc寫MIDI文件Bobbin_Mill_Reel6.mid錯誤的行12:發現意外:|在第12行錯誤:發現意外:|在第12行錯誤:發現意外:|
  837. The problem in the code is difficult to fix, so it is safest to always include a left repeat even though it is considered redundant according to music conventions.
  838. One workaround is to include the command +invisible+ which will hide the |: when abcm2ps converts the tune to common music notation. For example:
  839. X:3
  840. T:Ein Tuger Welscher Tanz
  841. C:Hans Neusiedler
  842. M:C|
  843. L:1/8
  844. K:C
  845. %%staves [(1 2)]
  846. V: 1 clef=treble-8 stem = up
  847. V: 2 clef=treble-8 stem = down
  848. [V:1] +invisible+ |: z2 c2 B4|c4 d4 |d2 c2 =B2 c2-| ccAB c4 :|
  849. [V:2] +invisible+ |: x2 [CE]2 [G,D]4 | x4 [V:2 stem=up] FEFG [V:2 stem=down] &[CE]4 _B,4 |[_B,F]2 [CE]2 [G,D]2 [A,E]2| [G,D]4 [CG]4 :|
  850. Abc2midi will produce a warning that it does not know what +invisible+ means but that is not a problem.
  851. You can also suppress the [1 in the score by putting %%repbra 0 after the definitions of V:2 and V:3.
  852. Miscellaneous
  853. ratio
  854. %%MIDI ratio nm
  855. This sets the ratio of note lengths in broken rhythm (eg a>b). The default behaviour is for note a to sound for twice as long as note b. This can be achieved with
  856. %%MIDI ratio 2 1
  857. and hornpipes are commonly played with approximately this ratio. However, for other musical styles a different ratio may be appropriate. If you are using abc2midi to export music to another program for printing, then you may wish to use a ratio of 3:1, which is how hornpipes are usually notated. This can be achieved with
  858. %%MIDI ratio 3 1
  859. Can you hear the change in ratio for the following abc file?
  860. X:1 T:平衡的秸稈R:夾具Z:由約翰·錢伯斯1997 <[email]jc@eddie.mit.edu[/email]> [url]http://eddie.mit.edu/~jc/music/abc/[/url] M:6/8 L: 1/8 K:GD \ |“G”G2B B> AB |“C”C2A A> CE |“D7”D>版CAC |“G”G2B B2D \ %% MIDI比3 1 |“G”G2B B > AB |“C”C2A A> CE |“D7”D>版CEF |“G”G6 |%其餘截斷
  861. X:1 T:平衡的秸稈R:夾具Z:1997年由約翰·錢伯斯<[email]jc@eddie.mit[/email]埃杜> [url]http://eddie.mit.edu/~jc/music/abc/[/url] M:6/8 L:1/8 K:GD \ |“G”G2B B> AB |“C”C2A A> CE |“D7”D>版CAC |“G”G2B B2D \ %% MIDI比3 1 |“G”G2B B> AB |“C”C2A A> CE |“D7”D>版CEF |“G”G6 |%其餘截斷
  862. 要收聽點擊這裡。
  863. If the tune specifies a hornpipe rhythm, (eg. R:hornpipe) and the meter is 4/4, then abc2midi will automatically convert sequences of eighth notes to broken rhythm. For 2/4 time signature, the conversion applies to sixteenth note sequences. (These conversions do not apply when one of the stress models is selected.)
  864. barlines
  865. %%MIDI nobarlines
  866. This is a somewhat obscure option to support early music without barlines. Normally, an accidental applied to one note eg ^c will apply to every note at the same point in the scale until the end of the bar (so C,, C, C cc' would all be sharpened). This option turns off this behaviour, so that an accidental applies only to the next note. It should be used in the header of any tune requiring this behaviour.
  867. %%MIDI barlines
  868. 這將關閉的效果“%%的MIDI nobarlines”在一個曲調的中間。這是假設在每個調整開始時的默認行為。
  869. accidentals
  870. %%propagate-accidentals not
  871. as described in [url]http://abc.sourceforge.net/standard/abc2-draft.html[/url] directive 11.3 This command suppresses propagation of accidentals across a bar. The commands
  872. %%propagate-accidentals pitch
  873. or
  874. %%propagate-accidentals octave
  875. restores propagation. Presently only octave method is used. For example:
  876. M:2/4 L:1/8 K:%%的Eb傳播-記號不是A = A A2 |
  877. M:2/4 L:1/8 K:%%的Eb傳播-記號不是A = A A2 |
  878. A2 is flattened since the natural sign does not propagate.
  879. temperament
  880. %%MIDI temperamentlinear octave_cents fifth_cents
  881. This command allows you to change the temperament of the scale. Octave_cents specifies the size of an octave in cents of a semitone or 1/1200 of an octave. Fifth_cents specifies in the size of a fifth (normally 700 cents). For example:
  882. %%MIDI temperament 1200.5 698.0
  883. will produce a slightly stretched scale with narrowed fifths.
  884. More details on linear tempered scales can be found on the site [url]http://www.xs4all.nl/~huygensf/scala/[/url] The pitch of each note is modified using a MIDI pitchbend command to comply with the scale. In order to handle chords, each note of the chord must be played on a different MIDI channel.
  885. The normal musical scale has a temperament of
  886. %%MIDI temperamentlinear 1200 700
  887. but to avoid unnecessary pitchbends you should restore to the normal temperament using the command
  888. %%MIDI termperamentnormal
  889. Here is an example provided by Hudson Lacerda that you can experiment with.
  890. X:1 T:風雅(III奏鳴曲BWV 1005)T:摘錄C:JS巴赫M:c| L:1/4 %%%MIDI temperamentlinear 120 70 %% MIDI temperamentlinear 240 140 %% MIDI temperamentlinear 600%350%MIDI temperamentlinear 701.955 386.31 %% MIDI temperamentlinear 1800 1050%%第五尺寸對於一些氣質:%% MIDI temperamentlinear 1200.0 705.882353%,17%EDO%MIDI temperamentlinear 1200.0 694.736842%,19%EDO%MIDI temperamentlinear 1200.0 709.090909%,22%EDO MIDI% temperamentlinear 1200.0 696.774194%,31%EDO%MIDI temperamentlinear 1200.0 702.439024%,41%EDO%MIDI temperamentlinear 1200.0 697.674419%,43%EDO%MIDI temperamentlinear 1200.0 701.886792%,53%EDO%MIDI temperamentlinear 1200.0 698.0%,第五= 698仙%% MIDI temperamentlinear 1200.0 696.57843%四分之一逗號中間音調%% MIDI temperamentlinear 1200.0 701.955001%畢達哥拉斯%% MIDI temperamentnormal%12 EDO K:C%V:1高音%% MIDI程序110%小提琴G2 | EF / G / AG | F2 _ba | GA / G / FG | A2 X2 | V:2的合併%% MIDI程序110%小提琴B2 | C2 ^ C2與E2 E2 | D2 D2和X2 G2 | _e2 Z = E&G2 X G | FEDC | V :3合併%% MIDI程序110%小提琴ED | C2 A,2 | D2 G,2 | C2 z對於C | F2 ^ F2 |%V:1×2 G2 | _a2 = A2 | _b2 Z = B | c'_bag | ^ FE / D / G2 | V:2 B C / D / ED | C2 FE |德/日/ CD | e2c2&G2 X2 | C2 _BA / G / | V:3 G2 C2 | F2 D2 | G2 Z2 | C2 _E2 | D2 Z2 |%V:1 GA / _b / AG | f2f2 | E2E2 | ^ f2x2 | X2 G2 | g2fe / D / | V:2 ^ C2?^ C&X2 X E | D = c_BA | = B2 A2 &^ G ^ F / E / E2 | \ AB / C / BA | G = FB2 | A2A2&E2x2 | V:3 E2 X A,| D2D2 | D2 CB,/ A,/ | ^ D2 ZD | EXE = D | ^ CB,/ A,/ D2 |%V:1 ^ G2 Z = G | GF / E / F2 | FE / D / EF / E / | DE / F / GF | E2 V:2 B2?_B | A2 A = B / = C /&E2x2 | d2c2與G2G2 | x2B2和X2 D2 | G X V:3 DE / F / ED | ^ C2D2 | B,2 = C2 | FE G,2 | C2
  891. X:1 T:風雅(III奏鳴曲BWV 1005)T:摘錄C:JS巴赫M:c| L:1/4 %%%MIDI temperamentlinear 120 70 %% MIDI temperamentlinear 240 140 %% MIDI temperamentlinear 600%350%MIDI temperamentlinear 701.955 386.31%% MIDI temperamentlinear 1800 1050%%第五尺寸對於一些氣質:%% MIDI temperamentlinear 1200.0 705.882353%,17%EDO%MIDI temperamentlinear 1200.0 694.736842%,19%EDO%MIDI temperamentlinear 1200.0 709.090909%,22%EDO%MIDI temperamentlinear 1200.0 696.774194 31% -EDO %% MIDI temperamentlinear 1200.0 702.439024%,41%EDO%MIDI temperamentlinear 1200.0 697.674419%,43%EDO%MIDI temperamentlinear 1200.0 701.886792%,53%EDO%MIDI temperamentlinear 1200.0 698.0%,第五= 698美分%% MIDI temperamentlinear 1200.0 696.57843%四分之一逗號中間音調%% MIDI temperamentlinear 1200.0 701.955001%畢達哥拉斯%% MIDI temperamentnormal%12 EDO K:C%V:1高音%% MIDI程序110%小提琴G2 | EF / G / AG | F2 _ba | GA /克/ FG | A2 X2 | V:2的合併%% MIDI程序110%小提琴B2 | C2 ^ C2與E2 E2 | D2 D2和X2 G2 | _e2 Z = E&G2 X G | FEDC | V:3 %%合併MIDI程序110%小提琴ED | C2 A,2 | D2 G,2 | C2 z對於C | F2 ^ F2 |%V:1×2 G2 | _a2 = A2 | _b2 Z = B | c'_bag | ^ FE / D / G2 | V:2 B C / D / ED | C2 FE |德/日/ CD | e2c2&G2 X2 | C2 _BA / G / | V:3 G2 C2 | F2 D2 | G2 Z2 | C2 _E2 | D2 Z2 | %V:1 GA / _b / AG | f2f2 | E2E2 | ^ f2x2 | X2 G2 | g2fe / D / | V:2 ^ C2?^ C&X2 X E | D = c_BA | = B2 A2&^ G ^?F / E / E2 | \ AB / C / BA | G = FB2 | A2A2&E2x2 | V:3 E2 X A,| D2D2 | D2 CB,/ A,/ | ^ D2 ZD | EXE = D | ^ CB,/ A,/ D2 |%V:1 ^ G2 Z = G | GF / E / F2 | FE / D / EF / E / | DE / F / GF | E2 V:2 B2?_B | A2 A = B / = C /&E2x2 | d2c2與G2G2 | x2B2和X2 D2 | G X V:3 DE / F / ED | ^ C2D2 | B,2 = C2 | FE G,2 | C2
  892. 其中,EDO代表“倍頻的等分”。
  893. Here are sample MIDI files produced from the above source that you can listen to.
  894. 正常的氣質
  895. 17部門/倍頻程
  896. 19部門/倍頻程
  897. 22部門/倍頻程
  898. 31部門/倍頻程
  899. 41部門/倍頻程
  900. 120-70
  901. 120-140
  902. 600-350
  903. Tuning System
  904. Turkish music uses more complex music scales which may contain many microtones. Inserting the command
  905. %%MIDI tuningsystem comma53
  906. Instructs abc2midi to use the Holdrian comma scale instead of the regular equal tempered scale. The Holdrian comma scale splits an octave into 53 equal microtones or commas. The comma is 1200/53 = 22.641 cents or 0.22641 of a MIDI pitch unit. Thus it splits a semitone into approximately 4 commas. Middle C corresponds to 60/0.22641 exactly to 265 Holdrian comma, however the other notes in the 12-note equal tempered scale do not align exactly with the comma scale. The following figure shows the comma value and the abc representation for a small range of comma tones.
  907. 逗號規模
  908. The corresponding abc file without the annotations looks as follows.
  909. %%format comma53.fmt
  910. X:1
  911. T: comma53 scale
  912. M: 10/4
  913. L: 1/4
  914. K: C
  915. %%MIDI tuningsystem comma53
  916.   C ^1/4C ^2/4C ^3/4C ^C ^9/8C _3/4D _2/4D _1/4D D|
  917. Here are some important comments here. Abc2midi converts the microtones into the correct pitches using the MIDI pitch bend function. You need a fairly recent version of abc2midi (at least 3.21 January 16 2014), in order that the microtones are transformed correctly to the Holdrian comma 53 scale. Secondly, in order that abcm2ps can convert this file into a valid PostScript file, you require the statement

  918. %%format comma53.fmt

  919. at the top of your abc file, and the file comma53.fmt should be in the same folder as the abcm2ps executable. The comma53.fmt file defines the symbols to be used for representing the microtones and looks as follows.

  920. beginps
  921. /micronewps {1}
  922. /sbar {M -3.0 4.0 rmoveto 4.0 4.3 rlineto stroke}!
  923. /hbar {M -3.0 -1.0 rmoveto 6.0 1.5 rlineto stroke}!
  924. /num2 {M 2.0 6.0 rmoveto /Times-Roman 10 selectfont (2) show}!
  925. /num3 {M 4.0 6.0 rmoveto /Times-Roman 10 selectfont (3) show}!

  926. /ft1543 {2 copy ft0 sbar}!  %_7/8
  927. /ft515 {2 copy ft1543 num3}!  %_3/4
  928. /ft3{gsave -1 1 scale exch neg exch ft0 grestore}!
  929. /ft259 {2 copy ft3 num2}!  %_2/4
  930. /sh3 {2 copy sh1}!  %_1/4
  931. /sh259 {2 copy sh1 num2}!  %^2/4
  932. /sh515 { 2 copy sh0 num3}!  %^3/4
  933. /sh2055 {2 copy sh1 hbar}!  % ^9/8
  934. endps

  935. Furthermore, though ^1/2, ^2/4, ^3/6 and etc. are all equivalent microtone fractions to abc2midi, they are treated differently by abcm2ps. If you substitute ^1/2 or ^/2 instead of ^2/4, abcm2ps will display the wrong symbol.
  936. I have yet to create a format file for SVG output, so SVG and XHTML output do not work if you have these microtones.
  937. 下面的MIDI文件comma531是正確的文件轉換。但是,如果你正在運行abc2midi或“%% MIDI tuningsystem comma53”的舊版本缺少microtones將被轉換為12音平等回火規模和文件聽起來像。這樣。所不同的是微妙的一些耳朵。
  938. Chord Channels
  939. %%MIDI makechordchannels n
  940. If you are not modifying the temperament or inserting microtones you can ignore this command. Normally voice chords containing microtones eg [_/CE_/G] will not be handled correctly because all the notes in the chord are played on the same MIDI channel. If you include the above command where n here is 2, then two separate channels will be allocated for playing the other two notes in this chord. These separate channels will be used whether the pitches of the notes are bent or not. Once you allocate those channels with this command, they are no longer available and since there are only 16 MIDI channels you can easily run out. Furthermore, you need to allocate chordchannels for any other voices which may have in voice chords. The channel allocation process will automatically propogate the program assignment (musical instrument) to the other chordchannels, so be sure you set the program before using this command. If you need to change the program assignments, you can find out the channel numbers that were assigned by running abc2midi in verbose mode using the -v command.
  941. Pitchbend
  942. %%MIDI pitchbend [bass/chord]
  943. This generates a pitchbend event on the current channel, or on the bass or chord channel as specified. The value given by the following two bytes indicates the pitch change.
  944. Single Note Tuning
  945. %%MIDI snt k pitch
  946. 由於許多MIDI設備不支持此功能,使用此命令不推薦。該命令更改使用一個音符調諧“通用系統專用信息”。k是MIDI音高被重新調整(一個介於0至127)和間距為代表的MIDI分隔單位的音調的新值的浮點數。 Here is an example.
  947. X:1 T:單注意調整M:4/4 L:1/4 K:c%% MIDI程序60℃%% MIDI SNT 60 60.3 %%cMIDI SNT 60 60.6 %%cMIDI SNT 60 60.8C
  948. X: 1 T:單注意調整M:4/4 L:1/4 K:c%% MIDI程序60℃%% MIDI SNT 60 60.3 %%cMIDI SNT 60 60.6 %%cMIDI SNT 60 60.8C
  949. 要測試你的MIDI合成器是否有此功能請點擊這裡。如果C的間距向上漂移,那麼SNT正在您的系統上。
  950. Fermata
  951. %%MIDI fermatafixed
  952. Directs abc2midi to expand a fermata by one unit length. Thus HC3 becomes C4.
  953. %%MIDI fermataproportional
  954. This is the default. A fermata doubles the length of a note so HC3 becomes C6.
  955. 在某些情況 ??下,你可能想abc2midi忽略所有延音標記。要做到這一點,添加“-NFER”(無fermatas)的運行參數列表。
  956. MIDI Commands Applying Globally
  957. It is possible to set MIDI directives that will apply to all the following tunes in an abc file. The directives should appear prior to the first tune in the abc file. MIDI commands that will be recognized outside the tune are listed here.
  958. %%MIDI C
  959. %%MIDI nobarlines
  960. %%MIDI barlines
  961. %%MIDI fermatafixed
  962. %%MIDI fermataproportional
  963. %%MIDI ratio
  964. %%MIDI chordname
  965. %%MIDI deltaloudness
  966. All other MIDI commands outside the tune are ignored and will produce the warning "cannot handle this MIDI directive here". The following is a sample test file.
  967. %MIDI C 48 %% MIDI nobarlines %% MIDI比5 1 %% MIDI chordname醜陋的1 2 3 4 X:1 T:測試全局設置M:2/4 L:1/8 K:C“G”CDEF |“ Gugly“D> EF>c| ^ ABDA | AAC2 |
  968. %MIDI C 48 %% MIDI nobarlines %% MIDI比5 1 %% MIDI chordname醜陋的1 2 3 4 X:1 T:測試全局設置M:2/4 L :1/8 K:C“G”CDEF |“Gugly”D> EF>c| ^ ABDA | AAC2 |
  969. Run Time Parameters
  970. Abc2midi has a few run time parameters that may be included after the input file name. If you start abc2midi with no parameters, you will see something similar to this.
  971. [西摩@本地ABC] $ abc2midi abc2midi版本2.26 2009年1月5日用法:abc2midi <ABC文件> [編號] [-c] [-v] [-o文件名??] [-t] [-n <值>] [ -RS] [-NFNP] [編號]選擇調-c將選擇僅檢查-v選擇-ver打印版本號並退出-o verbose選項<文件名??>選擇-t選擇從調冠軍-n&ltlimit派生文件名 ??的輸出文件名>設置限制文件名 ??長度幹-RS使用3:2,而不是1:1的破碎節奏-quiet抑制一些常見的警告-Q默認速度(四分音符/分鐘)-NFNP不處理P!!或f -NFER忽略所有延音標記-NGRA忽略裝飾音-STFW單獨的軌道的話般的字段(歌詞)-HARP裝飾品=卷或豎琴(音高相同)-BF酒鬼模式:調用應力模型如果可能的話- OCC的老弦約定(如+ CE +)-TT調到A =頻率-CSM文件名 ??加載自定義應力模型,從文件的默認操作是寫每個ABC調整MIDI文件的文件名??<莖> N.mid,其中<莖>是abc文件的filestem和N是調整的參考號碼。如果使用了-o選項,只有一個文件被寫入。這是由參考號碼或指定的曲調,如果沒有參考號給出,該文件中的第一曲調。[西摩@本地ABC] $
  972. [西摩@本地ABC] $ abc2midi abc2midi版本2.26 2009年1月5日用法:abc2midi <ABC文件> [編號] [-c] [-v] [-o文件名??] [-t] [ -n <值>] [-RS] [-NFNP] [編號]選擇調-c選擇僅檢查-v選擇-ver打印版本號並退出-o verbose選項<文件名??>選擇-t文件名 ??選擇輸出文件名從調冠軍衍生-n&ltlimit>設置為文件名 ??的長度限制幹-RS使用3:1,而不是2:1的破碎節奏-quiet抑制一些常見的警告-Q默認速度(四分音符/分鐘)-NFNP不過程!P!!或f -NFER忽略所有延音標記-NGRA忽略裝飾音-STFW單獨的軌道的話般的字段(歌詞)-HARP裝飾品=卷或豎琴(音高相同)-BF酒鬼模式:調用應力模型如果可能的話- OCC的老弦約定(如+ CE +)-TT調到A =頻率-CSM文件名 ??加載自定義應力模型,從文件的默認操作是寫每個ABC調整MIDI文件的文件名??<莖> N.mid,其中<莖>是abc文件的filestem和N是調整的參考號碼。如果使用了-o選項,只有一個文件被寫入。這是由參考號碼或指定的曲調,如果沒有參考號給出,該文件中的第一曲調。[西摩@本地ABC] $
  973. The easiest way of running abc2midi is just to follow it with the abc file name. For example:
  974. [seymour@localhost abc]$ abc2midi dennis.abc
  975. writing MIDI file dennis3.mid
  976. You will find a MIDI file dennis3.mid in your directory which you can play with any MIDI synthesizer (eg TiMidity) on your system. The number 3 included in the filename is the X: reference number in the abc file. If your abc file consisted of a collection of abc tunes, then abc2midi will create separate MIDI files for each tune (eg dennis1.mid, dennis2.mid, and etc.).
  977. -c選項
  978. abc2midi不產生任何MIDI文件,但只是報告它處理abc文件時發現的任何錯誤。
  979. -v號碼
  980. 其中-v後跟一個小數目。這在詳細模式下運行abc2midi。在終端上abc2midi輸出很多信息取決於以下數(通常小於5)的大小。在事件abc2midi崩潰,並分段錯誤,這個輸出是確定發生問題的位置非常有用。如果沒有號碼如下-v,詳細級別是最小的。 For example,
  981. [seymour@localhost abc]$ abc2midi dennis.abc -v
  982. Reference X: 3
  983. scanning tune
  984. handling grace notes
  985. fixing repeats
  986. writing MIDI file dennis3.mid
  987. track 0, voice 0
  988. assigning channel 0 to voice
  989. End of File reached
  990. -ver
  991. Abc2midi僅僅打印出它的版本號。這是有用的,檢查你的可執行文件是否為最新版本。Abc2midi似乎得到更新每隔幾個星期。
  992. -o filename
  993. Rather than automatically creating a MIDI file based on the input abc file name and X: reference number, abc2midi produces a MIDI file with the given filename. For example:
  994. abc2midi dennis.abc -o test.mid
  995. will produce a MIDI file called test.mid instead of dennis3.mid.
  996. -t
  997. The name of the output MIDI file is based on the first few letters in the title of the tune. By default the number of letters is 8 but you can change it using the -n option. Any spaces, punctuation marks and special characters are eliminated. Words are separated by capitalization of the initial character. For example, if your input abc file contains a collection of tunes, abc2midi will produce a collection of MIDI files with names related to the tunes title.
  998. -n數量
  999. 限制的字母數在創建基於調的標題MIDI文件名 ??來使用。 For example,
  1000. abc2midi collection.abc -t -n 12
  1001. 將創建的MIDI文件,其文件名 ??是來自於曲調“稱號,並僅限於12個字母加上一個收集“.MID”擴展。
  1002. Rather than naming the MIDI file after the abc file name, abc2midi can use the title of the tune to determine the file name. This is done using the -t option.
  1003. To process only one particular tune in a abc file containing a collection of tunes, specify the X: reference number immediately after the filename. For example:
  1004. [seymour@localhost abc]$ abc2midi allreelsnum.abc 25 -t -n 20
  1005. writing MIDI file BeaverCreek.mid
  1006. 其中,“海狸溪”與X調的標題:編號25。
  1007. -RS
  1008. 雖然破碎的節奏通常是由虛線季度之後八分音符(或視尖括號的方向相反)表示,abc2midi不玩這種方式。而不是封閉的角度(如A <B或B> A)支架2的音符:1的比例。如果選項-RS是包含,然後abc2midi使用3:1的比例的音樂被顯示在普通的音樂符號的方式如下。
  1009. -quiet
  1010. 告訴abc2midi打壓警告消息,它可能輸出處理abc文件時。
  1011. -Q
  1012. Many abc files and tunes do not specify any tempo. By default, abc2midi chooses a tempo of 120 quarter notes per minute, which is frequently painfully slow. To override this default, include the -Q option followed by a number specifying the number of quarter notes per minute. For example:
  1013. abc2midi dennis.abc -Q 180
  1014. will set the tempo to 180 beats per minute (assuming that the tempo is not indicated internally in the tune.) This avoids having to edit the abc file in order to change the tempo for all tunes.
  1015. -NFNP
  1016. 沒有拿手好戲沒有鋼琴。告訴abc2midi忽略所有動態標記一樣!頁!!FF!在abc文件。您可能需要動態的跡象,在印刷比分,但輸出的MIDI文件可能無法根據自己的喜好與這些指示。
  1017. -NFER
  1018. 告訴abc2midi忽略所有延音標記。
  1019. -OCC
  1020. 標準ABC2選秀[url]http://abc.sourceforge.net/standard/abc2-draft.html[/url]已經廢棄了!......!符號有利於+ ... +符號的。為了順應變化,abc2midi,abc2abc和大大小小進行了修改,以接受約定。因此,你可以使用+顫音+,+延音+ + PP +等,以及在廢棄的符號(!顫音!等)。有一個矛盾:在ABC的初期,符號和弦被記載為+ CEG +而非[CEG]。有可能是利用在互聯網上仍然可用這個約定非常少的音樂。如果您需要處理舊的和弦符號,你現在必須添加選項-OCC到abc2midi。這裡是一個使用過時,新公約的示例文件。但願不會有使用舊的約定太多的文件。
  1021. X:1
  1022. T: decorations
  1023. M: 2/4
  1024. L: 1/8
  1025. K: G
  1026. +<(+ [CE]4 +<)+ |[CE] +trill+ DEF|
  1027. !<(! [CE]4 !<)!  |[CE] !trill!  DEF|
  1028. -TT <編號>
  1029. 通常A的關鍵是調整到440赫茲。某些儀器,例如一種手風琴可以被調諧到不同的頻率。以下示例將調整輸出MIDI文件到444赫茲。
  1030. abc2midi inputfile.abc -TT 444
  1031. -CSM <文件名??>
  1032. Abc2midi將更新使用給定文件中的信息的應力模型。在有關文件的詳細信息在應力模型的部分給出。
  1033. Debugging Abc2midi
  1034. To modify the abcmidi package, you need to be an accomplished C programmer, familiar with a debugger program and the MIDI file format. It takes many hours to identify the source of a bug and to determine the fix (which is frequently just a couple of lines of code), so you need to be patient. The abcmidi package was developed in the early days of C compilers and computers. Because computers at that time had limited memory and speed, this program was designed to use limited resources as efficiently as possible at the expense of easy maintenance. The abcmidi package is still being compiled and run on some ancient machines. The package was initially simple: there was one developer and there was little need for good documentation or clear programming style. Gradually, as more features were patched in and more bugs were identified and fixed, the code becane barely manageable. There is some description of how the programs are designed in the folder abcmidi/doc/programming/.
  1035. Users are always looking for more features, and new bugs are discovered as users become more adventurous. The abcmidi/doc/CHANGES file provides a history of my modifications to the abcmidi package. Certain features, such as tied notes, were particularly difficult to get working correctly. (For example, tied notes can occur in chords and triplets.)
  1036. Once a new bug is discovered, the first step is to identify and isolate it as much as possible. This involves creating a new abc file which is as simple as possible and demonstrates the bug. Examples of such files can be found in the CHANGES file referenced above. If the problem lies with the output MIDI file, then it is useful to examine the textual representation of the MIDI file using the -mftext output of midi2abc.
  1037. The MIDI file is created from the abc file in two passes. The next step is to determine which pass is faulty. An internal representation is created in the global arrays, feature[], pitch[],num[] and denom[]. To check the internal representation, run the program using a debugger, placing a break point on the function writetrack(). When the program stops at this break point, call the function dumpfeat(0,notes) which will display the contents of those global arrays. If the bug occurs in the internal representation, then the problem occurs in the first pass. The code in store.c or parseabc.c is suspect. Otherwise the code in genmidi.c should be checked out.
  1038. It is difficult to figure out some of the functions, so I usually run the debugger in step mode at the place where the faulty output is produced. It is also useful to scan the comments in the doc/CHANGES file which may shed some light on why the code was written this way. Usually after careful analysis, the source of the bug is identified. In most cases, the fix is just a small change.
  1039. It is a good idea to be very conservative in making any code changes so that it has little or no impact on the operation of the program. Radical changes usually lead to a whole proliferation of new bugs. If you are introducing a new feature, the added code should ideally be localized to a few new functions and it should be easy to revert to the older version in case unexpected bugs are introduced. This often means creating a new copy of some function, eg new_start_drone() which will eventually replace start_drone(). Once you are absolutely confident that the new code is reliable, you can eliminate the duplication.
点击复制代码



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

116

主题

703

帖子

5411

积分

版主

Rank: 12Rank: 12Rank: 12

积分
5411
QQ
沙发
 楼主| 发表于 2015-2-8 11:12:54 | 只看该作者
<
沙发 rofy530说:回楼主rofy530
這是我學ABC時很重要的一份英文資料,大家多花時間研究,一定會有很大的收穫。如果有哪位朋友英文比較好,把他翻譯出來,那一定會造福不少人的。因為裡面有很多普立,所以我按照老王的建議用編碼方式呈現,謝謝!
回复 支持 反对

使用道具 举报

100

主题

512

帖子

4967

积分

版主

本站创始人

Rank: 12Rank: 12Rank: 12

积分
4967
板凳
发表于 2015-2-8 20:08:25 | 只看该作者
<
板凳 王晓波说:回楼主rofy530
老王上学的时候,英语这门科目从来就是不及格的,哈哈。只有顶帖的份儿了。
回复 支持 反对

使用道具 举报

44

主题

618

帖子

3177

积分

音乐研究生

Rank: 6Rank: 6

积分
3177
地板
发表于 2015-2-9 10:47:30 | 只看该作者
地板 明飞说:
来顶峰哥的好东西。 英文想学就是学不好。、
回复 支持 反对

使用道具 举报

116

主题

703

帖子

5411

积分

版主

Rank: 12Rank: 12Rank: 12

积分
5411
QQ
5#
 楼主| 发表于 2015-2-9 15:58:22 | 只看该作者
<
5楼 rofy530说:回地板明飞
我會繼續學習,也會繼續分享。希望有更多朋友憶起研究。
回复 支持 反对

使用道具 举报

44

主题

618

帖子

3177

积分

音乐研究生

Rank: 6Rank: 6

积分
3177
6#
发表于 2015-2-10 22:20:55 | 只看该作者
<
6楼 明飞说:回5楼rofy530
ok一起进步就是力量
回复 支持 反对

使用道具 举报

14

主题

176

帖子

2659

积分

音乐研究生

Rank: 6Rank: 6

积分
2659
7#
发表于 2015-2-11 13:48:32 | 只看该作者
7楼 一时的花环说:
我也顶一下,可惜有心无力
回复 支持 反对

使用道具 举报

44

主题

618

帖子

3177

积分

音乐研究生

Rank: 6Rank: 6

积分
3177
8#
发表于 2015-2-12 11:25:20 | 只看该作者
<
8楼 明飞说:回5楼rofy530
看这些资料看到头大,风哥,那个音符渐强和渐弱这个代码是怎么样写?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|视障者音乐制作交流基地(szzyyzz.com) ( 蜀ICP备15002464号免责声明:本站网友发表的言论属其个人观点,与本站立场无关!

GMT+8, 2024-5-8 05:19 , Processed in 0.072871 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表