]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/changing-midi-output-to-one-channel-per-voice.ly
9f013e96a90716a714c7eeca4cb72e7ff22f4c4e
[lilypond.git] / input / lsr / changing-midi-output-to-one-channel-per-voice.ly
1 %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
2 %% This file is in the public domain.
3 \version "2.13.1"
4
5 \header {
6   lsrtags = "contexts-and-engravers, midi"
7
8 %% Translation of GIT committish: f39a9724d9f51ed9d0d464689ef62f549d7b8dd6
9   texidoces = "
10 Al producir una salida MIDI, el comportamiento predeterminado es
11 que cada pentagrama representa un canal MIDI, con todas las voces
12 de dicho pentagrama mezcladas.  Esto reduce al mínimo el riesgo de
13 que se agote el número de canales MIDI disponibles, pues existe un
14 máximo de 16 canales por pista.
15
16 Sin embargo, cuando se traslada el interpretador
17 @code{Staff_performer} al contexto @code{Voice}, cada voz de un
18 pentagrama puede tener su propio canal MIDI, como se muestra en el
19 siguiente ejemplo: a pesar de estar sobre el mismo pentagrama, se
20 crean dos canales MIDI, cada uno con un @code{midiInstrument}
21 distinto.
22
23 "
24   doctitlees = "Modificar la salida MIDI para que tenga un canal por cada voz"
25
26   texidoc = "
27 When outputting MIDI, the default behavior is for each staff to
28 represent one MIDI channel, with all the voices on a staff amalgamated.
29 This minimizes the risk of running out of MIDI channels, since there
30 are only 16 available per track.
31
32 However, by moving the @code{Staff_performer} to the @code{Voice}
33 context, each voice on a staff can have its own MIDI channel, as is
34 demonstrated by the following example: despite being on the same staff,
35 two MIDI channels are created, each with a different
36 @code{midiInstrument}. 
37
38 "
39   doctitle = "Changing MIDI output to one channel per voice"
40 } % begin verbatim
41
42 \score {
43   \new Staff <<
44     \new Voice \relative c''' {
45       \set midiInstrument = #"flute"
46       \voiceOne
47       \key g \major
48       \time 2/2
49       r2 g-"Flute" ~
50       g fis ~
51       fis4 g8 fis e2 ~
52       e4 d8 cis d2
53     }
54     \new Voice \relative c'' {
55       \set midiInstrument = #"clarinet"
56       \voiceTwo
57       b1-"Clarinet"
58       a2. b8 a
59       g2. fis8 e
60       fis2 r
61     }
62   >>
63   \layout { }
64   \midi {
65     \context {
66       \Staff
67       \remove "Staff_performer"
68     }
69     \context {
70       \Voice
71       \consists "Staff_performer"      
72     }
73     \context {
74       \Score
75       tempoWholesPerMinute = #(ly:make-moment 72 2)
76     }
77   }
78 }
79