From: fred Date: Sun, 24 Mar 2002 19:51:57 +0000 (+0000) Subject: lilypond-0.0.44 X-Git-Tag: release/1.5.59~4223 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4ab283b963154c5d4b9837bd6920b68e95b0f1bf;p=lilypond.git lilypond-0.0.44 --- diff --git a/Documentation/lilyinput.pod b/Documentation/lilyinput.pod deleted file mode 100644 index 6fdedd2148..0000000000 --- a/Documentation/lilyinput.pod +++ /dev/null @@ -1,362 +0,0 @@ -=head1 NAME - -LilyInput - LilyPond input format -- Mudela 0.1 - -B this doc describes the I input format, S. - -=head1 DESCRIPTION - -This document describes the the LilyPond input format, which is an -effective language for definining music. We call this language -(rather arrogantly) The Musical Definition Language (S). - -The first aim of Mudela is to define a piece of music, -being complete from both from a musical typesetting, -as from a musical performing point of view. - -The design of Mudela has been (perfect past tense, hopefully) -an ongoing process, -the most important criteria being: - -=over 4 - -=item * - -define the (musical) message of the composer as unambiguously as possible, - -=item * - -be intuitive, and easily readable -(compared to, say, Musi*TeX input, or MIDI :-), - -=item * - -be writable in ASCII with a simple texteditor, yfte(TM). - -=back - -Other considerations were (and will be): - -=over 4 - -=item * - -be able to edit the layout -without danger of changing the original music (Urtext), - -=item * - -allow for adding different interpretations, again, -without danger of changing the original, - -=item * - -easy to create a conductor's score, -as well as the scores for all individual instruments, - -=item * - -provide simple musical manipulations, such as -S<(i) extracting> a slice of music from a previously defined piece, -S<(ii) extracting> only the rhythm from a piece of music, -S<(iii) transposing>, etc., - -=item * - -easy to comprehend to both programmers and others. - -=back - -Musical pieces could be - -=over 5 - -=item * - -Mahlerian orchestral scores, - -=item * - -piano pieces (Schubertian, Rachmaninovian), - -=item * - -pop songs (lyrics and chords), - -=item * - -gregorian chants, - -=item * - -Bach multivoice organ pieces, - -=item * - -short excerpts to be used in musicological publications. - -=back - - -=head1 Overview - -The Musical Definition Language (Mudela) S, -has a logical structure, -making use of typing and naming (using identifiers), -that allows for flexible input, and definition reuse. - -The below included for explanatory -purposes only (i.e., for a complete and up-to-date definition, see -F and F): - -=head2 Files - -The de-facto extension of Mudela is F<.ly>. Files may be included by -entering C at the start of a line: - - include "a_file.ly" - -=head2 Comments - -Line comments are introduced by a C<%> - -=head2 Words - -Keywords are preceded by a backslash "\". They contain alphabetic -characters only. - -Identifiers in their normal form consist start with a alpha character, -followed by alpha-numerics. Identifiers can contain any characters -(except whitespace, C<$> and C<%>), if you use this construct: - - $Id_with###@weird92chars = - -=head2 Nesting characters - -Mudela uses the brace (C<{> and C<}>) for hierarchical structures. To -aid the eye in reading, for chords the C<<> and the C<>> are used as -nesting braces. - -=head2 Identifiers - -=head2 Hierarchical structures - -The general structure consists of declarations: - - IDENTIFIER = \TYPE{ - - } - -and instantiations: - - \TYPE{ } - -(Currently, C<\score> is the only type that can be instantiated -at top level. Currently declarations can only be done at top level) - -Most instantiations that use an IDENTIFIER are specified as follows: - - \TYPE { IDENTIFIER [...] } - -Some exceptions on this rule have been made to prevent inputting -Mudela becoming tedious - - -=head2 Simple mudela - -The actual musical part of Mudela that defines a melody, is known as -I. - -Simple mudela is the most common type of music. It consists of a list -of notes or lyrics, chords, and commands. - -=head2 Modes: - -To simplify different aspects of music definition (entering the notes -and manipulating them) Mudela has a number of different input "modes": - -=over 4 - -=item Normal mode - -At the start of parsing, Mudela assumes normal mode. -In Normal mode, a word is looked up in the following order: - - word identifier, string - \word keyword, string - -In normalmode, a word is assumed to start with an alphabetic -character, followed by alpha-numeric characters. - -=item Note mode - -Note mode (and thus Simple mudela) is introduced by the keyword C<\music>. -In Note mode, a word is looked up in the following order: - - word identifier, string - \word keyword, string - -In Note mode a word is considered to have alphabetic characters only. - -=item Lyric mode - -Lyrics mode (and thus Simple mudela) is introduced by the keyword C<\lyrics>. - -In Lyrics mode, a word is looked up in the following order: - - word string - \word keyword, string - -In Lyric mode every sequence of non-digit and non-white characters -starting with an alphabetic character is considered a word. - -=back - -These modes are of a lexical nature. Normal and Note mode largely -resemble each other, save the possibility of entering Reals, and -meaning of C<_> - -=head2 Notes - -Simple mudela basically is a sequence of the notes you want to -enter. - - a'4 % dutch names - -is a A-1 pitched quaver. The ' as well as the ` signify an octave change. -A-1 is 440 Hz concert-pitch. C is also known as the central -c. More examples: - - `a % 110 - a % 220 - a' % 440 - a'' % 880 - -another example: - - `as4.*2/3 - -This is an A flat, (just below 110 Hz concert-pitch). The C<*2/3> -signifies that this note is part of a triplet (3 in stead of 2). The -duration is one and a half quaver (C<4.>) times 2/3. - -The default language for notenames is defined to be dutch, - - % double sharp - cisis disis eisis fisis gisis aisis bisis - % sharps - cis dis eis fis gis ais bis - % naturals - c d e f g a b - % flats - ces des es fes ges as bes - % double flats - ceses deses eses feses geses ases beses - -The standard notenames also have uppercase versions, which octavate -down: - - a % 220 - A % 110 - 'A % 55 - A' % 220 - Cisis - -The rest is named - - r - -These notenames along with duration is enough material to construct -simple melodies: - - c4 c4 g4 g4 a4 a4 g2 - f4 f4 e4 e4 d4 d4 c2 - -Music is able to express more. generally speaking, the other -'features' are either connected between notes (slurs, beams: spanning -requests) or attached to notes (eg. accents). The former are -implemented as START and STOP stop features and then attached to the note. - - [] START/STOP a beam - () START/STOP a slur - - -example: - - [c8 () d8 () e8 ] - -Please note that these two characters do I necessarrily nest, eg: - - [c8 e8(] [)g8 c'8] - - -Symbols which can be put at either side of a staff are entered as follows: - - a-^ % marcato, direction: default - a^- % portato, direction: above note - a_. % staccato, direction: below note - a^\script { "symbolindex" . . . } % see script.ini for details. - -Dynamics can be put after the notename: - - a4 \dynamic { 0 } % 0 = fff, 7 = ppp - -Mudela defines the following dynamic identifiers: - - ppp pp p mp mf df ff fff % df iso f, f is a notename. - -The general form of a note is: - - post-requests de-octavate notename octavate duration pre-requests - -Notenames are just identifiers, and can be declared for any -language appropriate (see F). - -=head2 Lyrics - -Lyrics in Mudela resemble Simple mudela a lot, with notes substituted -by text. - -All syllables are entered separately, separated by whitespace - - Twin-4 kle4 twin-4 kle4 ... - -Two syllables or words that compose a single -duration entry are bound together using an underscore - - He_could4 not4 - - - -=head2 Rhythms - -Rhythms in Mudela are entered identical to Simple mudela. -The melodic part of the information is ignored. - -=head1 STRUCTURE - -In concrete, a piece of Mudela has the following structure: - - % declare pieces of music: - melody = \music{ } - accompany = \music{ } - - % instantiate (=create tex, midi output) the score: - \score{ - \staff{ melody } - \staff{ accompany } - \commands{ } - \midi{ } - \paper{ , which contains declarations crucial -to proper operation of LilyPond (symbol tables, note names). diff --git a/flower/matdebug.cc b/flower/matdebug.cc deleted file mode 100644 index bcc2843bca..0000000000 --- a/flower/matdebug.cc +++ /dev/null @@ -1,63 +0,0 @@ -#include "dstream.hh" -#include "matrix.hh" - -static Dstream *dout = 0; - -/** - Set the debugging output. Will not delete/swallow argument. - */ -void set_matrix_debug(Dstream&ds) -{ - dout = &ds; -} - -Matrix::operator String() const -{ - String s; -#ifndef NPRINT - s="matrix {\n"; - for (int i=0; i< rows(); i++){ - for (int j = 0; j < cols(); j++) { - s+= String(dat->elem(i,j), "%6f "); - } - s+="\n"; - } - s+="}\n"; -#endif - return s; -} - - -void -Matrix::print() const -{ -#ifndef NPRINT - if (!dout) - return; - *dout << *this; -#endif -} - -Vector::operator String() const -{ - String s; -#ifndef NPRINT - s="vector ["; - for (int i=0; i < dim(); i++) { - s += String(dat[i], "%6f") + String(' '); - } - s+="]"; -#endif - return s; -} - - -void -Vector::print() const -{ -#ifndef NDEBUG - if (!dout) - return; - *dout << *this<<'\n'; -#endif -} diff --git a/lib/include/input-file.hh b/lib/include/input-file.hh deleted file mode 100644 index a01ea75076..0000000000 --- a/lib/include/input-file.hh +++ /dev/null @@ -1,28 +0,0 @@ -/* - input-file.hh -- declare Input_file - - source file of the LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys -*/ - -#ifndef INPUT_FILE_HH -#define INPUT_FILE_HH -#include -#include "proto.hh" -#include "fproto.hh" -#include "varray.hh" -#include "string.hh" - -struct Input_file { - istream* is; - char const* defined_ch_c_l_; - Source_file* sourcefile_l_; - int line; - String name; - - Input_file(String); - ~Input_file(); -}; - -#endif // INPUT_FILE_HH diff --git a/lib/input-file.cc b/lib/input-file.cc deleted file mode 100644 index a0f1018be6..0000000000 --- a/lib/input-file.cc +++ /dev/null @@ -1,47 +0,0 @@ -/* - input-file.cc -- implement Input_file - - source file of the LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys Jan Nieuwenhuizen -*/ - -#include -#include -#include "proto.hh" -#include "plist.hh" -#include "input-file.hh" -#include "debug.hh" -#include "source-file.hh" -#include "binary-source-file.hh" -#include "source.hh" - -Input_file::Input_file(String s) -{ - name = s; - line = 1; - String pf(s); - if ( pf == "" ) { - is = &cin; - defined_ch_c_l_ = 0; - sourcefile_l_ = 0; - } - else { - Source_file* sourcefile_p = 0; - // ugh, very dirty, need to go away - if ( ( pf.right_str( 3 ).lower_str() == "mid" ) || ( pf.right_str( 4 ).lower_str() == "midi" ) ) - sourcefile_p = new Binary_source_file( pf ); - else - sourcefile_p = new Source_file( pf ); - source_l_g->add( sourcefile_p ); - sourcefile_l_ = sourcefile_p; - is = sourcefile_l_->istream_l(); - defined_ch_c_l_ = sourcefile_l_->ch_c_l(); - } - cout << "[" << pf << flush; -} - -Input_file::~Input_file() -{ - cout << "]" << flush; -}