help-gnu-music
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using \musicalpitch and \duration in a Score


From: Jan Nieuwenhuizen
Subject: Re: Using \musicalpitch and \duration in a Score
Date: 09 Jan 2001 10:47:42 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

Carl McTague <address@hidden> writes:

> I would like to input musical structures using the atomic expressions
>   \musicalpitch { octave note shift } and
>   \duration { length dotcount }
> in a score instead of using the shorthand modes.  Is that possible?

It should have been possible, but there's a bug.  This will be fixed
in 122, or you can use the patch below.  See input/test/explicit.ly


Jan.


Generated by address@hidden,
>From = lilypond-1.3.121.jcn1, To = lilypond-1.3.121.jcn2

usage 

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.3.121.jcn2.diff

Patches do not contain automatically generated files 
or (urg) empty directories, 
i.e., you should rerun autoconf, configure

diff -urN ../lilypond-1.3.121.jcn1/CHANGES ./CHANGES
--- ../lilypond-1.3.121.jcn1/CHANGES    Mon Jan  8 17:12:35 2001
+++ ./CHANGES   Tue Jan  9 09:59:08 2001
@@ -1,3 +1,14 @@
+1.3.121.jcn2
+============
+
+* Renamed last instances of musical_*pitch to pitch.
+
+* Bugfix: actually read pitch value in \pitch #(make-pitch ...)
+
+* Bugfix(?): always allow explicit duration entry.
+
+* Fixed .po charsets for upcoming msgfmt release (Bruno Haible).
+
 1.3.121.jcn1
 ============
 
diff -urN ../lilypond-1.3.121.jcn1/VERSION ./VERSION
--- ../lilypond-1.3.121.jcn1/VERSION    Mon Jan  8 12:08:00 2001
+++ ./VERSION   Mon Jan  8 20:49:04 2001
@@ -2,7 +2,7 @@
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=121
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff -urN ../lilypond-1.3.121.jcn1/input/test/explicit.ly 
./input/test/explicit.ly
--- ../lilypond-1.3.121.jcn1/input/test/explicit.ly     Thu Jan  1 01:00:00 1970
+++ ./input/test/explicit.ly    Tue Jan  9 10:45:36 2001
@@ -0,0 +1,10 @@
+\header{
+texidoc="Explicit pitches and durations.";
+}
+\score {
+  \notes {
+    \pitch #(make-pitch 0 0 0) \duration #(make-duration 1 0)
+    \pitch #(make-pitch 1 1 1) \duration #(make-duration 2 0)
+
+  }
+}
\ No newline at end of file
diff -urN ../lilypond-1.3.121.jcn1/lily/duration.cc ./lily/duration.cc
--- ../lilypond-1.3.121.jcn1/lily/duration.cc   Tue Nov 28 01:36:56 2000
+++ ./lily/duration.cc  Tue Jan  9 10:44:39 2001
@@ -129,7 +129,6 @@
     return SCM_BOOL_F;
 }
 
-
 static SCM
 make_duration (SCM l, SCM d)
 {
diff -urN ../lilypond-1.3.121.jcn1/lily/my-lily-lexer.cc ./lily/my-lily-lexer.cc
--- ../lilypond-1.3.121.jcn1/lily/my-lily-lexer.cc      Sun Dec 17 18:54:33 2000
+++ ./lily/my-lily-lexer.cc     Tue Jan  9 09:32:37 2001
@@ -56,7 +56,7 @@
   {"lyrics", LYRICS},
   {"key", KEY},
   {"mark", MARK},
-  {"musicalpitch", MUSICAL_PITCH},
+  {"pitch", PITCH},
   {"time", TIME_T},
   {"times", TIMES},
   {"midi", MIDI},
diff -urN ../lilypond-1.3.121.jcn1/lily/parser.yy ./lily/parser.yy
--- ../lilypond-1.3.121.jcn1/lily/parser.yy     Tue Dec 19 23:49:42 2000
+++ ./lily/parser.yy    Tue Jan  9 09:58:10 2001
@@ -170,7 +170,7 @@
 %token MEASURES
 %token MIDI
 %token MM_T
-%token MUSICAL_PITCH
+%token PITCH
 %token NAME
 %token PITCHNAMES
 %token NOTES
@@ -245,8 +245,8 @@
        
 %type <reqvec>  pre_requests post_requests
 %type <request> gen_text_def
-%type <scm>   steno_musical_pitch musical_pitch absolute_musical_pitch
-%type <scm>   steno_tonic_pitch
+%type <scm>   steno_pitch pitch absolute_pitch
+%type <scm>   explicit_pitch steno_tonic_pitch
 
 %type <scm>    chord_additions chord_subtractions chord_notes chord_step
 %type <music>  chord
@@ -820,7 +820,7 @@
        | Repeated_music                { $$ = $1; }
        | Simultaneous_music            { $$ = $1; }
        | Sequential_music              { $$ = $1; }
-       | TRANSPOSE musical_pitch Music {
+       | TRANSPOSE pitch Music {
                $$ = new Transposed_music (SCM_EOL);
                Music *p = $3;
                Pitch pit = *unsmob_pitch ($2);
@@ -874,7 +874,7 @@
        ;
 
 relative_music:
-       RELATIVE absolute_musical_pitch Music {
+       RELATIVE absolute_pitch Music {
                Music * p = $3;
                Pitch pit = *unsmob_pitch ($2);
                $$ = new Relative_octave_music (SCM_EOL);
@@ -1297,7 +1297,7 @@
        }
        ;
 
-steno_musical_pitch:
+steno_pitch:
        NOTENAME_PITCH  {
                $$ = $1;
        }
@@ -1337,15 +1337,22 @@
        }
        ;
 
-musical_pitch:
-       steno_musical_pitch {
+pitch:
+       steno_pitch {
                $$ = $1;
        }
-       | MUSICAL_PITCH embedded_scm {
-               if (!unsmob_pitch ($2))
+       | explicit_pitch {
+               $$ = $1;
+       }
+       ;
+
+explicit_pitch:
+       PITCH embedded_scm {
+               $$ = $2;
+               if (!unsmob_pitch ($2)) {
                        THIS->parser_error (_f ("Expecting musical-pitch 
value", 3));
-                Pitch m;
-               $$ = m.smobbed_copy ();
+                        $$ = Pitch ().smobbed_copy ();
+               }
        }
        ;
 
@@ -1483,8 +1490,8 @@
        }
        ;
 
-absolute_musical_pitch:
-       steno_musical_pitch     {
+absolute_pitch:
+       steno_pitch     {
                $$ = $1;
        }
        ;
@@ -1493,6 +1500,9 @@
        steno_duration {
                $$ = $1;
        }
+       | explicit_duration {
+               $$ = $1;
+       }       
        | duration_length '*' bare_unsigned {
                $$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy ();
        }
@@ -1514,6 +1524,9 @@
        | entered_notemode_duration {
                $$ = $1;
        }
+       | explicit_duration {
+               $$ = $1;
+       }       
        ;
 
 steno_duration:
@@ -1556,7 +1569,7 @@
 
 
 simple_element:
-       musical_pitch exclamations questions optional_notemode_duration {
+       pitch exclamations questions optional_notemode_duration {
                if (!THIS->lexer_p_->note_state_b ())
                        THIS->parser_error (_ ("Have to be in Note mode for 
notes"));
 
diff -urN ../lilypond-1.3.121.jcn1/po/de.po ./po/de.po
--- ../lilypond-1.3.121.jcn1/po/de.po   Sun Dec 17 16:32:08 2000
+++ ./po/de.po  Tue Jan  9 09:03:53 2001
@@ -10,7 +10,7 @@
 "Last-Translator: Erwin Dieterich <address@hidden>\n"
 "Language-Team: LANGUAGE <address@hidden>\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: ENCODING\n"
 
 #: data-file.cc:54
diff -urN ../lilypond-1.3.121.jcn1/po/it.po ./po/it.po
--- ../lilypond-1.3.121.jcn1/po/it.po   Sun Dec 17 16:32:08 2000
+++ ./po/it.po  Tue Jan  9 09:03:44 2001
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "POT-Creation-Date: 2000-12-17 15:35+0100\n"
-"Content-Type: text/plain; charset=\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
 "Date: 1998-05-30 00:17:12+0200\n"
 "From:  <address@hidden>\n"
 "Xgettext-Options: --c++ --default-domain=lilypond --join "
diff -urN ../lilypond-1.3.121.jcn1/po/nl.po ./po/nl.po
--- ../lilypond-1.3.121.jcn1/po/nl.po   Tue Dec 19 09:38:50 2000
+++ ./po/nl.po  Tue Jan  9 09:02:23 2001
@@ -7,6 +7,7 @@
 # the TP robot wants them like this (I hope).
 # Of course, Han-Wen <address@hidden> also was FIRST AUTHOR.
 #
+#, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: lilypond 1.3.59\n"
@@ -15,7 +16,7 @@
 "Last-Translator: Jan Nieuwenhuizen <address@hidden>\n"
 "Language-Team: Dutch <address@hidden>\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=8859-1\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Date: 1998-05-26 11:26:28+0200\n"
 "From:  <address@hidden>\n"
diff -urN ../lilypond-1.3.121.jcn1/scripts/convert-ly.py ./scripts/convert-ly.py
--- ../lilypond-1.3.121.jcn1/scripts/convert-ly.py      Mon Jan  8 11:29:50 2001
+++ ./scripts/convert-ly.py     Tue Jan  9 09:34:56 2001
@@ -632,9 +632,10 @@
 if 1:
        def conv (str):
                str = re.sub ('drarnChords', 'chordChanges', str)
+               str = re.sub ('\\musicalpitch', '\\pitch', str)
                return str
        
-       conversions.append (((1,3,122), conv, 'drarnChords -> chordChanges'))
+       conversions.append (((1,3,122), conv, 'drarnChords -> chordChanges, 
\\musicalpitch -> \\pitch'))
 
 
 ############################





-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]