@html
<p align=center>
-<img src="Documentation/pictures/out-www/lelie-logo.png" alt="[logo]">
+<a href="Documentation/pictures/out-www/lelie-logo.png">
+<img border=0 src="Documentation/pictures/out-www/lelie-logo.png"
+ alt="[picture of lily-cello-girl]">
+</a>
@end html
depth = ..
-SUBDIRS=bugs test regression tutorial no-notation ascii-art
+SUBDIRS=bugs test regression tutorial no-notation ascii-art template
# nereides is tweaked a lot, can't do (read webpage)
examples=trip star-spangled-banner paddy twinkle #nereides
-# input/bugs/Makefile
-
depth = ../..
LOCALSTEPMAKE_TEMPLATES=ly mutopia
include $(depth)/make/stepmake.make
-
--- /dev/null
+depth = ../..
+
+LOCALSTEPMAKE_TEMPLATES=ly mutopia
+EXTRA_DIST_FILES=README
+
+include $(depth)/make/stepmake.make
+
--- /dev/null
+
+* Mention this somewhere in documentation (Tutorial)
+
+* Better comment-out most header entries, or
+ move to template/title.ly altogether?
+
+* Naming conventions for voices/staffs
+ (think: \autochange, \partcombine)?
+
+* Add (commented-out) stuff like \time 3/4
+ \property Staff.TimeSignature \set #'style = #xxx?
+
+* Handy emacs shortcuts to (these) templates?
+
+* Mutopia headers?
+
+* Another approach would be to not include any music in the templates,
+ and standardise the naming of the music, so that you'd do:
+
+ title = 'Piano piece'
+ upper = \notes { ... }
+ lower = \notes { ... }
+
+ \include "template/piano.ly"
+
+ In this case, we'd also need one simple music example file per
+ template. This approach can be even easier to use, but is not very
+ flexible, it only works for simple and uniform pieces.
+
+* Possibly some of you already have created something like this? I was
+ thinking of having templates for:
+
+ single melody = melody.ly
+ melody with lyrics = melody-lyrics.ly
+ melody with lyrics and chords = melody-lyrics-chords.ly
+ piano = piano.ly
+ piano with several voices = piano-4-voices.ly
+ piano with lyrics (between staffs) = piano-lyrics.ly
+ piano with melody and lyrics = piano-melody-lyrics.ly
+
+TODO (Choral templates, anyone?)
+ piano with lyrics and chords
+ (string) duet
+ (string) duet parts
+ string quartet
+ string quintet parts
+ orchestral score
+ orchestral parts
+ choral score
+ choral score with piano reduction (i.e., the piano staves have the
+ same notes as the choral parts)
+ choral score with piano accompaniment
+ choral parts
+
+
+
+
--- /dev/null
+\version "1.5.1"
+
+\header {
+ dedication = "dedication"
+ title = "Title"
+ subtitle = "Subtitle"
+ subsubtitle = "Subsubtitle"
+ composer = "Composer (xxxx-yyyy)"
+ opus = "Opus 0"
+ piece = "Piece I"
+ instrument = "Instrument"
+ arranger = "Arranger"
+ poet = "Poet"
+ texttranslator = "Translator"
+ copyright = "public domain"
+ enteredby = "jcn"
+ source = "urtext"
+}
+
+melody = \notes \relative c' {
+ a b c d
+}
+
+text = \lyrics {
+ Aaa Bee Cee Dee
+}
+
+accompaniment = \chords {
+ a2: c2
+}
+
+\score {
+ <
+ \context ChordNames \accompaniment
+ \addlyrics
+ \context Staff = one {
+ \property Staff.noAutoBeaming = ##t
+ \property Staff.automaticMelismata = ##t
+ \melody
+ }
+ \context Lyrics \text
+ >
+ \paper { }
+ \midi { }
+}
--- /dev/null
+\version "1.5.1"
+
+\header {
+ dedication = "dedication"
+ title = "Title"
+ subtitle = "Subtitle"
+ subsubtitle = "Subsubtitle"
+ composer = "Composer (xxxx-yyyy)"
+ opus = "Opus 0"
+ piece = "Piece I"
+ instrument = "Instrument"
+ arranger = "Arranger"
+ poet = "Poet"
+ texttranslator = "Translator"
+ copyright = "public domain"
+ enteredby = "jcn"
+ source = "urtext"
+}
+
+melody = \notes \relative c'' {
+ a b c d
+}
+
+text = \lyrics {
+ Aaa Bee Cee Dee
+}
+
+\score {
+ <
+ \addlyrics
+ \context Staff = one {
+ \property Staff.noAutoBeaming = ##t
+ \property Staff.automaticMelismata = ##t
+ \melody
+ }
+ \context Lyrics \text
+ >
+ \paper { }
+ \midi { }
+}
--- /dev/null
+\version "1.5.1"
+
+\header {
+ dedication = "dedication"
+ title = "Title"
+ subtitle = "Subtitle"
+ subsubtitle = "Subsubtitle"
+ composer = "Composer (xxxx-yyyy)"
+ opus = "Opus 0"
+ piece = "Piece I"
+ instrument = "Instrument"
+ arranger = "Arranger"
+ poet = "Poet"
+ texttranslator = "Translator"
+ copyright = "public domain"
+ enteredby = "jcn"
+ source = "urtext"
+}
+
+melody = \notes \relative c' {
+ a b c d
+}
+
+\score {
+ \context Staff \melody
+ \paper { }
+ \midi { }
+}
--- /dev/null
+\version "1.5.1"
+
+\header {
+ dedication = "dedication"
+ title = "Title"
+ subtitle = "Subtitle"
+ subsubtitle = "Subsubtitle"
+ composer = "Composer (xxxx-yyyy)"
+ opus = "Opus 0"
+ piece = "Piece I"
+ instrument = "Instrument"
+ arranger = "Arranger"
+ poet = "Poet"
+ texttranslator = "Translator"
+ copyright = "public domain"
+ enteredby = "jcn"
+ source = "urtext"
+}
+
+upperOne = \notes\relative c'' {
+ \voiceOne
+ a b c d
+}
+
+upperTwo = \notes\relative c' {
+ \voiceTwo
+ a2 c
+}
+
+lowerOne = \notes\relative c {
+ \voiceOne
+ a2 c
+}
+
+lowerTwo = \notes\relative c {
+ \voiceTwo
+ a1
+}
+
+\score {
+ \context PianoStaff <
+ %\time 4/4
+ \context Staff = upper <
+ \context Voice = one \upperOne
+ \context Voice = two \upperTwo
+ >
+ \context Staff = lower <
+ \clef bass
+ \context Voice = one \lowerOne
+ \context Voice = two \lowerTwo
+ >
+ >
+ \paper { }
+ \midi { }
+}
\ No newline at end of file
--- /dev/null
+\version "1.5.1"
+
+\header {
+ dedication = "dedication"
+ title = "Title"
+ subtitle = "Subtitle"
+ subsubtitle = "Subsubtitle"
+ composer = "Composer (xxxx-yyyy)"
+ opus = "Opus 0"
+ piece = "Piece I"
+ instrument = "Instrument"
+ arranger = "Arranger"
+ poet = "Poet"
+ texttranslator = "Translator"
+ copyright = "public domain"
+ enteredby = "jcn"
+ source = "urtext"
+}
+
+upper = \notes\relative c'' {
+ a b c d
+}
+
+lower = \notes\relative c {
+ a2 c
+}
+
+text = \lyrics {
+ Aaa Bee Cee Dee
+}
+
+\score {
+ \context GrandStaff <
+ \addlyrics
+ \context Staff = upper \upper
+ \context Lyrics \text
+ \context Staff = lower <
+ \clef bass
+ \lower
+ >
+ >
+ \paper {
+ \translator {
+ \GrandStaffContext
+ \accepts "Lyrics"
+ }
+ \translator {
+ %\LyricsVoiceContext
+ \LyricsContext
+ \consists "Bar_engraver"
+ }
+ }
+ \midi { }
+}
\ No newline at end of file
--- /dev/null
+\version "1.5.1"
+
+\header {
+ dedication = "dedication"
+ title = "Title"
+ subtitle = "Subtitle"
+ subsubtitle = "Subsubtitle"
+ composer = "Composer (xxxx-yyyy)"
+ opus = "Opus 0"
+ piece = "Piece I"
+ instrument = "Instrument"
+ arranger = "Arranger"
+ poet = "Poet"
+ texttranslator = "Translator"
+ copyright = "public domain"
+ enteredby = "jcn"
+ source = "urtext"
+}
+
+melody = \notes \relative c'' {
+ a b c d
+}
+
+text = \lyrics {
+ Aaa Bee Cee Dee
+}
+
+upper = \notes\relative c'' {
+ a b c d
+}
+
+lower = \notes\relative c {
+ a2 c
+}
+
+\score {
+ <
+ \addlyrics
+ \context Staff = mel {
+ \property Staff.noAutoBeaming = ##t
+ \property Staff.automaticMelismata = ##t
+ \melody
+ }
+ \context Lyrics \text
+
+ \context PianoStaff <
+ \context Staff = upper \upper
+ \context Staff = lower <
+ \clef bass
+ \lower
+ >
+ >
+ >
+ \paper {
+ \translator { \HaraKiriStaffContext }
+ }
+ \midi { }
+}
\ No newline at end of file
--- /dev/null
+\version "1.5.1"
+
+\header {
+ dedication = "dedication"
+ title = "Title"
+ subtitle = "Subtitle"
+ subsubtitle = "Subsubtitle"
+ composer = "Composer (xxxx-yyyy)"
+ opus = "Opus 0"
+ piece = "Piece I"
+ instrument = "Instrument"
+ arranger = "Arranger"
+ poet = "Poet"
+ texttranslator = "Translator"
+ copyright = "public domain"
+ enteredby = "jcn"
+ source = "urtext"
+}
+
+upper = \notes\relative c'' {
+ a b c d
+}
+
+lower = \notes\relative c {
+ a2 c
+}
+
+\score {
+ \context PianoStaff <
+ %\time 4/4
+ \context Staff = upper \upper
+ \context Staff = lower <
+ \clef bass
+ \lower
+ >
+ >
+ \paper { }
+ \midi { }
+}
\ No newline at end of file
--- /dev/null
+\version "1.3.146"
+\header{
+filename = "chord-table.ly"
+copyright = "public domain"
+enteredby = "jcn"
+}
+
+tab = \notes\transpose c'''\chords{
+ c1 c:m c:4 c:m4 c:5+ \break
+ c:5- c:dim c:5-.5+ c:6 c:m6\break
+ c:4.6 c:7 c:m7 c:4.7 c:m4.7\break
+ c:5+.7 c:5-.7 c:m5-.7 c:maj c:m.maj\break
+ c:4.maj c:m4.maj c:5+.maj c:m4+.maj c:5-.maj\break
+ c1:m5-.maj c:dim7 c:5-.5+.7 c:6.maj c:m6.maj\break
+ c:4.6.maj c:9 c:m9 c:4.9 c:m.4.9\break
+}
+
+\score{
+% \context StaffGroup <
+ <
+ \context Staff=c \notes\transpose c\tab
+ \context ChordNames=c \notes\transpose c\tab
+%{
+ \context Staff=cis \notes\transpose cis\tab
+ \context ChordNames=cis \notes\transpose cis\tab
+ \context Staff=des \notes\transpose des\tab
+ \context ChordNames=des \notes\transpose des\tab
+ \context Staff=d \notes\transpose d\tab
+ \context ChordNames=d \notes\transpose d\tab
+ \context Staff=es \notes\transpose es\tab
+ \context ChordNames=es \notes\transpose es\tab
+ \context Staff=e \notes\transpose e\tab
+ \context ChordNames=e \notes\transpose e\tab
+ \context Staff=fis \notes\transpose fis\tab
+ \context ChordNames=fis \notes\transpose fis\tab
+ \context Staff=g \notes\transpose g\tab
+ \context ChordNames=g \notes\transpose g\tab
+ \context Staff=as \notes\transpose as\tab
+ \context ChordNames=as \notes\transpose as\tab
+ \context Staff=a \notes\transpose a\tab
+ \context ChordNames=a \notes\transpose a\tab
+ \context Staff=bes \notes\transpose bes,\tab
+ \context ChordNames=bes \notes\transpose bes,\tab
+ \context Staff=b \notes\transpose b,\tab
+ \context ChordNames=b \notes\transpose b,\tab
+%}
+ >
+ \paper{
+ textheight = \vsize - 4.0 * \staffheight
+ }
+
+}
+
+
subtitle = "Subtitle"
subsubtitle = "Subsubtitle"
composer = "Composer (xxxx-yyyy)"
+ instrument = "Instrument"
arranger = "Arranger"
poet = "Poet"
% ugr: warning: Identifier name is a keyword: `translator'
copyright = "public domain"
enteredby = "jcn"
source = "urtext"
- instrument = "Instrument"
}
\score {
for (SCM i = add; gh_pair_p (i); i = gh_cdr (i))
{
Pitch* p = unsmob_pitch (gh_car (i));
+ /* Ugr
+ This chord modifier stuff should really be fixed
+ Cmaj7 yields C 7/7-
+ */
if (p->octave_i () == -100)
{
p->octave_i_ = 0;
if (highest_step < 5)
tmp = ly_snoc (fifth, tmp);
else if (dim_b)
- add = lower_step (tonic, add, gh_int2scm (5));
+ {
+ add = lower_step (tonic, add, gh_int2scm (5));
+ add = lower_step (tonic, add, gh_int2scm (7));
+ }
/* find missing thirds */
SCM missing = missing_thirds (tmp);
n->set_mus_property ("duration", dur);
n->set_mus_property ("inversion", SCM_BOOL_T);
list = gh_cons (n->self_scm (), list);
- scm_unprotect_object (n->self_scm ());
+ scm_gc_unprotect_object (n->self_scm ());
}
else
warning (_f ("invalid inversion pitch: not part of chord: %s",
n->set_mus_property ("duration", dur);
n->set_mus_property ("bass", SCM_BOOL_T);
list = gh_cons (n->self_scm (), list);
- scm_unprotect_object (n->self_scm ());
+ scm_gc_unprotect_object (n->self_scm ());
}
for (SCM i = pitches; gh_pair_p (i); i = gh_cdr (i))
n->set_mus_property ("pitch", gh_car (i));
n->set_mus_property ("duration", dur);
list = gh_cons (n->self_scm (), list);
- scm_unprotect_object (n->self_scm ());
+ scm_gc_unprotect_object (n->self_scm ());
}
Simultaneous_music*v = new Request_chord (SCM_EOL);
}
| lilypond_header {
if (global_header_p)
- scm_unprotect_object (global_header_p->self_scm ());
+ scm_gc_unprotect_object (global_header_p->self_scm ());
global_header_p = $1;
}
| score_block {
identifier_init:
score_block {
$$ = $1->self_scm ();
- scm_unprotect_object ($$);
+ scm_gc_unprotect_object ($$);
}
| output_def {
$$ = $1->self_scm ();
- scm_unprotect_object ($$);
+ scm_gc_unprotect_object ($$);
}
| translator_spec_block {
$$ = $1;
}
| Music {
$$ = $1->self_scm ();
- scm_unprotect_object ($$);
+ scm_gc_unprotect_object ($$);
}
| post_request {
$$ = $1->self_scm ();
- scm_unprotect_object ($$);
+ scm_gc_unprotect_object ($$);
}
| explicit_duration {
$$ = $1;
$$->set_spot (THIS->here_input ());
SCM m = $1->self_scm ();
- scm_unprotect_object (m);
+ scm_gc_unprotect_object (m);
$$->music_ = m;
}
| SCORE_IDENTIFIER {
$$->set_spot (THIS->here_input ());
}
| score_body lilypond_header {
- scm_unprotect_object ($2->self_scm ());
+ scm_gc_unprotect_object ($2->self_scm ());
$$->header_p_ = $2;
}
| score_body output_def {
| Music_list Music {
SCM s = $$;
SCM c = gh_cons ($2->self_scm (), SCM_EOL);
- scm_unprotect_object ($2->self_scm ()); /* UGH */
+ scm_gc_unprotect_object ($2->self_scm ()); /* UGH */
if (gh_pair_p (gh_cdr (s)))
gh_set_cdr_x (gh_cdr (s), c); /* append */
else
if (beg)
{
r-> set_mus_property ("body", beg->self_scm ());
- scm_unprotect_object (beg->self_scm ());
+ scm_gc_unprotect_object (beg->self_scm ());
}
r->set_mus_property ("repeat-count", gh_int2scm (times >? 1));
{
alts->truncate (times);
r-> set_mus_property ("alternatives", alts->self_scm ());
- scm_unprotect_object (alts->self_scm ());
+ scm_gc_unprotect_object (alts->self_scm ());
}
- SCM func = scm_eval2 (ly_symbol2scm ("repeat-name-to-ctor"), SCM_EOL);
+ SCM func = scm_primitive_eval (ly_symbol2scm ("repeat-name-to-ctor"));
SCM result = gh_call1 (func, $2);
set_music_properties (r, result);
CONTEXT STRING Music {
Context_specced_music *csm = new Context_specced_music (SCM_EOL);
csm->set_mus_property ("element", $3->self_scm ());
- scm_unprotect_object ($3->self_scm ());
+ scm_gc_unprotect_object ($3->self_scm ());
csm->set_mus_property ("context-type",$2);
csm->set_mus_property ("context-id", ly_str02scm (""));
chm->set_mus_property ("element", $3->self_scm ());
chm->set_mus_property ("iterator-ctor", Auto_change_iterator::constructor_cxx_function);
- scm_unprotect_object ($3->self_scm ());
+ scm_gc_unprotect_object ($3->self_scm ());
chm->set_mus_property ("what", $2);
$$ = chm;
if (stopm) {
stopm = stopm->clone ();
ms = gh_cons (stopm->self_scm (), ms);
- scm_unprotect_object (stopm->self_scm ());
+ scm_gc_unprotect_object (stopm->self_scm ());
}
ms = gh_cons ($2->self_scm (), ms);
- scm_unprotect_object ($2->self_scm());
+ scm_gc_unprotect_object ($2->self_scm());
if (startm) {
startm = startm->clone ();
ms = gh_cons (startm->self_scm () , ms);
- scm_unprotect_object (startm->self_scm ());
+ scm_gc_unprotect_object (startm->self_scm ());
}
Music* seq = new Sequential_music (SCM_EOL);
$$ = new Grace_music (SCM_EOL);
$$->set_mus_property ("element", seq->self_scm ());
- scm_unprotect_object (seq->self_scm ());
+ scm_gc_unprotect_object (seq->self_scm ());
#else
$$ = new Grace_music (SCM_EOL);
$$->set_mus_property ("element", $2->self_scm ());
- scm_unprotect_object ($2->self_scm ());
+ scm_gc_unprotect_object ($2->self_scm ());
#endif
| CONTEXT string '=' string Music {
Context_specced_music *csm = new Context_specced_music (SCM_EOL);
csm->set_mus_property ("element", $5->self_scm ());
- scm_unprotect_object ($5->self_scm ());
+ scm_gc_unprotect_object ($5->self_scm ());
csm->set_mus_property ("context-type", $2);
csm->set_mus_property ("context-id", $4);
$$->set_mus_property ("element", mp->self_scm ());
- scm_unprotect_object (mp->self_scm ());
+ scm_gc_unprotect_object (mp->self_scm ());
$$->set_mus_property ("numerator", gh_int2scm (n));
$$->set_mus_property ("denominator", gh_int2scm (d));
$$->compress (Moment (n,d));
p->transpose (pit);
$$->set_mus_property ("element", p->self_scm ());
- scm_unprotect_object (p->self_scm ());
+ scm_gc_unprotect_object (p->self_scm ());
}
| TRANSPOSE steno_tonic_pitch Music {
$$ = new Transposed_music (SCM_EOL);
p->transpose (pit);
$$->set_mus_property ("element", p->self_scm ());
- scm_unprotect_object (p->self_scm ());
+ scm_gc_unprotect_object (p->self_scm ());
}
| APPLY embedded_scm Music {
$$ = new Relative_octave_music (SCM_EOL);
$$->set_mus_property ("element", p->self_scm ());
- scm_unprotect_object (p->self_scm ());
+ scm_gc_unprotect_object (p->self_scm ());
$$->set_mus_property ("last-pitch", p->to_relative_octave (pit).smobbed_copy ());
Lyric_combine_music * l = new Lyric_combine_music (SCM_EOL);
l->set_mus_property ("music", $2->self_scm ());
l->set_mus_property ("lyrics", $3->self_scm ());
- scm_unprotect_object ($3->self_scm ());
- scm_unprotect_object ($2->self_scm ());
+ scm_gc_unprotect_object ($3->self_scm ());
+ scm_gc_unprotect_object ($2->self_scm ());
$$ = l;
}
;
p->set_mus_property ("one", $3->self_scm ());
p->set_mus_property ("two", $4->self_scm ());
- scm_unprotect_object ($3->self_scm ());
- scm_unprotect_object ($4->self_scm ());
+ scm_gc_unprotect_object ($3->self_scm ());
+ scm_gc_unprotect_object ($4->self_scm ());
$$ = p;
Context_specced_music *csm = new Context_specced_music (SCM_EOL);
csm->set_mus_property ("element", t->self_scm ());
- scm_unprotect_object (t->self_scm ());
+ scm_gc_unprotect_object (t->self_scm ());
$$ = csm;
$$->set_spot (THIS->here_input ());
Context_specced_music *csm = new Context_specced_music (SCM_EOL);
csm->set_mus_property ("element", t->self_scm ());
- scm_unprotect_object (t->self_scm ());
+ scm_gc_unprotect_object (t->self_scm ());
$$ = csm;
$$->set_spot (THIS->here_input ());
t->set_mus_property ("grob-value", $8);
Context_specced_music *csm = new Context_specced_music (SCM_EOL);
csm->set_mus_property ("element", t->self_scm ());
- scm_unprotect_object (t->self_scm ());
+ scm_gc_unprotect_object (t->self_scm ());
$$ = csm;
$$->set_spot (THIS->here_input ());
t->set_mus_property ("grob-value", $8);
Context_specced_music *csm = new Context_specced_music (SCM_EOL);
csm->set_mus_property ("element", t->self_scm ());
- scm_unprotect_object (t->self_scm ());
+ scm_gc_unprotect_object (t->self_scm ());
$$ = csm;
$$->set_spot (THIS->here_input ());
Context_specced_music *csm = new Context_specced_music (SCM_EOL);
csm->set_mus_property ("element", t->self_scm ());
- scm_unprotect_object (t->self_scm ());
+ scm_gc_unprotect_object (t->self_scm ());
$$ = csm;
$$->set_spot (THIS->here_input ());
Context_specced_music *csm = new Context_specced_music (SCM_EOL);
csm->set_mus_property ("element", t->self_scm ());
- scm_unprotect_object (t->self_scm ());
+ scm_gc_unprotect_object (t->self_scm ());
$$ = csm;
$$->set_spot (THIS->here_input ());
Context_specced_music * sp = new Context_specced_music (SCM_EOL);
sp->set_mus_property ("element", p->self_scm ());
- scm_unprotect_object (p->self_scm ());
+ scm_gc_unprotect_object (p->self_scm ());
$$ =sp ;
sp-> set_mus_property ("context-type", ly_str02scm ( "Score"));
}
| CLEF STRING {
- SCM func = scm_eval2 (ly_symbol2scm ("clef-name-to-properties"), SCM_EOL);
+ SCM func = scm_primitive_eval (ly_symbol2scm ("clef-name-to-properties"));
SCM result = gh_call1 (func, $2);
SCM l = SCM_EOL;
Music * p = new Music (SCM_EOL);
set_music_properties (p, gh_car (s));
l = gh_cons (p->self_scm (), l);
- scm_unprotect_object (p->self_scm ());
+ scm_gc_unprotect_object (p->self_scm ());
}
Sequential_music * seq = new Sequential_music (SCM_EOL);
seq->set_mus_property ("elements", l);
Context_specced_music * sp = new Context_specced_music (SCM_EOL);
sp->set_mus_property ("element", seq->self_scm ());
- scm_unprotect_object (seq->self_scm ());
+ scm_gc_unprotect_object (seq->self_scm ());
$$ =sp ;
sp-> set_mus_property ("context-type", ly_str02scm ("Staff"));
- scm_unprotect_object (p3->self_scm ());
- scm_unprotect_object (p2->self_scm ());
- scm_unprotect_object (p1->self_scm ());
- scm_unprotect_object (seq->self_scm ());
+ scm_gc_unprotect_object (p3->self_scm ());
+ scm_gc_unprotect_object (p2->self_scm ());
+ scm_gc_unprotect_object (p1->self_scm ());
+ scm_gc_unprotect_object (seq->self_scm ());
$$ = sp;
$$ = gh_cons ($1, SCM_EOL);
}
| CHORDMODIFIER_PITCH {
- $$ = gh_cons ($1, SCM_EOL);
+ $$ = gh_cons (unsmob_pitch ($1)->smobbed_copy (), SCM_EOL);
}
| CHORDMODIFIER_PITCH chord_note { /* Ugh. */
- $$ = gh_list ($1, $2, SCM_UNDEFINED);
+ $$ = gh_list (unsmob_pitch ($1)->smobbed_copy (),
+ $2, SCM_UNDEFINED);
}
;
$$ = $1;
}
| string '+' string {
- $$ = scm_string_append (scm_listify ($1, $3, SCM_UNDEFINED));
+ $$ = scm_string_append (scm_list_n ($1, $3, SCM_UNDEFINED));
}
;
(((0 . 0) (3 . 0) (4 . 0)) . ("" (super "4") " " ))
;; Cdim iso Cm5-
(((0 . 0) (2 . -1) (4 . -1)) . ("dim"))
- ; Co iso Cm5-7-
+ ; URG: Simply C:m5-/maj7 iso Cdim maj7
+ (((0 . 0) (2 . -1) (4 . -1) (6 . 0)) . ("m" (super "5-/maj7" " ")))
+ ; URG: Simply C:m5-/7 iso Cdim7
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . ("m" (super "5-/7" " ")))
+ ; Co iso C:m5-/7-
(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ("" (super "o") " "))
; Cdim9
(((0 . 0) (2 . -1) (4 . -1) (6 . -2) (1 . -1)) . ("dim" (super "9") " "))
* TODO: any uneven step that's lower than an uneven step which is
chromatically altered
"
- (write-me "adds: "
(let ((evens (filter-list (lambda (x) (!= 0 (modulo (cadr x) 2))) steps))
(altered-unevens
(filter-list (lambda (x)
'()))))
;; Hmm, what if we have a step twice, can we ignore that?
(uniq-list (sort (apply append evens altered-unevens highest)
- pitch::<)))))
+ pitch::<))))
;; FIXME: unLOOP, see ::additions
;; find the pitches that are missing from `normal' chord
(define (chord::subtractions chord-pitches)
- (write-me "subs: " (let ((tonic (car chord-pitches)))
+ (let ((tonic (car chord-pitches)))
(let loop ((step 1) (pitches chord-pitches) (subtractions '()))
(if (pair? pitches)
(let* ((pitch (car pitches))
(if (= p-step step)
(loop (+ step 2) (cdr pitches) subtractions)
(loop step (cdr pitches) subtractions)))))
- (reverse subtractions))))))
+ (reverse subtractions)))))
(define (chord::additions->text-banter additions subtractions)
(if (pair? additions)
;; additions, subtractions and bass or inversion into chord name
(define (chord::inner-name-banter tonic exception-part additions subtractions
bass-and-inversion steps)
- (let ((tonic-text (pitch->chord-name-text-banter tonic steps))
- (except-text exception-part)
- (sep-text (if (and (string-match "super" (format "~s" exception-part))
+ (let* ((tonic-text (pitch->chord-name-text-banter tonic steps))
+ (except-text exception-part)
+ (sep-text (if (and (string-match "super" (format "~s" except-text))
(or (pair? additions)
(pair? subtractions)))
(list simple-super "/")))
- (adds-text (chord::additions->text-banter additions subtractions))
- (subs-text (chord::subtractions->text-banter subtractions))
- (b+i-text (chord::bass-and-inversion->text-banter bass-and-inversion)))
+ (adds-text (chord::additions->text-banter additions subtractions))
+ (subs-text (chord::subtractions->text-banter subtractions))
+ (b+i-text (chord::bass-and-inversion->text-banter bass-and-inversion)))
(text-append
- tonic-text except-text sep-text
- (list (list simple-super) adds-text subs-text)
+ tonic-text except-text " " sep-text
+ ;;(list (list simple-super) adds-text subs-text)
+ (list (list '((raise . 1) (font-relative-size . -1))) adds-text subs-text)
b+i-text)))
(define (chord::name-banter tonic exception-part unmatched-steps
bass-and-inversion steps)))
(define (chord::restyle name style)
- (ly-eval (string->symbol
+ (primitive-eval (string->symbol
(string-append (symbol->string name)
(symbol->string style)))))
;; return (MATCHED-EXCEPTION . BASE-CHORD-WITH-UNMATCHED-STEPS)
;; BASE-CHORD-WITH-UNMATCHED-STEPS always includes (tonic 3 5)
(define (chord::exceptions-lookup style steps)
- (write-me "xl: " (let* ((result (chord::exceptions-lookup-helper
+ (let* ((result (chord::exceptions-lookup-helper
(chord::restyle 'chord::names-alist- style)
steps '() #f))
(exception-part (car result))
((= i 0) base)
())
unmatched-steps)))
- (list exception-part unmatched-with-1-3-5))))
+ (list exception-part unmatched-with-1-3-5)))
(define (chord::name->text style tonic steps bass-and-inversion)
@end tex
@html
<p>
-<img src="%(fn)s.png" alt="">
+<a href="%(fn)s.png">
+<img border=0 src="%(fn)s.png" alt="[picture of music]">
+</a>
@end html
""",
}
#@PYTHON@
import os
+import re
import string
import sys
+
+entities = {
+ "&" : 'amp',
+ "`" : 'apos',
+ '>' : 'gt',
+ '<' : 'lt',
+ '"' : 'quot',
+ }
+
+def txt2html (s):
+ for i in entities.keys ():
+ s = re.sub (i, '\001' + entities[i] + ';', s);
+ s = re.sub ('\001', '&', s);
+ return s
+
for a in sys.argv[1:]:
# hmm, we need: text2html out/foe.txt -> out/foe.html,
# -o is a bit overkill?
<html><body><pre>
%s
</pre></body></html>
-""" % open (a).read ()
+""" % txt2html (open (a).read ())
open (outfile, 'w').write (s)