rofy530 发表于 2018-4-26 14:05:50

ABC MIDI 指令整理

前些日子發現了這篇英文版的abc midi 指令的整理文章,感覺對大家應該會有些幫助,特別請上次翻譯 abc使用手冊的何先生再次幫忙翻譯,特此獻上我的感謝!
%%MIDI barlines                   使用小節綫 This turns off the effect of %%MIDInobarlines in the middle of a tune. This is the default behaviour assumed atthe start of every tune. 停止%%MIDI nobarlines 指令的功能。--每個曲子開頭的默認設置是使用小節綫。 %%MIDI bassprog n             低音樂器碼 Sets the MIDI instrument for the bass notesto be n. If the command includes the string octave=n where n is a numberbetween -2 and +2, then the bass note will be shifted n octaves from its usualposition. eg. (%%MIDI bassprog 32 octave=-1). 指定演奏低音音符的MIDI樂器,樂器由通用MIDI 程式號碼代表。如果該指令包括字串octave=n,其中n是-2和+2之間的數字,則低音音符將被從它的通常的位置移動n個八度。例如:%% MIDIbassprog 32 octave=1。 %%MIDI bassvol n                低音響度碼 Sets the volume (velocity) of the bassnotes at n. 設定低音音符的響度為 n。響度以速度(velocity)來代表。 %%MIDI beat a b c n    拍子的相對强度 controls the way note velocities areselected. 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 inthe range 0-127. The parameter n determines which notes are "strong".If the time signature is x/y, then each note is given a position number k = 0,1, 2 .. x-1 within each bar. Note that the units for n are not the unit notelength. If k is a multiple of n, then the note is "strong". 設定強音的位置及相對强度。每小節的第一個音强度爲a,其他強音强度爲b,剩下的音强度爲c。强度a,b,c 的數值在0到127之間。參數n決定強音的位置。假設拍子是x/y,每個音在小節中的位置是k,k=0,1,2,到x-1,當k是n的倍數時,那個音是強音。例子:%%MIDIbeat 105 95 80 2,拍子是6/8,則第一拍强度(k=0)是105,第三(k=2)及第五(k=4)拍强度是95,其他拍强度是80. %%MIDIbeataccents   恢復強拍 Revert to emphasizing notes the usual way.(default) 恢復執行‘%%MIDIbeat a b c k’指令 %%MIDIbeatmod n   改變强度 increments by n (or decrements if n isnegative) the velocities a, b and c described above. It is also used inimplementing crescendo and diminuendo (eg. !<(!, !crescendo(! etc.) 將‘%%MIDIbeat a b c k’指令中設立的强度a, b 和 c各增加n度(假如n是負數,代表減少)。 %%MIDIbeatstring <string of f, m and p>强弱拍序列 This provides an alternative way ofspecifying where the strong and weak stresses fall within a bar. 'f' meansvelocity a (normally strong), 'm' means velocity b (medium velocity) and 'p'means velocity c (soft velocity). For example, if the time signature is 7/8with stresses on the first, fourth and sixth notes in the bar, we could use thefollowing %%MIDI beatstring fppmpmp 以一個序列來指定小節中各拍子的强弱,'f' 代表‘%%MIDIbeat a b c k’指令中的a (強), 'm'代表b (中強) , 'p' 代表c (弱)。例子:拍子是7/8,則‘%%MIDI beatstring fppmpmp’代表第一拍强,第四及第七拍中强。 %%MIDIc n      c音高的位置 specifies the MIDI pitch which correspondsto c. The default is 60. This number should normally be a multiple of 12. 指定那個MIDI音是相當於c。默認值是60,即第60個MIDI音高是c。這個值通常是個12的倍數。 %%MIDI channel n      通道 n selects melody channel n (in the range1-16). 選擇第n個通道,n從1到16. %%MIDI chordattack n                  和弦延遲 n where n is a small number. If n is zero,then abc2midi should behave as in earlier versions. The delay n is in MIDI timeunits where there are 480 units in a quarter note beat. The program may not runcorrectly if n is too large and there are short chords. 其中n是一個小數目。如果n為0,則abc2midi表現與早期版本相同。參數n的單位是MIDI時間單位,每個四分音符有480MIDI時間單位。如果n過大,此指令可能無法正常運行。 %%MIDIchordname name n1 n2 n3 n4 n5 n6      和弦名字及成分 Defineshow to play a guitar chord called "name". n1 is usually 0 and n2, n3to n6 give the pitches of the other notes in semitones relative to the rootnote. There may be fewer than 6 notes in the chord, butnot more. If "name" is already defined, this command re-defines it.Unlike most other commands, chordname definitions stay in effect from wherethey 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. 宣告一個吉他和弦的名字及其組成音。參數‘name’是和弦名字,n1通常為0,n2,n3至n6是每個音到‘根音’的間距,單位是半音。和弦可以少於6個音符,但不能多於6個音符。如果這個名字的和弦已經存在,這個指令重新定義它。和弦的名稱定義有效至abc曲子的末尾。下面舉例說明如何定義和弦 m,7,m 7和maj7。 %%MIDI chordprog n                     和弦樂器碼 Sets the MIDI instrument for the chordnotes to be n. If the command includes the string octave=n where n is a numberbetween -2 and +2, then the chord notes will be shifted n octaves from itsusual position, eg. (%%MIDI chordprog 32 octave=1). Any other descriptors willbe ignored, eg (%%MIDI chordprog 0 Acoustic Piano). 指定演奏和弦音符的MIDI樂器,樂器由通用MIDI 程式號碼代表。如果該指令包括字串octave=n,其中n是-2和+2之間的數字,則和弦音符將被從它的通常的位置移動n個八度。例如:%% MIDI chordprog32octave= 1。其他任何描述都將被忽略,例如:%% MIDI chordprog0Acoustic Piano 被視爲%% MIDI chordprog0。 %%MIDI chordvol n            和弦響度碼 Sets the volume (velocity) of the chordnotes at n. 指定演奏和弦音符的響度,以速度(velocity)來代表。 %%MIDIcontrol n1 n2            MIDI音調發生器調整       n1 n2 Thisgenerates a MIDI control event. If the word"control" is followed by "bass" or "chord", theevent will be applied to the bass or chord channel, otherwise it will beapplied 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 isset. A couple of examples :%%MIDIcontrol 7 50will set the main volume ofthe channel to 50 ;%%MIDI control 10 0   will set the pan parameter (left/rightbalance) to 0. See the manual for your MIDI tone generator to find out whatcontrol events are supported. 此指令用來調整MIDI音調發生器。如果參數“bass”或“chord”存在,則低音或和弦通道(channel)會受到調整,否則是當前的通道會受到調整。參數 n1和n2的範圍在0-127之間,n1代表受調整的功能而n2是新設置的值。至於那些功能可受調整,請參見MIDI音調發生器手冊。一些使用例子:%%MIDI control 7 50將通道的主音量設置於50;%%MIDI control 10 0   將聲像參數(即左/右平衡)設置為0 %%MIDI deltaloudness n   改變强度 where nis a small positive number.By default the crescendo and dimuendo instructions modify the beatvariables a, b, and c by 15 velocity units. This instruction allows you tochange this default. 漸强及漸弱符號的默認强度改變是15度。這個指令將改變度改爲n度。 %%MIDI drone n1 n2 n3 n4 n5             背景低音設定 Configures the drone chord. n1 = MIDI program,n2 = MIDI pitch 1, n3 = MIDI pitch 2, n4 = MIDI velocity 1, and n5 = MIDIvelocity 2. By default they have already been set to 70 45 33 80 80. 調配背景低音和弦。參數n1 = MIDI樂器程式,n2 = MIDI音調1,n3 = MIDI音調2,n4= MIDI速度1和n5= MIDI速度2。它們的默認設置為7045 3380 80。 %%MIDI droneoff               關閉背景低音 This turns off the drone. 不使用背景低音 %%MIDI droneon       開啓背景低音 This turns on a continuous drone used inbagpipe music. The drone consists of two notes (by default A, and A,,) playedon a bassoon at a MIDI loudness (velocity) 80. 使用背景低音,(原本用於風笛音樂,bagpipe)。背景低音由兩個音符(默認為A,而A,,)由巴松管以MIDI響度(速度)80演奏。 %%MIDIdrumbars n            打擊樂單位小節數 n The%%MIDI drum line can sound quite monotonous if it is repeated each bar. To circumvent this problem a new MIDI command, %%MIDI drumbars n ,where n is a smallnumber will spread out the drum string over n consecutive bars. By defaultdrumbars is set to 1 maintaining compatibility with existing abc files. Youshould take care that the drumstring is evenly divisible between the drumbarbars. Also the time signature should not change between bars in a drumbar unit. 本指令使打擊樂模式每 n小節重複一次,(先前打擊樂模式每小節重複一次)。參數n默認值是1。需確定打擊樂模式可以每 n小節重複一次,而且,拍子在這n小節中不能改變. %%MIDIdrum string                打擊樂模式 Thissets up a drum pattern. The string determines when there is a drum beat and thedrum program values determine what each drum strike sounds like. e.g. %%MIDIdrum d2zdd 35 38 38100 50 50 The string may contain 'd' for a drumstrike or 'z' for a rest. 打擊樂模式由字符串描述。字符串記錄打擊樂聲的位置,種類,及響度。例如%%MIDI drum d2zdd 35 38 38100 50 50,字母'd',代表擊樂聲, 'z',代表休息, 35及38是樂器程式碼, 100及50是速度 (響度)。 %%MIDI drummap note midipitch      打擊樂器對應note midipitch where the pitch of the note is notatedusing abc notation and midipitch is a number between 35 and 81 inclusive referringto the above table. This command is used if you are notating a drum track, i.e.a voice played on channel 10. Rather than being forced to use the notecorresponding to the desired percussion instrument, (for example C (MIDI pitch60) for hi bongo), you can change the mapping to use a more convenient pitch,for example to access bass drum 1 (MIDI pitch 36) you would requirethe note C,, which is awkward to display in common music notation. You canchange the mapping to say _D using%%MIDI drummap _D 36. 參數,note代表音高,使用abc音高記譜法;midipitch代表樂器,是一個在35和81之間的數字。本指令用於編排打擊樂通道,即通道10。可以用來改變打擊樂器的代表音高,譬如大鼓1(通用MIDI 程式號碼36),的默認代表音高是‘C,,’不太好用。可以用本指令將代表音高更改爲_D,即%%MIDI drummap _D 36. %%MIDIdrumoff停止打擊樂 turnsdrum accompaniment off. 停止打擊樂伴奏。 %%MIDI drumon   啓動打擊樂 turnsdrum accompaniment on. 啓動打擊樂伴奏。 %%MIDIfermatafixed                   延音一個單位長度 Directsabc2midi to expand a fermata by one unit length. ThusHC3 becomes C4. 設定延音,fermata,延長一個單位長度,例如HC3 變成 C4. %%MIDI fermataproportional    延音一個同樣長度 This is the default. A fermata doubles thelength of a note so HC3 becomes C6. 設定延音,fermata,延長一個同樣長度,例如HC3 變成 C6. – 這是默認設置。 %%MIDIgchordbars n                   吉他和弦單位小節數 n Thiscommand spreads the gchord string over n consecutive bars of equal length. The gchord string should be evenly divisible by n or else thegchords will not work properly. 本指令使吉他和弦模式每 n小節重複一次,(先前吉他和弦模式每小節重複一次)。需確定吉他和弦模式可以每 n小節重複一次,而且,拍子在這n小節中不能改變。 %%MIDI gchord string                  吉他和弦小節組成 sets up how guitar chords are generated.The string is a sequence made of z's, c's f's and b's for rests, chords,fundamental and fundamental plus chord notesrespectively. This specifies how each bar is to be played. An optional lengthis allowed to follow the z's, c's, f's and b's e.g. czf2zf3. If the abc contains guitar chords, then abc2midiautomatically adds chords and fundamentals after encountering the first guitarchord. It keeps using that chord until a new chord is specified in the abc. 設定吉他和弦如何演奏。‘小節組成’字符串是由z,c,f和b字母組成,分別代表:休息,和弦,主音,主音以外的音。這個字符串指定了每個小節應如何彈奏。每個字母後面可以有數字代表長度,例如czf2zf3。如果abc曲子使用吉他和弦,abc2midi程式在第一個吉他和弦出現時自動使用和弦和主音。這個和弦一直使用到下一個新的和弦出現。 %%MIDIgchordoff               關閉吉他和弦指令 Turnsoff guitar chords. 不使用吉他和弦 %%MIDIgchordon                開啓吉他和弦指令 Turns onguitar chords (they are turned on by default at the start of atune). 使用吉他和弦。(曲子開始時吉他和弦是開啓的,這是默認設定。) %%MIDIgrace a/b   點綴音(相對)長度 sets the fraction of the next note thatgrace notes will take up. a must be between 1 and b-1. The grace notes may notsound natural in this approach, since the length of the individual grace notesvary with the complexity of the grace and the length of the following note. Adifferent approach (which is now the default) assumes that the grace notesalways have fixed duration specified by a fraction of the unit length. To usethe other approach you would specify, 指定點綴音,grace notes,的長度與下個音的長度的比例,參數中a必須在1及b-1之間。這樣設定的點綴音長度聽起來可能不自然。下一個指令是比較好的辦法,也是默認的辦法。 %%MIDIgracedivider b               點綴音長度 where b specifies how many parts to dividethe 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. Timewould be stolen from the note to which the grace note is applied. If that noteis not long enough to handle the grace then the grace notes would be assigned 0duration. 指定點綴音,grace notes,的長度是單位音符長度除以b。單位音符長度是由L:領域值決定。譬如L: = 1/8,參數b = 4則點綴音長度是1/32音符。如下個音符長度比指定的點綴音長度短,則點綴音長度爲零。 %%MIDI makechordchannels n            和弦通道數目n If you are not modifying the temperament orinserting microtones you can ignore this command. 假如不需改變音階的大小,也沒有引入微調的話,可以忽視這個指令。 %%MIDInobarlines            忽視小節綫 This isa somewhat obscure option to support early music without barlines. Normally, an accidental applied to one note e.g. ^c will apply toevery note at the same point in the scale until the end of the bar (so C,, C, Cc c' would all be sharpened). This option turns off this behaviour, so that anaccidental applies only to the next note. It should be used in the header ofany tune requiring this behaviour. 這個指令已很少用到,用來支持早期沒有小節綫的音樂。通常,當一個升降符號應用到一個音符後,譬如^ C,則同一小節内,所有同名字的音符,即C,, C, C c c'等等也都會受到同樣改變。這個指令關閉這種行為,讓一個升降符號僅適用於下一個音符。使用這個指令時應該在樂曲的‘表頭’部分列出。 %%MIDInobeataccents       沒有強拍 For instruments such as church organ thathave no greatly emphasized beat notes, using this will force use of the 'b'velocity (see %%MIDIbeat) for every note irrespective of position in thebar.This allows dynamics (ff, f, etc)to be used in the normal way. 所有的音的强度都是‘%%MIDIbeat a b c k’指令中的b。通常用於教堂風琴之類的樂器。 %%MIDInoportamento                    關閉滑音 Thiswill turn off the portamento controller (current default). 此指令用來關閉MIDI滑音控制(關閉是默認設定)。 %%MIDIpitchbend <high byte><low byte>            上下滑音 <high byte><lowbyte> Thisgenerates a pitchbend event on the current channel, or on the bass or chordchannel as specified. The value given by the followingtwo bytes indicates the pitch change. 此指令用來控制上下滑音。如果參數“bass”或“chord”存在,則低音或和弦通道(channel)會受到調整,否則是當前的通道會受到調整。參數<high byte>及<low byte>代表上下滑動的程度。 %%MIDIportamento n                  開啓滑音 n This will turn on the MIDI portamentocontroller and set the speed of sliding between pitches to n. Like %%MIDIcontrol, if the word portamento 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. The parameter n should bebetween 0 and 63. Large values imply a slow transition between pitches. I havefound the resulting effect to be rather wierd, especially for large pitchintervals. 此指令用來開啓MIDI滑音控制。如果參數“bass”或“chord”存在,則低音或和弦通道(channel)會受到調整,否則是當前的通道會受到調整。參數 n範圍在0-63之間,代表滑音的速度,大的數目滑音速度慢。本指南的作者覺得這指令的效果不理想。 %%MIDI program n   MIDI 第n個程式,program,在第c個通道,channel selectsprogram n (in the range 1-128) on channel c. If c is not given, the program isselected on the current melody channel. 效果應用於在第c個通道(channel)中的MIDI 第n個程式(program)。數目n從1到128。如果c沒給,則是指當前的通道。 %%MIDIrandomchordattack n             和弦隨機延遲 n where nis a small number. This is similar to above, except the delay of each note inthe chord varies randomly between 0 and n-1. Thereforeeach chord is played differently. 其中n是一個小數目。此指令的功能與上指令雷同,但延遲和縮短的量是在0到n-1之間的一個隨機數。所以,該和弦每次演奏都會略有不同。 %%MIDI ratio n m               點音符比例n m This sets the ratio of note lengths inbroken rhythm (e.g. a>b). The default behaviour is for note a to sound fortwice as long as note b. This can be achieved with%%MIDI ratio 2 1   and hornpipes are commonly played withapproximately this ratio. However, for other musical styles, a different ratiomay be appropriate. If you are using abc2midi to export music to anotherprogram for printing, then you may wish to use a ratio of 3:1 which is howhornpipes are usually notated. This can be achieved with %%MIDI ratio 3 1 這個指令設置點音符(例如a> b)前後兩音長度的比率。默認值是a音符聽起來是b音符的兩倍長。即%%MIDI ratio 2 1 。通常hornpipe以大約這個比率演奏。然而,對於其他的音樂風格,不同的比率可能較合適。要注意,當使用abc2midi程式輸出hornpipe曲子到其它程式以進行打印時,不妨使用比率為3:1,%%MIDI ratio 3 1 ,因爲hornpipe記譜一般是用這個比率。 %%MIDIrtranspose n         再轉調n Relative transpose by the specified numberof semitones. i.e. %%MIDI transpose a followed by %%MIDI rtranspose b resultsin a transposition of a+b. %%MIDI transpose b will result in a transposition ofb semitones, regardless of any previous transposition. 再轉調n個半音。用法如下:如果‘%%MIDI transpose a’後面跟著‘%%MIDIrtranspose b’結果是轉調a+b半音。如果僅僅是‘%%MIDI transpose b’則,不論先前是不是有其他轉調指令,結果是轉調b半音。 %%MIDI snt k pitch            改變單音k pitch Since many MIDI devices do not support thisfunction, use of this command is not recommended. The command changes thetuning of a single note using the "universal system exclusivemessages". k is the MIDI pitch being retuned (a number between 0 to 127)and pitch is a floating point number representing the pitch's new value in MIDIpitch units. 許多MIDI樂器不支持此功能,應避免使用此指令。此指令使用“通用系統專用信息”更改一個音符的音高。參數k(0至127之間的數字)代表被重新調整的MIDI音符,參數pitch (一個小數)代表新的音高,以MIDI音高單位來表示。 %%MIDI temperament hint1i hint2i    音階氣質設定 TO BEWRITTEN 目前無資料。 %%MIDI temperamentlinear octave_centsfifth_cents               音階氣質調整octave_cents fifth_cents This command allows you to change thetemperament of the scale. Octave_cents specifies the size of an octave in centsof a semitone or 1/1200 of an octave. Fifth_cents specifies in the size of afifth (normally 700 cents). For example: %%MIDI temperament 1200.5 698.0 willproduce a slightly stretched scale with narrowed fifths. 此指令改變音階的大小,即所謂的‘音階的氣質’。參數Octave_cents指定一個八度音階是由多少百分之一個半音組成。(通常一個八度由1200個百分之一個半音組成。)參數Fifth_cents指定五度音階的大小(通常是700個百分之一個半音)。所以:%% MIDItemperamentlinear1200.5698.0會產生輕微拉伸的八度音階與稍微縮小的五度。 %%MIDI termperamentnormal                  恢復正常的‘音階的氣質’ restoreto the normal temperament 恢復正常的‘音階的氣質’。 %%MIDItranspose n         轉調n transposes the output by the specifiednumber of semitones. n may be positive or negative. 轉調n個半音,n可以是正值或負值。 %%MIDI trim x/y       裁剪x/y (譯者:正確用法可能是%%MIDI trim x y,此處有筆誤) where x and y are two numbers. This commandcontrols the articulation of notes and chords by placing silent gaps betweenthe notes.The length of these gaps isdetermined by x/y and the unit length specified by the L: command. These gapsare produced by shortening the notes by the same amount. If the note is alreadyshorter than the specified gap, then the gap is set to half the length of thenote.The fraction x/y indicates a noteduration in the same manner as specified in the abc file. The actual durationis based on the unit length specified by the L: field command. It isrecommended that x/y be a fraction close to zero. The denominator, y does notneed to be a power of 2. Trimming is disabled inside slurs as indicated byparentheses. You can turn off all note trimming by setting x to 0, eg 0/1. Bydefault, note trimming is turned off at the beginning of a tune or voicecommand. 此指令在音符之間加入一小段‘間隙’以控制音符或和弦音符之間的銜接效果。這些間隙的長度由數字x及y的比例決定。實際長度爲曲子的單位長度,由L: 領域值決定,乘上該比例。每個音符縮短相同量,如果該音符短于指定的間隙長度,則設置間隙為音符的長度的一半。建議設置x/y比例接近于0。此指令不適用于連音。當x爲0時,此指令失效,間隙長度爲0。當新曲子或聲部開始時,此指令的默認設置是關閉。

ufmiyr 发表于 2018-4-26 14:41:04

赞赞赞赞赞赞赞
页: [1]
查看完整版本: ABC MIDI 指令整理