From b5563e041d1ab6af6ceaf0785759a76b39debe16 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 02:19:58 +0000 Subject: [PATCH] lilypond-1.5.21 --- input/bugs/RondoAllaTurca.ly | 225 ----------------------------------- lily/include/paper-stream.hh | 46 ------- lily/paper-stream.cc | 149 ----------------------- 3 files changed, 420 deletions(-) delete mode 100644 input/bugs/RondoAllaTurca.ly delete mode 100644 lily/include/paper-stream.hh delete mode 100644 lily/paper-stream.cc diff --git a/input/bugs/RondoAllaTurca.ly b/input/bugs/RondoAllaTurca.ly deleted file mode 100644 index 2e0299e49d..0000000000 --- a/input/bugs/RondoAllaTurca.ly +++ /dev/null @@ -1,225 +0,0 @@ -\include "paper20.ly" -\version "1.4.7" -\header { - title = "Rondo Alla Turca" - subtitle = "Turkish March" - composer = "W. A. Mozart" - piece = "\\quad \\quad \\quad \\quad \\quad Allegretto" - mutopiatitle = "Rondo Alla Turca" - mutopiacomposer = "W. A. Mozart (1756-1791)" - mutopiainstrument = "Piano" - style = "classical" - copyright = "Public Domain" - maintainer = "Rune Zedeler" - maintainerEmail = "rz@daimi.au.dk" - lastupdated = "2001/sep/15" - tagline = "\\parbox{\hsize}{\\thefooter\\quad\\small \\\\This music is part of the Mutopia project, \\texttt{http://www.mutopiaproject.org/}\\\\It has been typeset and placed in the public domain by " + \maintainer + " (" + \maintainerEmail + ").\\\\Unrestricted modification and redistribution is permitted and encouraged---copy this music and share it!}" -} - -volta = "volta" - -\include "deutsch.ly"; - -#(define (remove-scripts music) - (let* ((es (ly-get-mus-property music 'elements)) - (e (ly-get-mus-property music 'element)) - (body (ly-get-mus-property music 'body)) - (alts (ly-get-mus-property music 'alternatives))) - - (if (pair? es) - (begin - (ly-set-mus-property - music 'elements - (map (lambda (x) (remove-scripts x)) es)) - (let recurse ((elts (ly-get-mus-property music 'elements))) - (if (and (pair? elts) (pair? (cdr elts))) - (let ((name (ly-music-name (cadr elts)))) - (if (or (equal? name "Articulation_req") (equal? name "Text_script_req")) - (begin - (set-cdr! elts (cddr elts)) - (recurse elts)) - (recurse (cdr elts)))))))) - - (if (music? alts) - (ly-set-mus-property - music 'alternatives - (remove-scripts alts))) - - (if (music? body) - (ly-set-mus-property - music 'body - (remove-scripts body))) - - (if (music? e) - (ly-set-mus-property - music 'element - (remove-scripts e))) - music)) - -righta = \notes \transpose c''' { - \scriptUp - \property Staff.Fingering \override #'direction = #1 - \partial 4 h,16-4-\p( a, gis, a,-1 | )c8-3 r d16-4( c h, c-1 | )e8-3 r f16-4( e dis e-1 | h-4 a gis a h a gis a | )c'4-\accent - a8-.-3 c'-.-5 | \grace {[g!32( )a]} h8-.-5-\sfz | \grace {[g32( )a]} h8-.-\sfz | \grace {[g32( )a]} h8-.-\sfz e4-- -} -rightaa = \notes \transpose c''' { - \partial 4 h,16-4-\p( a, gis, a,-1 | )c8-3 r d16-4( c h, c-1 | )e8-3 r f16-4( e dis e-1 | h-4 a gis a h \< a gis a | \! )c'4-\accent - a8-.-3 h-. | c'-.-\accent \> h-. a-.-1 \! gis-.-2 a-. e-. f-.-4 d-.-2 | c4-- h,8.-2-\trill( a,32 h, | )a,4-- -} - -rightb = \notes \transpose c''' { - [ ] | a16-4( g f )e | \stemUp \stemBoth - | a16-4( g f )e | - | f16-4( e d )c | \stemUp \stemBoth - | f16( e d )c | -} - -rightca = \notes \context Voice = voicea \relative c''' { a8-.-\f h-. | cis4-\accent a8-. h-. cis-.-\accent h-. a-. gis-. | fis-. gis-. a-. h-. gis-4( )e-. -a8-. h-. | cis4-\accent a8-. h cis-.-\accent h-. a-. gis-. | fis-. h-. gis-. e-. a4 -} -rightc = \notes < \apply #remove-scripts \rightca \transpose c \rightca > -rightco = \notes \relative c'' -{ \stemDown - a16-\f( a' h, h' | cis,-\accent )cis' r8 a,16( a' h, h' cis, cis' h, h' a, a' gis, )gis' | fis,( fis' gis, gis' a, a' h, h' gis, gis' e, )e' - a,16( a' h, h' | cis,-\accent )cis' r8 a,16( a' h, h' cis, cis' h, h' a, a' gis, )gis' | fis,( fis' h, h' gis, gis' e, e' -} -rightcoa = \notes \context Voice < )a'4 a'' > - -rightd = \notes \relative c''' { - cis16-3-\p( d cis h a h a gis-3 fis-2 a gis fis | eis fis gis eis cis-2 dis eis cis-1 | fis-4 eis-1 fis gis a gis a-1 h | cis his cis his - cis d cis )h | a( h a gis-3 fis a gis fis | e fis gis e cis-2 dis e cis | dis-3 e fis dis his-1 cis dis his | )cis4 -} -righte = \notes \relative c''' { - e,16-5(-\f d! cis h! | a h cis d-1 e fis gis a | )a-\accent-4( gis fis )e e-5( d cis h | )a-1( h cis d-1 e fis gis a ais8-\accent-3 )h-.-4 - e,16-5( d cis h | a h cis d-1 e fis gis a | )a-\accent-4( gis fis )e e-5( d cis h | cis-3 e a,-1 cis-4 h d gis,-2 h | )a4-- - cis'16-3-\p( d cis h a h a gis-3 fis-2 a gis fis | eis fis gis eis cis-2 dis eis )cis-1 | fis-4( \< eis-1 fis gis a gis a-1 \! h | cis his cis his - cis his cis ais-2 | )d-4( \> cis d cis d cis d cis | d cis h a gis-2 a h \! gis | a-\p h cis fis,-2 eis fis gis eis )fis4-- -} - -strum = \notes \transpose c' { < - \context Voice = strumUp {\stemUp cis'2-\arpeggio-\accent} - \context Voice = strumDown {\stemDown < cis4-\arpeggio e a> } -> -\stemBoth -} - -rightf = \notes \transpose c''' { - < {\stemUp cis'8. cis'16} \context Voice = another {\stemDown cis4} > - \strum \strum d'16-4( )cis'-. h-. cis'-. d'( )cis'-. h-. cis' - \repeat unfold 4 { \grace{d'8( } < )cis'8-. a e> } | < {\stemUp \slurUp h4.-3()e'8-. \stemBoth} \context Voice = another > - \strum \strum d'16-4( )cis'-. h-. cis'-. d'( )cis'-. h-. cis' \grace{d'8( } < )cis'2-. a e> - \repeat unfold 4 { \grace{cis'8( } < )h8-. gis e> } - - a4-\p-- \grace {[e32()a]} cis'8.-.-4 cis'16 \repeat unfold 2 { \grace {[e32()a]} cis'2-\accent } | - d'16-4( )cis'-. h-. cis'-. d'( )cis'-. h-. cis' | d'2-\accent | \repeat unfold 4 { \grace{d'8( } ) cis'8-. } h4.-2()e'8-. - <\strum s2-\f> \strum d'16-4( )cis'-. h-. cis'-. d'( )cis'-. h-. cis' \grace{d'8( } < )cis'2-. a e> - \repeat unfold 4 { \grace{cis'8( } < )h8-. gis e> } - - <) a,4-. cis e a-. > r4 -} - - -lefta = \notes { - \partial 4 r4 | a8-5( <)c' e'-.> | a8( <)c' e'-.> | a8-. a8-. | a8( <)c' e'-.> | - e-. | e-. | e-. h, h | e4-- -} -leftaa = \notes { \partial 4 - r4 | a8-5( <)c' e'-.> | a8( <)c' e'-.> | a8-. a8-. | f8( <)a dis'-.> | - e-. d!-. c-. d-. -} -leftb = \notes { \partial 4 - \repeat unfold 2 {r4 | c8-. c'-. e-. e'-. | g4 } - \repeat unfold 2 {r4 | a,8-. a-. c-. c'-. | e4 } -} - -stra = \notes { \grace {[a,32( cis )e]} a8-. a-. } -strd = \notes { \grace {[d,32( fis, )a,]} d8-. d-. } -strdis = \notes { \grace {[dis,32( fis, )a,]} dis8-. dis-. } -stre = \notes { \grace {[e,32( gis, )h,]} e8-. e-. } -stral = \notes { \stra a8-. a-. } -strdl = \notes { \strd d8-. d-. } -strel = \notes { \stre e8-. e-. } - -leftc = \notes { \partial 4 - r4 \stral \stral \strd \strdis \strel \stral \stral \strd \stre -} - -leftd = \notes \relative c { \partial 4 - r4 | fis8-5( <)a cis-.> | - gis8-4( <)h cis-.> | - fis8( <)a cis-.> | - eis8( <)gis cis-.> | - fis8( <)a cis-.> | - gis8( <)cis e-.> | - gis8( <)dis' fis-.> | - -} - -lefte = \notes \relative c' { \partial 4 - r4 | a8( <)cis e-.> | - h-. gis,-. | - a8( <)cis e-.> | - e,8( <)gis d'-.> | - a8( <)cis e-.> | - h-. gis,-. | - a-. fis-. d-. e-. a,-. a'-. r4 | - - fis8( <)a cis-.> | - gis8( <)h cis-.> | - fis8( <)a cis-.> | - cis,( <)gis' cis-.> | - h,8( <)fis' h-.> | - h,8( <)gis'! h-.> | - cis,-. cis-. -} - -leftf = \notes { - a8-. a8-. \stral \stral \stral \strdl \stral \strel \stral \stral \stral \strdl \stral \strel - a16( e' cis' e' a e' cis' )e' \repeat unfold 6 { a16 e' cis' e' } \repeat unfold 2 { a16 fis' d' fis' } \repeat unfold 2 { a16 e' cis' e' } \repeat unfold 2 { e16 e' gis e' } - \stral \stral \stral \strdl \stral \strel \stral \stral \stral \stra \stra a,4-. < )a, cis e a-. > r4 -} - -global = \notes {\time 2/4 } - -right = \notes { - \global \clef G \repeat \volta 2 \righta \repeat \volta 2 {\rightb \rightaa } \key a \major \repeat \volta 2 \rightc - \repeat \volta 2 \rightd \repeat \volta 2 \righte \repeat \volta 2 \rightc - \key a \minor \repeat \volta 2 \righta \repeat \volta 2 {\rightb \rightaa } \key a \major \repeat \volta 2 \rightco \alternative { \rightcoa {\partial 4 \rightcoa } } - \rightf \bar "|." -} - -left = \notes { - \global \clef F \repeat \volta 2 \lefta \repeat \volta 2 { \leftb \leftaa } \key a \major \repeat \volta 2 { \leftc a,4 } - \repeat \volta 2 \leftd \repeat \volta 2 \lefte \repeat \volta 2 { \leftc a,4 } - \key a \minor \repeat \volta 2 \lefta \repeat \volta 2 { \leftb \leftaa } \key a \major \repeat \volta 2 \leftc \alternative { a,4 {\partial 2 \stra} } - \leftf \bar "|." -} - - -\score { \notes - \context GrandStaff < - \property GrandStaff.connectArpeggios = ##t - \context Staff = up { - \right - } - \context Staff = down { - \property Staff.VoltaBracket = \turnOff - \left - } - > - \paper { - \translator { - \GraceContext - Slur \override #'direction = #-1 - } - \translator { - \ScoreContext - SpacingSpanner \override #'arithmetic-basicspace = #1.8 - GraceAlignment \override #'horizontal-space = #-0.4 - PaperColumn \override #'before-grace-spacing-factor = #1.0 - - } - interscoreline = 6.0 \pt - - } -} diff --git a/lily/include/paper-stream.hh b/lily/include/paper-stream.hh deleted file mode 100644 index 0864b408dd..0000000000 --- a/lily/include/paper-stream.hh +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef PAPER_STREAM_HH -#define PAPER_STREAM_HH - -#include "string.hh" - -/** Paper output - Baseclass for writing to a PostScript or TeX file. - It counts braces to prevent nesting errors, and - it will add a comment sign before each newline. - */ - -class Paper_stream -{ -public: - String basename_; - bool outputting_comment_b_; - ostream *os_; - int nest_level; - /// to check linelen in output. TeX has limits. - int line_len_i_; - - /// open a file for writing - Paper_stream (String filename); - - /// delegate conversion to scalar class - Paper_stream &operator << (String); - - /// close the file - ~Paper_stream (); - -private: - Paper_stream (Paper_stream const&); - void break_line (); -}; - -#include /* gcc 3.0 */ -#if __GNUC__ > 2 -ostream *open_file_stream (String filename, - std::ios_base::openmode mode=std::ios::out); -#else -ostream *open_file_stream (String filename, int mode=ios::out); -#endif -void close_file_stream (ostream *os); - - -#endif // PAPER_STREAM_HH diff --git a/lily/paper-stream.cc b/lily/paper-stream.cc deleted file mode 100644 index d2bbeb3f9c..0000000000 --- a/lily/paper-stream.cc +++ /dev/null @@ -1,149 +0,0 @@ -/* - paper-stream.cc -- implement Paper_stream - - source file of the GNU LilyPond music typesetter - - (c) 1997--2001 Han-Wen Nienhuys -*/ - -#include -#include -#include - -#include "config.h" -#if HAVE_SYS_STAT_H -#include -#endif - -#include "main.hh" -#include "paper-stream.hh" -#include "file-path.hh" -#include "debug.hh" - -const int MAXLINELEN = 200; - -#if __GNUC__ > 2 -ostream * -open_file_stream (String filename, std::ios_base::openmode mode) -#else -ostream * -open_file_stream (String filename, int mode) -#endif -{ - ostream *os; - if ((filename == "-")) - os = &cout; - else - { - Path p = split_path (filename); - if (!p.dir.empty_b ()) - if (mkdir (p.dir.ch_C (), 0777) == -1 && errno != EEXIST) - error (_f ("can't create directory: `%s'", p.dir)); - os = new ofstream (filename.ch_C (), mode); - } - if (!*os) - error (_f ("can't open file: `%s'", filename)); - return os; -} - -void -close_file_stream (ostream *os) -{ - *os << flush; - if (!*os) - { - warning (_ ("Error syncing file (disk full?)")); - exit_status_global = 1; - } - if (os != &cout) - delete os; - os = 0; -} - -Paper_stream::Paper_stream (String filename) -{ - os_ = open_file_stream (filename); - nest_level = 0; - line_len_i_ = 0; - outputting_comment_b_=false; -} - -Paper_stream::~Paper_stream () -{ - close_file_stream (os_); - if (nest_level != 0) - programming_error ("Brace nesting in paper output doesn't match"); -} - -// print string. don't forget indent. -Paper_stream& -Paper_stream::operator << (String s) -{ - for (char const *cp = s.ch_C (); *cp; cp++) - { - if (outputting_comment_b_) - { - *os_ << *cp; - if (*cp == '\n') - { - outputting_comment_b_=false; - line_len_i_ =0; - } - continue; - } - line_len_i_ ++; - switch (*cp) - { - case '%': - outputting_comment_b_ = true; - *os_ << *cp; - break; - case '{': - nest_level++; - *os_ << *cp; - break; - case '}': - nest_level--; - *os_ << *cp; - - if (nest_level < 0) - { - delete os_; // we want to see the remains. - assert (nest_level>=0); - } - - /* don't break line if not nested; very ugly for ps */ - if (nest_level == 0) - break; - - *os_ << '%'; - break_line (); - break; - case '\n': - break_line (); - break; - case ' ': - *os_ << ' '; - if (line_len_i_ > MAXLINELEN) - break_line (); - - break; - default: - *os_ << *cp; - break; - } - } - //urg, for debugging only!! - *os_ << flush; - return *this; -} - -void -Paper_stream::break_line () -{ - *os_ << '\n'; - *os_ << to_str (' ', nest_level); - outputting_comment_b_ = false; - line_len_i_ = 0; -} - -- 2.39.5