Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Side by Side Diff: Documentation/notation/input.itely

Issue 302930043: Doc: Add a section about handling MIDI dynamics with multiple voices
Patch Set: Created 7 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 @c -*- coding: utf-8; mode: texinfo; -*- 1 @c -*- coding: utf-8; mode: texinfo; -*-
2 2
3 @ignore 3 @ignore
4 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH 4 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 5
6 When revising a translation, copy the HEAD committish of the 6 When revising a translation, copy the HEAD committish of the
7 version that you are working on. For details, see the Contributors' 7 version that you are working on. For details, see the Contributors'
8 Guide, node Updating translation committishes.. 8 Guide, node Updating translation committishes..
9 @end ignore 9 @end ignore
10 10
(...skipping 2962 matching lines...) Expand 10 before | Expand all | Expand 10 after
2973 of dynamic markings and the relative volume of different instruments. 2973 of dynamic markings and the relative volume of different instruments.
2974 2974
2975 Dynamic marks translate automatically into volume levels in the 2975 Dynamic marks translate automatically into volume levels in the
2976 available MIDI volume range whereas crescendi and decrescendi vary the 2976 available MIDI volume range whereas crescendi and decrescendi vary the
2977 volume linearly between their two extremes. It is possible to control 2977 volume linearly between their two extremes. It is possible to control
2978 the relative volume of dynamic markings, and the overall volume levels 2978 the relative volume of dynamic markings, and the overall volume levels
2979 of different instruments. 2979 of different instruments.
2980 2980
2981 @menu 2981 @menu
2982 * Dynamic marks in MIDI:: 2982 * Dynamic marks in MIDI::
2983 * MIDI dynamics and voices::
2983 * Setting MIDI volume:: 2984 * Setting MIDI volume::
2984 * Setting MIDI block properties:: 2985 * Setting MIDI block properties::
2985 @end menu 2986 @end menu
2986 2987
2987 @cindex MIDI volume 2988 @cindex MIDI volume
2988 @cindex MIDI equalization 2989 @cindex MIDI equalization
2989 @cindex MIDI dynamics 2990 @cindex MIDI dynamics
2990 @cindex Dynamics in MIDI 2991 @cindex Dynamics in MIDI
2992 @cindex MIDI dynamics and voices
2991 2993
2992 2994
2993 @node Dynamic marks in MIDI 2995 @node Dynamic marks in MIDI
2994 @unnumberedsubsubsec Dynamic marks in MIDI 2996 @unnumberedsubsubsec Dynamic marks in MIDI
2995 2997
2996 Only the dynamic markings from @code{ppppp} to @code{fffff}, including 2998 Only the dynamic markings from @code{ppppp} to @code{fffff}, including
2997 @code{mp}, @code{mf} and @code{sf} have values assigned to them. This 2999 @code{mp}, @code{mf} and @code{sf} have values assigned to them. This
2998 value is then applied to the value of the overall MIDI volume range to 3000 value is then applied to the value of the overall MIDI volume range to
2999 obtain the final volume included in the MIDI output for that particular 3001 obtain the final volume included in the MIDI output for that particular
3000 dynamic marking. The default fractions range from 0.25 for 3002 dynamic marking. The default fractions range from 0.25 for
3001 @notation{ppppp} to 0.95 for @notation{fffff}. The complete set of 3003 @notation{ppppp} to 0.95 for @notation{fffff}. The complete set of
3002 dynamic marks and their associated fractions can be found in 3004 dynamic marks and their associated fractions can be found in
3003 @file{scm/midi.scm}. 3005 @file{scm/midi.scm}.
3004 3006
3005 3007
3006 @snippets 3008 @snippets
3007 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle] 3009 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
3008 {creating-custom-dynamics-in-midi-output.ly} 3010 {creating-custom-dynamics-in-midi-output.ly}
3009 3011
3010 Installed Files: 3012 Installed Files:
3011 @file{ly/script-init.ly} 3013 @file{ly/script-init.ly}
3012 @file{scm/midi.scm}. 3014 @file{scm/midi.scm}.
3013 3015
3014 Snippets: 3016 Snippets:
3015 @rlsr{MIDI}. 3017 @rlsr{MIDI}.
3016 3018
3017 Internals Reference: 3019 Internals Reference:
3018 @rinternals{Dynamic_performer}. 3020 @rinternals{Dynamic_performer}.
3019 3021
3022 @node MIDI dynamics and voices
Carl 2016/07/05 20:58:03 This section is too tutorial in language for the n
3023 @unnumberedsubsubsec MIDI dynamics and voices
3024
3025 Note that MIDI dynamics within each @code{Voice} are by default
3026 independent of the dynamics in any other @code{Voice},
3027 regardless of how the @code{Voice} has been instantiated (using
3028 an explicit @code{\new Voice}, or implicitly by combining music
3029 expressions into simultaneous voices using the double backslash
3030 construct). This means that dynamic changes in a @code{Voice}
3031 will not affect the MIDI dynamics in any other @code{Voice},
3032 and, that in fact all notes in an initial sequence of notes in a
3033 @code{Voice} with no explicit dynamics attached to them will be
3034 assigned a default MIDI dynamic level, and not, for example, the
3035 dynamic level of any @code{Voice} that would appear to contain
3036 the inner one syntactically in the input. The default dynamic
3037 level corresponds to a dynamic mark which would have the value
3038 0.71 in the list of dynamic marks and fractions defined in
3039 @file{scm/midi.scm}.
3040
3041 Let us consider the MIDI dynamic levels of notes in the
3042 following example:
3043
3044 @lilypond[quote,verbatim]
3045 \new Staff \new Voice = "main" \relative {
3046 c'2\pppp
3047 <<
3048 \new Voice = "first" \relative {
3049 \voiceOne c''8 c8 c8^\f c8
3050 }
3051 \new Voice = "second" \relative {
3052 \voiceTwo c'8 c4_\> c8_\pp
3053 }
3054 >>
3055 \oneVoice
3056 c1
3057 }
3058 @end lilypond
3059
3060 @itemize
3061 @item
3062 The first note in the top-level @code{Voice} will be assigned
3063 the dynamic level associated with the @code{pppp} dynamic mark.
3064
3065 @item
3066 Having no explicit dynamic marks attached, the first two notes
3067 in both of the temporary voices will be assigned the default
3068 MIDI dynamic level (and not the dynamic level of the note in the
3069 main @code{Voice}, @code{pppp}).
3070
3071 @item
3072 The @code{f} dynamic mark in the first temporary @code{Voice}
3073 will affect the MIDI volume of only the final two notes in that
3074 @code{Voice}.
3075
3076 @item
3077 The decrescendo in the second temporary @code{Voice} starts at
3078 the default MIDI dynamic level and ends at @code{pp}; it
3079 affects only notes in that @code{Voice}.
3080
3081 @item
3082 The dynamic level of the last note in the example will be
3083 @code{pppp} since this note belongs again to the @code{main}
3084 voice, which is not affected by any dynamic changes occuring in
3085 the temporary voices.
3086 @end itemize
3087
3088 Because the MIDI dynamic levels to be applied to the notes that
3089 follow may change at @code{Voice} boundaries (and because this
3090 is not necessarily apparent from the typeset output) the
3091 following guidelines concerning the use of voices may help to
3092 keep in control of the MIDI dynamic levels when writing LilyPond
3093 input using multiple voices:
3094 @itemize
3095 @item
3096 Whenever instantiating a new @code{Voice}, make sure that its
3097 first note has an explicit dynamic mark attached to it. (The
3098 dynamic mark can be removed from the typeset output, for
3099 example, by temporarily omitting DynamicMark, see
3100 @ref{Visibility of objects}, or by using tags to create MIDI
3101 output separately from the typeset output, and applying the
3102 explicit dynamic only in this case, see @ref{Using tags}.)
3103
3104 @item
3105 Group the voices whose dynamic changes should apply to all of
3106 the voices into a context in which the individual voices appear
3107 as nested contexts, add a @code{Dynamic_performer} to this
3108 enclosing context, and then remove it from each @code{Voice} in
3109 the group. (A natural choice for this enclosing context could
3110 be the voices' enclosing @code{Staff}, for example.) See
3111 @ref{Setting MIDI block properties} and
3112 @ref{Modifying context plug-ins} for examples and more
3113 information.
3114
3115 @item
3116 Arrange the LilyPond input to minimize the number of voices that
3117 need to be instantiated, to reduce the number of @code{Voice}
3118 boundaries at which MIDI dynamic handling would need special
3119 attention.
3120
3121 @end itemize
3122
3123 @seealso
3124 Notation Reference:
3125 @ref{Single-staff polyphony}.
3126
3127 Internals Reference:
3128 @rinternals{Dynamic_performer}.
3129
3020 3130
3021 @node Setting MIDI volume 3131 @node Setting MIDI volume
3022 @unnumberedsubsubsec Setting MIDI volume 3132 @unnumberedsubsubsec Setting MIDI volume
3023 3133
3024 The minimum and maximum overall volume of MIDI dynamic markings is 3134 The minimum and maximum overall volume of MIDI dynamic markings is
3025 controlled by setting the properties @code{midiMinimumVolume} and 3135 controlled by setting the properties @code{midiMinimumVolume} and
3026 @code{midiMaximumVolume} at the @code{Score} level. These properties 3136 @code{midiMaximumVolume} at the @code{Score} level. These properties
3027 have an effect only at the start of a voice and on dynamic marks. The 3137 have an effect only at the start of a voice and on dynamic marks. The
3028 fraction corresponding to each dynamic mark is modified with this 3138 fraction corresponding to each dynamic mark is modified with this
3029 formula 3139 formula
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
3675 3785
3676 3786
3677 @knownissues 3787 @knownissues
3678 3788
3679 Not all lilypond music events are supported by 3789 Not all lilypond music events are supported by
3680 @file{event-listener.ly}. It is intended to be a well-crafted 3790 @file{event-listener.ly}. It is intended to be a well-crafted
3681 @qq{proof of concept}. If some events that you want to see are 3791 @qq{proof of concept}. If some events that you want to see are
3682 not included, copy @file{event-listener.ly} into your lilypond 3792 not included, copy @file{event-listener.ly} into your lilypond
3683 directory and modify the file so that it outputs the information 3793 directory and modify the file so that it outputs the information
3684 you want. 3794 you want.
OLDNEW
« no previous file with comments | « no previous file | Documentation/notation/simultaneous.itely » ('j') | Documentation/notation/simultaneous.itely » ('J')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b