From b90fc006405c1e5245cdd66cf4ba1d36344a97ea Mon Sep 17 00:00:00 2001 From: Keith OHara Date: Mon, 28 Feb 2011 11:44:27 -0800 Subject: [PATCH] Add snippets to Doc../snippets/new Restore deprecated dodecaphonic- with deprecation markup Add manual convert-ly-ed engravers-one-by-one.ly with version bump --- ...entals-for-each-note-including-naturals.ly | 23 ++ .../snippets/new/engravers-one-by-one.ly | 273 ++++++++++++++++++ 2 files changed, 296 insertions(+) create mode 100644 Documentation/snippets/new/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly create mode 100644 Documentation/snippets/new/engravers-one-by-one.ly diff --git a/Documentation/snippets/new/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly b/Documentation/snippets/new/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly new file mode 100644 index 0000000000..fa91614d38 --- /dev/null +++ b/Documentation/snippets/new/dodecaphonic-style-accidentals-for-each-note-including-naturals.ly @@ -0,0 +1,23 @@ +\version "2.13.36" + +\header { + lsrtags = "pitches" + texidoc = " +In early 20th century works, starting with Schoenberg, Berg and Webern +(the @qq{Second} Viennese school), every pitch in the twelve-tone scale +has to be regarded as equal, without any hierarchy such as the +classical (tonal) degrees. Therefore, these composers print one +accidental for each note, even at natural pitches, to emphasize their +new approach to music theory and language. + +This snippet shows how to achieve such notation rules. + +" + doctitle = "Dodecaphonic-style accidentals for each note including naturals" +} + +\markup { + This snippet is deprecated as of version 2.12 and + will be removed from the documentation in 2.14. +} + diff --git a/Documentation/snippets/new/engravers-one-by-one.ly b/Documentation/snippets/new/engravers-one-by-one.ly new file mode 100644 index 0000000000..2b70a0d169 --- /dev/null +++ b/Documentation/snippets/new/engravers-one-by-one.ly @@ -0,0 +1,273 @@ +\version "2.13.52" + +\header { + lsrtags = "contexts-and-engravers" + + texidoc = " +The notation problem, creating a certain symbol, is handled by plugins. + Each plugin is called an Engraver. In this example, engravers are +switched on one by one, in the following order: + +- note heads, + + +- staff symbol, + + +- clef, + + +- stem, + + +- beams, slurs, accents, + + +- accidentals, bar lines, time signature and key signature. + + + +Engravers are grouped. For example, note heads, slurs, beams etc. form +a @code{Voice} context. Engravers for key signature, accidentals, bar +line, etc. form a @code{Staff} context. + +" + doctitle = "Engravers one-by-one" +} % begin verbatim + + +%% sample music +topVoice = \relative c' { + \key d \major + es8([ g] a[ fis]) + b4 + b16[-. b-. b-. cis-.] + d4-> +} + +botVoice = \relative c' { + \key d \major + c8[( f] b[ a)] + es4 + es16[-. es-. es-. fis-.] + b4-> +} + +hoom = \relative c { + \key d \major + \clef bass + g8-. r + r4 + fis8-. + r8 + r4 + b'4-> +} + +pah = \relative c' { + r8 b-. + r4 + r8 g8-. + r16 g-. r8 + \clef treble + fis'4-> +} + +% +% setup for Request->Element conversion. Guru-only +% + +MyStaff = \context { + \type "Engraver_group" + \name Staff + + \description "Handles clefs, bar lines, keys, accidentals. It can contain +@code{Voice} contexts." + + \consists "Output_property_engraver" + + \consists "Font_size_engraver" + + \consists "Volta_engraver" + \consists "Separating_line_group_engraver" + \consists "Dot_column_engraver" + + \consists "Ottava_spanner_engraver" + \consists "Rest_collision_engraver" + \consists "Piano_pedal_engraver" + \consists "Piano_pedal_align_engraver" + \consists "Instrument_name_engraver" + \consists "Grob_pq_engraver" + \consists "Forbid_line_break_engraver" + \consists "Axis_group_engraver" + + \consists "Pitch_squash_engraver" + + localKeySignature = #'() + + % explicitly set instrumentName, so we don't get + % weird effects when doing instrument names for + % piano staves + + instrumentName = #'() + shortInstrumentName = #'() + + \accepts "Voice" +} + + +MyVoice = \context { + \type "Engraver_group" + \name Voice + + \description " + Corresponds to a voice on a staff. This context handles the + conversion of dynamic signs, stems, beams, super- and subscripts, + slurs, ties, and rests. + + You have to instantiate this explicitly if you want to have + multiple voices on the same staff." + + localKeySignature = #'() + \consists "Font_size_engraver" + + % must come before all + \consists "Output_property_engraver" + \consists "Arpeggio_engraver" + \consists "Multi_measure_rest_engraver" + \consists "Text_spanner_engraver" + \consists "Grob_pq_engraver" + \consists "Note_head_line_engraver" + \consists "Glissando_engraver" + \consists "Ligature_bracket_engraver" + \consists "Breathing_sign_engraver" + % \consists "Rest_engraver" + \consists "Grace_beam_engraver" + \consists "New_fingering_engraver" + \consists "Chord_tremolo_engraver" + \consists "Percent_repeat_engraver" + \consists "Slash_repeat_engraver" + + %{ + Must come before text_engraver, but after note_column engraver. + %} + \consists "Text_engraver" + \consists "Dynamic_engraver" + \consists "Fingering_engraver" + + \consists "Script_column_engraver" + \consists "Rhythmic_column_engraver" + \consists "Cluster_spanner_engraver" + \consists "Tie_engraver" + \consists "Tie_engraver" + \consists "Tuplet_engraver" + \consists "Note_heads_engraver" + \consists "Rest_engraver" +} + + +\score { + \topVoice + \layout { + \context { \MyStaff } + \context { \MyVoice } + } +} + + +MyStaff = \context { + \MyStaff + \consists "Staff_symbol_engraver" +} + +\score { + \topVoice + \layout { + \context { \MyStaff } + \context { \MyVoice } + } +} + +MyStaff = \context { + \MyStaff + \consists "Clef_engraver" + \remove "Pitch_squash_engraver" +} + +\score { + \topVoice + \layout { + \context { \MyStaff } + \context { \MyVoice } + } +} + +MyVoice = \context { + \MyVoice + \consists "Stem_engraver" +} + +\score { + \topVoice + \layout { + \context { \MyStaff } + \context { \MyVoice } + } +} + +MyVoice = \context { + \MyVoice + \consists "Beam_engraver" +} + +\score { + \topVoice + \layout { + \context { \MyStaff } + \context { \MyVoice } + } +} + +MyVoice = \context { + \MyVoice + \consists "Phrasing_slur_engraver" + \consists "Slur_engraver" + \consists "Script_engraver" +} + + +\score { + \topVoice + \layout { + \context { \MyStaff } + \context { \MyVoice } + } +} + +MyStaff = \context { + \MyStaff + \consists "Bar_engraver" + \consists "Time_signature_engraver" +} + +\score { + \topVoice + \layout { + \context { \MyStaff } + \context { \MyVoice } + } +} + +MyStaff = \context { + \MyStaff + \consists "Accidental_engraver" + \consists "Key_engraver" +} +\score { + \topVoice + \layout { + \context { \MyStaff } + \context { \MyVoice } + } +} + -- 2.39.2