From 9fb88d14b1832284e92a89977274e32fc1d58a9e Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Mon, 19 Oct 2009 21:15:24 +0100 Subject: [PATCH] Web: add orchestra example, thanks Hu Haipeng! --- Documentation/general/examples/orchestra.ly | 600 +++++++++++++++++++ Documentation/general/examples/orchestral.ly | 5 - 2 files changed, 600 insertions(+), 5 deletions(-) create mode 100644 Documentation/general/examples/orchestra.ly delete mode 100644 Documentation/general/examples/orchestral.ly diff --git a/Documentation/general/examples/orchestra.ly b/Documentation/general/examples/orchestra.ly new file mode 100644 index 0000000000..84463d9e4a --- /dev/null +++ b/Documentation/general/examples/orchestra.ly @@ -0,0 +1,600 @@ +\version "2.13.4" + +\header { + tagline = ##f + title = "Violent Dance For Orchestra" + composer = "Hu Haipeng" +% arranger = "July 5, 2009" + +% poet = " I'm writing this piece because I'm terribly frustrated, facing a task which will seriously stain my aesthetics and conviction to the true art. It consists of all kinds of devils, dancing and whirling violently, turning the world into an abyss of darkness. Although the main melodies are derived from folk music, these are only a beautiful skin, and the essence of this piece is violent and evil, full of my 10 years' pain and rage. It's a large volcano of my long repressed heart!" +} + +\paper{ + line-width = 158\mm +} + +%% markups +#(define-markup-list-command (paragraph layout props args) (markup-list?) + (let ((indent (chain-assoc-get 'par-indent props 2))) + (interpret-markup-list layout props + (make-justified-lines-markup-list (cons (make-hspace-markup indent) + args))))) + +#(define-markup-command (vspace layout props amount) (number?) + "This produces a invisible object taking vertical space." + (let ((amount (* amount 3.0))) + (if (> amount 0) + (ly:make-stencil "" (cons -1 1) (cons 0 amount)) + (ly:make-stencil "" (cons -1 1) (cons amount amount))))) + +%% text defs +presto = \markup { \bold \italic "Presto" } +div = \markup { \bold "Div." } +nondiv = \markup { \bold "Non div." } +unis = \markup { \bold "Unis." } +piz = \markup { \bold "Pizz." } +arc = \markup { \bold "Arco" } +pizz = \set Staff.midiInstrument = "pizzicato strings" +arco = \set Staff.midiInstrument = "string ensemble 1" +pont = \markup { \bold \italic "Sul ponticello" } +naturale = \markup { \bold \italic "Naturale" } +moltocr = { + \set crescendoText = \markup { \italic "Molto cresc." } + \set crescendoSpanner = #'text + \override DynamicTextSpanner #'style = #'dotted-line +} +offCr = { + \unset crescendoText + \unset crescendoSpanner + \revert DynamicTextSpanner #'style +} + +%% Layout to produce piano dynamics context +\layout { + \context { + \type "Engraver_group" + \name Dynamics + \alias Voice + \consists "Output_property_engraver" + \consists "Skip_event_swallow_translator" + \consists "Axis_group_engraver" + \consists "Piano_pedal_engraver" + pedalSustainStrings = #'("Ped." "*Ped." "*") + pedalUnaCordaStrings = #'("una corda" "" "tre corde") + \consists "Script_engraver" + \consists "New_dynamic_engraver" + \consists "Dynamic_align_engraver" + \consists "Text_engraver" + \consists "Text_spanner_engraver" + \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1) + \override DynamicLineSpanner #'Y-offset = #0 + \override TextScript #'font-size = #2 + \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER + \override TextScript #'font-shape = #'italic + \override TextSpanner #'breakable = ##t + \override DynamicLineSpanner #'breakable = ##t + \override DynamicTextSpanner #'breakable = ##t + } + \context { + \PianoStaff + \accepts "Dynamics" + } + \context { + \Voice + \override Glissando #'breakable = ##t + \override TextSpanner #'breakable = ##t + \override DynamicLineSpanner #'breakable = ##t + \override DynamicTextSpanner #'breakable = ##t + \override TrillSpanner #'breakable = ##t + } +} + +%% layout to create orchestra staff group +%% with non-spanned barlines between two instrument groups +\layout { + \context { + \StaffGroup + \name Orchestra + \remove "Span_bar_engraver" + } + \context { + \Score + \accepts Orchestra + } +} + +%% Layout to produce SquareStaff context +%% to group similar instruments in a staff group with thin square bracket +\layout { + \context { + \StaffGroup + \name SquareStaff + systemStartDelimiter = #'SystemStartSquare + } + \context { + \Orchestra + \accepts SquareStaff + } + \context { + \StaffGroup + \accepts SquareStaff + } +} + +%% Layout to produce MarkLine context +%% to place rehearsal marks and texts above full score +\layout { + \context { + \type "Engraver_group" + \name "MarkLine" + \consists "Output_property_engraver" + \consists "Axis_group_engraver" + \consists "Mark_engraver" + \consists "Metronome_mark_engraver" + \consists "Script_engraver" + \consists "Text_engraver" + \consists "Text_spanner_engraver" + \consists "Font_size_engraver" + \override VerticalAxisGroup #'minimum-Y-extent = #'(-2 . 2 ) + \override TextSpanner #'breakable = ##t + } + \context { + \Score + \accepts "MarkLine" + } + \context { + \Orchestra + \accepts "MarkLine" + } + \context { + \StaffGroup + \accepts "MarkLine" + } +} + +%% layout to produce a smaller markline +%% put before 1st violin part +\layout { + \context { + \MarkLine + \name "SmallMarkLine" + \override MetronomeMark #'outside-staff-priority = #800 + \override RehearsalMark #'outside-staff-priority = #1200 + } + \context { + \Score + \accepts SmallMarkLine + } + \context { + \Orchestra + \accepts SmallMarkLine + } + \context { + \StaffGroup + \accepts SmallMarkLine + } +} + +modern = +#`(Staff ,(make-accidental-rule 'same-octave 0) + ,(make-accidental-rule 'any-octave 0) + ,(make-accidental-rule 'same-octave 1)) + +\layout { + \context { + \Score + autoAccidentals = #modern + autoCautionaries = #modern + } +} + + marks = \relative c' { + \set markFormatter = #format-mark-box-numbers + \tempo \presto 4.=112 +\set Score.currentBarNumber = #11 + s2.*4 | + s1*9/8 | + } + + piccolo = \relative c'''' { + \clef treble \key ees \minor \time 6/8 + \transposition c'' + R2. + ges,16(\mf\< ees c ees ges bes) c( bes ges bes c ees) | + ges8-.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + R1*9/8 | + } + + flutes = \relative c'''' { + \clef treble \key ees \minor \time 6/8 + R2. + 16(\mf\< ) ( ) | + 8-.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + R1*9/8 | + } + + oboes = \relative c''' { + \clef treble \key ees \minor \time 6/8 + R2. | + 4(\mf\< 8 4 8) | + -.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + R1*9/8 | + } + + clarinets = \relative c' { + \clef treble \key f \minor \time 6/8 + \transposition bes + 4(\p\< 8) 4( 8) | + 4( 8) 4( 8) | + -.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + R1*9/8 | + } + + bassoons = \relative c, { + \clef bass \key ees \minor \time 6/8 + 4.\pp\< c'^"a2" | + bes8-. bes-. bes-. ges-. ges-. ges-. | + ees-.->\!\ff \offCr 4\pp ~ 4. ~ | 2. | + \time 9/8 + ges4\p^"I" aes8 aes ees ges ges4 aes16( ges) | + } + + hornI = \relative c'' { + \clef treble \key bes \minor \time 6/8 + \transposition f + r4 r8 4.\p\< ~ | + 8-. -. -. -. -. -. | + -.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + r4 r8 2.\pp | + } + + hornII = \relative c'' { + \clef treble \key bes \minor \time 6/8 + \transposition f + \moltocr 2.\pp\< ~ | + 8-. -. -. -. -. -. | + -.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + 2.\pp 4. ~ | + } + + trumpetI = \relative c''' { + \clef treble \key f \minor \time 6/8 + \transposition bes +R2. | + r4 r8 -.\f\< -. -. | + -.->\!\ff r r r4 r8 | R2. | + \time 9/8 + R1*9/8 | + } + + trumpetII = \relative c'' { + \clef treble \key f \minor \time 6/8 + \transposition bes +R2. | + r8 d-.\mf\< d-. d-. d-. d-. | + d-.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + R1*9/8 | + } + + trombones = \relative c' { + \clef tenor \key ees \minor \time 6/8 + r4 r8 4.\mp\< ~ | + 8-. -. -. -. -. -. | + -.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + R1*9/8 | + } + + tuba = \relative c,, { + \clef bass \key ees \minor \time 6/8 + 4.(\pp\< | + 8-.) -. -. -. -. -. | + -.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + R1*9/8 | + } + + timpani = \relative c { + \clef bass \key ees \minor \time 6/8 + ees8\< ees ees ees ees ees | + bes bes bes bes bes bes | + ees,->\!\f \offCr ees'\pp ees ees ees ees | + ees ees ees ees ees ees | + \time 9/8 + ees r r r4 r8 r4 r8 | + } + + trian = \relative c' { + \clef percussion \time 6/8 + R2.*4 | + \time 9/8 + R1*9/8 | + } + + cym = \relative c' { + \clef percussion \time 6/8 + R2.*4 | + \time 9/8 + R1*9/8 | + } + + tamt = \relative c' { + \clef percussion \time 6/8 +R2. | + r4 r8 r c4\mf\<^"*" ~ | + c8\!\ff r r r4 r8 | R2. | + \time 9/8 + R1*9/8 | + } + + tamb = \relative c' { + \clef percussion \time 6/8 + R2.*4 | + \time 9/8 + R1*9/8 | + } + + snare = \relative c' { + \clef percussion \time 6/8 + R2.*4 | + \time 9/8 + c8\pp c c c c c c c c | + } + + bsdrum = \relative c' { + \clef percussion \time 6/8 + c2.:32\pp\< ~ | c: ~ | + c8\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + c2.:32\pp ~ c4.: | + } + + harprh = \relative c'' { + \clef treble \key ees \minor \time 6/8 + \showStaffSwitch + R2.*4_\markup { \harp-pedal #"--^|^^^^" } | + \time 9/8 + R1*9/8 | + } + + harplh = \relative c { + \clef bass \key ees \minor + \showStaffSwitch + R2.*4 | + R1*9/8 | + } + + dynamics = { + s2.*4 | + s1*9/8 | + } + + + violinI = \relative c'''' { + \clef treble \key ees \minor \time 6/8 + ges,,16(\pp\< ees c ees ges bes) c( bes ges bes c ees) | + ges( ees c ees ges bes) c( bes ges bes c ees) | + ges8-.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + R1*9/8 | + } + + violinII = \relative c''' { + \clef treble \key ees \minor \time 6/8 + c,,16(\pp\< bes ges bes c ees) ges( ees c ees ges bes) | + c( bes ges bes c ees) ges( ees c ees ges bes) | + c8-.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + r4 r8 \repeat tremolo 6 { c,,32->\pp^\pont e } r4 r8 | + } + + viola = \relative c { + \clef alto \key ees \minor \time 6/8 + 8-.\pp\< -. -. -. -. -. | + -. -. -. -. -. -. | + -.->\!\ff \offCr r r r4 r8 | R2. | + \time 9/8 + \repeat tremolo 12 { ges,32->^\pont bes } \repeat tremolo 6 {ges->( bes) } | + } + + cello = \relative c { + \clef bass \key ees \minor \time 6/8 + 8-.\pp\< -. -. -. -. -. | + -. -. -. -. -. -. | + 8-.->\!\ff \offCr -.\pp -. -. -. -. | + -. r r r4 r8 | + \time 9/8 + \repeat tremolo 12 32(^\pont \repeat tremolo 12 \repeat tremolo 12 ) | + } + + contrabass = \relative c { + \clef bass \key ees \minor \time 6/8 + \transposition c + 8-.\pp\< ees-. ees-. c-. c-. c-. | + bes-. bes-. ges-. ges-. ges-. ges-. | + ees-.->\!\ff \offCr -.\pp -. -. -. -. | + -. -. -. -. -. -. | + \time 9/8 + -. -. -. -. -. -. -. -. -. | + } + + #(set-global-staff-size 10) + + \score { + \new Orchestra = "orchestra" << + \set Score.skipBars = ##f + \new MarkLine { \marks } + \new StaffGroup = "woodwind" << + \new SquareStaff = "picc fl" << + \new Staff = "piccolo" { + \set Staff.instrumentName = "Piccolo" + \set Staff.shortInstrumentName = "Picc." + \piccolo + } + \new Staff = "flutes" { + \set Staff.instrumentName = "Flutes I & II" + \set Staff.shortInstrumentName = "Fl." + \flutes + } + >> + \new Staff = "oboes" { + \set Staff.instrumentName = "Oboes I & II" + \set Staff.shortInstrumentName = "Ob." + \oboes + } + \new Staff = "clarinets" { + \set Staff.instrumentName = \markup { + \column { \line { "Clarinets I & II" } + \line { "in B" \smaller \flat } } } + \set Staff.shortInstrumentName = "Cl." + \clarinets + } + \new Staff = "bassoons" { + \set Staff.instrumentName = "Bassoons I & II" + \set Staff.shortInstrumentName = "Bn." + \bassoons + } + >> + \new StaffGroup = "brass" << + \new SquareStaff = "horns" << + \new Staff = "hornsI" { + \set Staff.instrumentName = \markup { + \column { \line { "Horns I & II" } + \line { "in F" } } } + \set Staff.shortInstrumentName = "Hn. I & II" + \hornI + } + \new Staff = "hornsII" { + \set Staff.instrumentName = \markup { + \column { \line { "Horns III & IV" } + \line { "in F" } } } + \set Staff.shortInstrumentName = "Hn. III & IV" + \hornII + } + >> + \new SquareStaff = "trumpets" << + \new Staff = "trumpetI" { + \set Staff.instrumentName = \markup { + \column { \line { "Trumpets I & II" } + \line { "in B" \smaller \flat } } } + \set Staff.shortInstrumentName = "Tp. I & II" + \trumpetI + } + \new Staff = "trumpetII" { + \set Staff.instrumentName = \markup { + \column { \line { "Trumpet III" } + \line { "in B" \smaller \flat } } } + \set Staff.shortInstrumentName = "Tp. III" + \trumpetII + } + >> + \new SquareStaff = "trombones" << + \new Staff = "trombones 1 & 2" { + \set Staff.instrumentName = "Trombones I & II" + \set Staff.shortInstrumentName = "Tb. I & II" + \trombones + } + \new Staff = "tuba" { + \set Staff.instrumentName = "Bass trombone & Tuba" + \set Staff.shortInstrumentName = "Btb. & Tu." + \tuba + } + >> + >> + \new Staff = "timpani" { + \set Staff.instrumentName = "Timpani in A, D & E" + \set Staff.shortInstrumentName = "Tim." + \timpani + } + \new GrandStaff = "drums" << + \new RhythmicStaff = "triangle" { + \set RhythmicStaff.instrumentName = "Triangle" + \set RhythmicStaff.shortInstrumentName = "Tri." + \trian + } + \new RhythmicStaff = "cymbals" { + \set RhythmicStaff.instrumentName = "Suspended cymbal" + \set RhythmicStaff.shortInstrumentName = "Susp. cym." + \cym + } + \new RhythmicStaff = "tamtam" { + \set RhythmicStaff.instrumentName = "Tamtam" + \set RhythmicStaff.shortInstrumentName = "Tamt." + \tamt + } + \new RhythmicStaff = "tambourine" { + \set RhythmicStaff.instrumentName = "Tambourine" + \set RhythmicStaff.shortInstrumentName = "Tamb." + \tamb + } + \new RhythmicStaff = "snare" { + \set RhythmicStaff.instrumentName = "Snare drum" + \set RhythmicStaff.shortInstrumentName = "Sn." + \snare + } + \new RhythmicStaff = "bass drum" { + \set RhythmicStaff.instrumentName = "Bass drum" + \set RhythmicStaff.shortInstrumentName = "Bd." + \bsdrum + } + >> + \new PianoStaff = "harp" << + \set PianoStaff.instrumentName = "Harp" + \set PianoStaff.shortInstrumentName = "Hrp." + \set PianoStaff.connectArpeggios = ##t + \new Staff = "rh" { \harprh } + \new Dynamics { \dynamics } + \new Staff = "lh" { \harplh } + >> + \new SmallMarkLine { \marks } + \new StaffGroup = "strings" << + \new SquareStaff = "violins" << + \new Staff = "violin I" { + \set Staff.instrumentName = "Violin I" + \set Staff.shortInstrumentName = "Vn. I" + \violinI + } + \new Staff = "violin II" { + \set Staff.instrumentName = "Violin II" + \set Staff.shortInstrumentName = "Vn. II" + \violinII + } + >> + \new Staff = "viola" { + \set Staff.instrumentName = "Viola" + \set Staff.shortInstrumentName = "Vl." + \viola + } + \new SquareStaff = "Cello and Bass" << + \new Staff = "violoncello" { + \set Staff.instrumentName = "Violoncello" + \set Staff.shortInstrumentName = "Vc." + \cello + } + \new Staff = "contrabass" { + \set Staff.instrumentName = "Contrabass" + \set Staff.shortInstrumentName = "Cb." + \contrabass + } + >> + >> + >> + \layout { + \context { + \Score + \remove "Mark_engraver" + \remove "Metronome_mark_engraver" + } + \context { + \RemoveEmptyStaffContext + } + } + } + diff --git a/Documentation/general/examples/orchestral.ly b/Documentation/general/examples/orchestral.ly deleted file mode 100644 index 3666f6a8e5..0000000000 --- a/Documentation/general/examples/orchestral.ly +++ /dev/null @@ -1,5 +0,0 @@ -\version "2.12.0" -{ - c'4^"NO EXAMPLE HERE YET" -} - -- 2.39.5