@String{CitH = {Computing and the Humanities}}
@String{CMJ = {Computer Music Journal}}
-@TechReport{roush88,
+@TechRep=ort{roush88,
note = {Rules on formatting music formulated for use in computers. Mainly distilled from [Ross] HWN},
year = {1988},
title = {Music Formatting Guidelines},
@comma enharmonique@@@@@
@doigté de pédale@@@@@
-@doigté@@@@@
+@doigté@Fingersatz@@@@
@indication de pédale@@@@@
@pointillés@@@@@
-A@la@@@@@
+A@la@a@@@@
accent@accent@Akzent@@accent@accento@
-accidental@altération accidentelle@Vorzeichen@@toevallig teken@accidento@
+accidental@altération accidentelle@Vorzeichen, Versetzungszeichen, Akzidenz@@toevallig teken@accidento@
adjacent keys@tons voisins@@@@@
alto@alto@Alt@@alt@@
ancient form??? (diatonic minor scale)@forme du mode mineur ancien@@@@@
appoggiatura@appogiature, ports de voix, notes d'agrèment@langer Vorschlag@@lange voorslag@appogiature@
arbitrary number of bars' rest)@bâton de pause@@@meermaats rust@@
-arpeggio@arpège, arpègement@Brechungen@@gebroken akoord@arpeggio@
+arpeggio@arpège, arpègement@Arpeggio, Brechungen@@gebroken akoord@arpeggio@
artificial measure@mesure artificielle@@@@@
artificial rest@respiration@@@@@
ascending interval@intervalle ascendant@@@stijgend interval@@
-augmented (interval)@augmenté (intervalle)@@@overmatig interval@@
-B@si@@@@@
+augmented (interval)@augmenté (intervalle)@übermäßig (Intervall)@@overmatig interval@@
+B@si@h@@@@
backfall, forefall@accent, chute, port de voix@Vorschlag@@korte voorslag@appogiature@
bar line@barre (de mesure)@Taktstrich@@maatstreep@stanghetta@
bar; measure@mesure@Takt@@maat, maatstreep@@
brace@accolade@Klammer@@accolade, haak@accolada@Symbol at the start of a system that connects staffs.
brass@@Blechbläser@@koper (blazers)@@
C clef@clé d'ut@Altschlüssel, C-Schlüssel@@C sleutel, alt sleutel@chiave di tenore@
-C@do@@@C@@
-C@ut@@@@@
+C@do@c@@C@@
+C@ut@c@@@@
cadence@cadence@Kadenz@@cadens@@
-cadenza@fioriture@@@cadens@cadenza@
-cent@@@@cent@@1/1200 of an octave (1/100 of an equally tempered semitone)
+cadenza@fioriture@Kadenz@@cadens@cadenza@
+cent@@Cent@@cent@@1/1200 of an octave (1/100 of an equally tempered semitone)
chain of trills@chaîne de trilles@@@triller@@
character@caractère@@@@@
chevron@chevron@@@@@
contro-time@contre-temps@@@@@
crescendo@crescendo@Crescendo@@@crescendo@written with an extended opening angular bracket, indicates increasing volume
cue-notes@@Stichnoten@@stichnoten@@In an orchestral part, notes for a different instrument that hint when to\rstart playing. Usually printed in smaller type.
-D@ré@@@@@
+D@ré@d@@@@
dash over/below@@@@@pizzicato@With plucked strings
-decrescendo@@Decrecendo@@@decrescendo@written with an extended closing angular bracket, indicates decreasing volume
+decrescendo@@Decrescendo@@@decrescendo@written with an extended closing angular bracket, indicates decreasing volume
degree [of the scale]@degré [de la gamme]@Stufe [der Tonleiter]@@trap [van de toonladder]@@
descending interval@intervalle descendant@@@dalend interval@@
diatonic major scale@gamme diatonique majeure@Diatonische Durtonleiter@@diatonische majeur toonladder@@
diatonic semitone@demi-ton diatonique@@@diatonische halve toon@@
diatonic type@genre diatonique@diatonisch@@@@
diatonic@diatonique@@@diatonisch@@A diatonic scale is a scale consisting of whole and half tones.
-diminished (interval)@diminué (intervalle)@vermindertes (Intervall)@@verminderd (interval)@@
+diminished (interval)@diminué (intervalle)@vermindert (Intervall)@@verminderd (interval)@@
disjunct movement@mouvement disjoint@@@@@
dissonant interval; dissonance@dissonance@Dissonanz@@dissonant interval; dissonant@@
dominant ninth chord@accord de neuvième dominante@@@dominant noon akkoord@@
dominant seventh chord@accord de septième dominante@Dominantseptakkord@@dominant septiem akkoord@@
dominant@dominante@Dominante@@dominant@@A tone that creates tension;the fifth degree of the scale.
dorian mode@@Dorische Tonart@@dorische toonladder@@Mode obtained by raising the sixth in minor mode. A Dorian scale can be played from D to D with no sharps or flats.
-dot (augmentation dot) @point@Punkt@@punt@punto@An augmentation dot after note adds multiplies the duration by one and a half.
+dot (augmentation dot) @point@Punkt (Verlängerungspunkt)@@punt@punto@An augmentation dot after note adds multiplies the duration by one and a half.
dot and curved line combined@point et liaison combinés@@@@@
dot over/below@@Staccato@@staccato@staccato@Play each note short.
dot@point@Punkt@@punt@@
dotted note@note pointée@punktierte Note@@@@
double appoggiatura@appogiature double@@@@@
-double bar line@double barre@Doppeltaktstrich@@dubbele streep@doppia barra@Indicates the end of a section within a movement.
+double bar line@double barre@Doppel(takt)strich@@dubbele streep@doppia barra@Indicates the end of a section within a movement.
double dotted note@note doublement pointée@doppel-punktierte Note@@@@
double flat@double bémol@Doppel-Be@@dubbelmol@doppio bemolle@
double sharp@double dièse@Doppelkreuz@@dubbelkruis@doppio diesis@Raise pitch by two semitones
-double trill@trille double@@@@@A trill on a chord
+double trill@trille double@Doppeltriller@@@@A trill on a chord
double triplet@double triolet@Doppeltriole@@dubbele triool@@
-double whole note@@@breve@brevis@breve@Note during twice as long as a whole note. Mainly used in pre-1650 music.
+double whole note@@Brevis@breve@brevis@breve@Note during twice as long as a whole note. Mainly used in pre-1650 music.
duple meter@temps binaire@@@tweedelige maatsoort@@
-duplet@duolet@@@duool@@
+duplet@duolet@Duole@@duool@@
duration@durée@Dauer, Länge@@duur, lengte@@
-E@mi@@@@@
-eighth note@croche@achtel Note@quaver@achtste noot@@
-eighth rest@demi-soupir@achtel Pause@quaver rest@achtste rust@@
+E@mi@e@@@@
+eighth note@croche@Achtelnote@quaver@achtste noot@@
+eighth rest@demi-soupir@Achtelpause@quaver rest@achtste rust@@
engraving@@Notenstechen@@steken@@The traditional process of music printing: cutting in a plate of metal. Now also the term for the art of music typography.
-enharmonic@enharmonique@Enharmonisch@@enharmonisch@@Two notes, intervals, or scales are enharmonic if they have different names but sound the same. Examples: C sharp and D flat, diminished fourth and major third
+enharmonic@enharmonique@enharmonisch@@enharmonisch@@Two notes, intervals, or scales are enharmonic if they have different names but sound the same. Examples: C sharp and D flat, diminished fourth and major third
equal temperament@tempérament égal@@@getempereerde stemming@@Tuning system in which each semitone is precisely 100 cents.
essential alteration@altération essentielle@@@@@
expression mark@signe d'expressoin@Vortragszeichen@@voordrachtsteken@segno d'espressione@
extension of interval@extension d'intervalle@@@@@
-F@fa@@@@@
+F@fa@f@@@@
fermata@pauses@Fermate@@fermate@fermata@Prolonged sound or silence of indefinite duration
fifth@quinte@Quinte@@kwint@@
-flag, hook, tail, pennant@crochet@Fänchen@@vlaggetje@coda uncinata@Ornament at the end of the stem of a note. The number of flags determines the lengths of notes shorter than a quarter note.
+flag, hook, tail, pennant@crochet@Fähnchen@@vlaggetje@coda uncinata@Ornament at the end of the stem of a note. The number of flags determines the lengths of notes shorter than a quarter note.
flat@bémol@Be@@mol@bemolle@Lower pitch by a semitone
four-bar rest@bâton de pause@@@@@
fourth@quarte@Quarte@@kwart@@
-G@sol@@@@@
+G@sol@g@@@@
glissando@glissement@Glissando@@glissando@glissando@Letting the pitch slide fluently from one note to the other
graces@petites notes@Verzierungen, Manieren@@versieringen@appogiature@
-grand staff@@Klavieraszug@@piano systeem@@A combination of two staffs with a brace. Usually used for piano music.
-half note@blanche@halbe Note@minim@halve noot@@
-half rest@demi-pause@halbe Pause@minim rest@halve rust@@
+grand staff@@@@piano systeem@@A combination of two staffs with a brace. Usually used for piano music.
+half note@blanche@Halbe Note@minim@halve noot@@
+half rest@demi-pause@Halbe Pause@minim rest@halve rust@@
harmonic cadence@cadence harmonique@@@harmonische cadens@@Sequence of chords that terminate a musical phrase or section.
harmonic form (diatonic minor scale)@forme harmonique@@@@@
harmonic interval@intervalle harmonique@Harmonisches Intervall@@@@
line@ligne@Linie@@lijn@@
long appoggiatura@appogiature longue@@@@@
lower number@chiffre inférieur@@@@@
-major (interval)@majeur (intervalle)@@@groot (interval)@@
-major mode@mode majeur@@@@@
+major (interval)@majeur (intervalle)@groß (Intervall)@@groot (interval)@@
+major mode@mode majeur@Dur@@@@
meantone temperament@tempérament mésotonique@@@@@Tuning based on a fifth that is 16 cents smaller than the natural fifth.
mediant@médiante@@@mediant@@The third degree of a scale
melodic cadence@cadence mélodique@@@cadens@@A free-form section at the end of a solo-concerto, where the soloist\rcan demonstrate his/her virtuosity.
melodic form (diatonic minor scale)@forme mélodique@@@@@
meter, time@mètre@Takt, Metrum@@maatsoort@@A recurring pattern of stress
metronome@métronome@Metronom@@metronoom@@Device which sounds a steady beat
-metronomic indication@indication métronomique@@@@@Exact tempo indication (in beats per minute). Also denoted by M.M. (Mäzlel's Metronom)
+metronomic indication@indication métronomique@Metronomangabe@@@@Exact tempo indication (in beats per minute). Also denoted by M.M. (Mälzel's Metronom)
mezzo-soprano@mezzo-soprano@Mezzosopran@@@@
-middle C@do central@@@centrale C@@First C below the 440 Hz A.
-minor (interval)@mineur (intervalle)@@@@@
-minor mode@mode mineur@@@@@
+middle C@do central@eingestrichenes c@@centrale C@@First C below the 440 Hz A.
+minor (interval)@mineur (intervalle)@klein (Intervall)@@@@
+minor mode@mode mineur@Moll@@@@
modal note@note modale@@@@@
-mode@mode@@@@@
+mode@mode@Geschlecht@@@@
modulation@modulation@Modulation@@modulatie@@
mordent@mordant, pincè@Pralltriller, Mordent@@mordent@mordente@
motive@incise@Motiv@@motief@@
part@@@@partij@@
pause@pause@Luftpause@@@@
pause@point d'orgue@@@@@
-perfect (interval)@juste (intervalle)@reines (Intervall)@@rein (interval)@@
+perfect (interval)@juste (intervalle)@rein (Intervall)@@rein (interval)@@
perfect major chord@accord parfait majeur@@@@@
perfect minor chord@accord parfait mineur@@@@@
phrase member@membre de phrase@@@@@
phrasing@phrasé@@@@@
pitch pipe; tuning fork@diapason@Stimmgabel@@stemfluitje; stemvork@@
pitch@hauteur@Tonhöhe@@toonhoogte@@
-Pythagorean comma@comma pythagoricien@@@komma van Pythagoras@@A sequence of fifths starting on C eventually circles back to C (B sharp), but this B sharp is 24 cents higher than C. This gap is the Pythagorean comma.
+Pythagorean comma@comma pythagoricien@Pythagoräisches Komma@@komma van Pythagoras@@A sequence of fifths starting on C eventually circles back to C (B sharp), but this B sharp is 24 cents higher than C. This gap is the Pythagorean comma.
quadruplet@quartolet@@@kwartool@@
-quarter note@noire@viertel Note@crotchet@kwartnoot@@
-quarter rest@soupir@viertel Pause@crotchet rest@kwart rust@@
+quarter note@noire@Viertelnote@crotchet@kwartnoot@@
+quarter rest@soupir@Viertelpause@crotchet rest@kwart rust@@
register@registre@Register@@register@@
regular contro-time@contre-temps régulier@@@@@
regular syncopation@syncope régulière@@@@@
second@seconde@Sekunde@@@secunde@
semitone@demi-ton@Halbton@@halve toon@@
seventh@septième@Septime@@septiem@septime@
-sextuplet@sextolet@@@sextool@@
+sextuplet@sextolet@Sextole@@sextool@@
sextuplet@sixain@@@sextool@@
shading signs@signes indicateurs de nuance@@@@@
shading@nuance@Nuance@@@@
simple appoggiatura@appogiature simple@@@@@
simple interval@intervalle simple@@@@@
simple measure@mesure simple@@@@@
-sixteenth note@double croche@sechzehntel Note@semiquaver@zestiende noot@@
-sixteenth rest@quart de soupir@sechzehntel Pause@semiquaver rest@zestiende rust@@
+sixteenth note@double croche@Sechzehntelnote@semiquaver@zestiende noot@@
+sixteenth rest@quart de soupir@Sechzehntelpause@semiquaver rest@zestiende rust@@
sixth@sixte@Sexte@@sext@@
-sixty-fourth note@quadruple croche@vierundsechzigstel Note@hemidemisemiquaver@vierenzestigste noot@@
-sixty-fourth rest@seizième de soupir@vierundsechzigstel Pause@hemidemisemiquaver rest@@@
-slur@liason, coulé@Bindungzeichen, Bindebogen@@binding, bindingsboog@legatura@
+sixty-fourth note@quadruple croche@Vierundsechzigstelnote@hemidemisemiquaver@vierenzestigste noot@@
+sixty-fourth rest@seizième de soupir@Vierundsechzigstelpause@hemidemisemiquaver rest@@@
+slur@liaison, coulé@Bindungszeichen, Bindebogen@@binding, bindingsboog@legatura@
soprano@soprano@Sopran@@sopraan@@
space@espace@@@@@
staff@portée@Noten(linien)system@@(noten)balk; partij@@pl staves or staffs
subtonic@sous-tonique@Subtonika@@@@The seventh degree of the scale
superdominant@sus-dominante@@@@@The sixth scale degree
supertonic@sus-tonique@@@@@The second scale degree
-syncopation; upbeat@syncope@@@syncope@@
+syncopation; upbeat@syncope@Synkope@@syncope@@
syntonic comma@comma syntonique@@@komma van Didymos, syntonische komma@@Difference between the natural third and the third obtained by Pythagorean tuning, euqal to 22 cents.
system@système@System@@systeem@sitema@
tempo indication@signes de temps@Zeitmaß, Tempobezeichnung@@tempo aanduiding@segno di tempo@
tempo; movement@mouvement@Tempo@@@@
tenor@ténor@Tenor@@@@
tenth@@Dezime@@deciem@decime@
-tetrachord@tétracorde@Dreiklang@@@@
+tetrachord@tétracorde@Vierklang@@@@
third@tierce@Terz@@terts@@
-thirty-second note@triple croche@zweiunddreißigstel Note@demisemiquaver@32e noot@@
-thirty-second rest@huitième de soupir@zweiunddreißigstel Pause@demisemiquaver rest@32e rust@@
-tie@liaison@Bindung@@overbinding@legatura@A curve that shows the prolongation (as opposed to the repetition fo a note)
+thirty-second note@triple croche@Zweiunddreißigstelnote@demisemiquaver@32e noot@@
+thirty-second rest@huitième de soupir@Zweiunddreißigstelpause@demisemiquaver rest@32e rust@@
+tie@liaison@Haltebogen@@overbinding@legatura@A curve that shows the prolongation (as opposed to the repetition fo a note)
time signature@chiffrage (chiffres indicateurs), signe de valeur@Taktvorzeichnung, Taktvorzeichen@@maatsoort@segni di tempo@
tonal note@note tonale@@@@@
-tonality@tonalité@@@tonaliteit@@
+tonality@tonalité@Tonalität@@tonaliteit@@
tone@ton@Ton@@toon@@
-tonic@tonique@@@tonica@@
+tonic@tonique@Tonika@@tonica@@
transposition@transposition@Transposition@@transpositie@@Shifting a melody up or down in pitch, while keeping the same relative pitches.
treble clef@clé de sol@Violinschlüssel, G-Schlüssel@@G sleutel, viool sleutel@chiave di violino@
tremolo@trèmolo@Tremolo@@tremolo@tremolo@
trill; shake@trille, tremblement, battement (cadence)@Triller@@triller@trillo@
triple meter@temps ternaire@@@driedelige maatsoort@@
triplet@triolet@Triole@@@@
-tritone@triton@@@@@
+tritone@triton@Tritonus@@@@
turn; gruppetto@brisè, groupe, doublè, grupetto@Doppelschlag@@dubbelslag@grupetto@
two-bar rest@bâton de pause@@@@@
-underline over/below@portamento@@@@@
-unison@unisson@@@@unisono@Different instruments playing exactly the same melody.
+underline over/below@portamento@Portato@@@@
+unison@unisson@Unisono@@@unisono@Different instruments playing exactly the same melody.
unit of beat@unité de temps@@@@@
unit of measure@unité de mesure@@@@@
upbeat, arsis@@Auftakt@@@@
upper number@chiffre supérieur@@@@@
voice@voix@Stimme@@stem@@
weak beat@temps faible@@@arsis@@
-whole note@ronde@ganze Note@semibreve@hele noot@@
-whole rest@pause@ganze Pause@semibreve rest@@@
+whole note@ronde@Ganze Note@semibreve@hele noot@@
+whole rest@pause@Ganze Pause@semibreve rest@@@
woodwind@@Holzbläser@@houtblazers@@
-pl 45 (may 28)
+pl 45.hwn1
+ - Audio broadcast & acknowledge.
+ - more advanced spacing for prefatory matter
+ - tuplet appearance tweaking
+
+
+pl 45.uu1
+ - glossary fixes (thanks Dirk).
+
+pl 44.jcn2
+ - bf: auto-beamer: long standing br form AM
+
+*********
+
+pl 45 (may 28)
+ - reinstalled Thread (there you are, John)
- german vocab.
.* BUGS
. * junk separate mudela versioning.
+. * petite-ouverture time sig size.
. * PostScript
. * header for PS enteredby = "bla <bla@bar.com>"
. * ps/lily.ps see comments.
-. * down tuplet spanner.
+. * By the way, I'm not sure the translation of 'C, G, and F clef'
+> should include Alto, Violin, Bass <clef translated>.
+[..]
+
+I understand your point. It should be changed.
+
+
+>
+> The terms C-clef, G-clef, F-clef stand for the signs, being
+> mutated forms of a C, a G and an F.
+>
+> The terms Violin Clef etc. stand for the signs being used in
+> special positions on the staff.
+>
+> The G-clef-sign indicates g' on the line around which the
+> snake centers. It is a Violin Clef if it is centered around the
+> second line (from below), and a French Violin Clef if it is
+> centered around the lowest.
+>
+> The C-clef indicates c' on the line that gets
+> 'pinched' by it. It is a Soprano, Mezzosoprano (English?), Alto, Tenor
+> and (don't remember exactly, maybe Baritone) Clef, depending on
+> the line (from highest to lowest).
+>
+> The F-clef-sign indicates f on the line between
+> the two dots. If it's on the second line from above, it is called
+> Bass Clef. If it's on the middle line, it is called (maybe
+> Baritone) Clef too, because it indicates the same pitches as the
+> C-Clef on the highest line. So, you could write an Alto Clef by
+> putting the F-clef sign on the lowest line (but that's _very_
+> uncommon).
+>
+> Sorry, this is written very messy because I'm in a hurry,
+> but I hope you understand what I want to say.
+>
. * didot / big point.
. * devise standard for functioning of Vertical_align_element.
. * midi key.
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=1
-PATCH_LEVEL=45
+PATCH_LEVEL=46
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
--- /dev/null
+\score{
+ \notes\relative c''{
+ \time 4/8;
+
+%{
+ the default for 4/8 (see ly/auto-beam-settings.ly)
+ ---- --------
+ | | | |--|
+ x| x| x| x| x|
+%}
+ c8 c c c16 c
+
+
+%{
+ user override
+ --------------
+ | | | |--|
+ x| x| x| x| x|
+%}
+ \property Voice.beamAutoEnd = "2/4"
+ c8 c c c16 c
+
+ }
+}
+
void
Align_element::do_side_processing ()
{
- sort_elements ();
Array<Interval> dims;
Link_array<Score_element> elems;
{
extra_dims = SCM_CDR (extra_dims);
dims.top ()[LEFT] -= gh_scm2double (SCM_CAR (extra_dims));
- dims.top ()[RIGHT] += gh_scm2double (SCM_CAR (extra_dims));
+ dims.top ()[RIGHT] += gh_scm2double (SCM_CDR (extra_dims));
}
elems.push (e);
--- /dev/null
+/*
+ Audio-element-info.cc -- implement Audio_element_info
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "audio-element-info.hh"
+#include "request.hh"
+
+Audio_element_info::Audio_element_info (Audio_element*s_l, Music *r_l)
+{
+ elem_l_ = s_l;
+ req_l_ = r_l;
+}
+
+
+Audio_element_info::Audio_element_info()
+{
+ elem_l_ = 0;
+ req_l_ = 0;
+}
+
+
+
Auto_beam_engraver::Auto_beam_engraver ()
{
stem_l_arr_p_ = 0;
- shortest_mom_ = 1;
+ //shortest_mom_ = 1;
+ shortest_mom_ = Moment (1, 8);
finished_beam_p_ = 0;
finished_grouping_p_ = 0;
grouping_p_ = 0;
delete stem_l_arr_p_;
stem_l_arr_p_ = 0;
grouping_p_ = 0;
- shortest_mom_ = 1;
+ //shortest_mom_ = 1;
+ shortest_mom_ = Moment (1, 8);
}
}
stem_l_arr_p_ = 0;
delete grouping_p_;
grouping_p_ = 0;
- shortest_mom_ = 1;
+ //shortest_mom_ = 1;
+ shortest_mom_ = Moment (1, 8);
}
void
void
Bar_script_engraver::acknowledge_element (Score_element_info inf)
{
- if (inf.origin_grav_l_arr_.size () == 1)
+ if (inf.origin_trans_l_arr_.size () == 1)
{
Item *i=cast_to_interesting_item (inf.elem_l_);
if (!i)
/* Only put numbers on bars that are at our own level (don't put
numbers over the staffs of a GrandStaff, only over the GrandStaff
itself */
- if (inf.origin_grav_l_arr_.size () != 1)
+ if (inf.origin_trans_l_arr_.size () != 1)
return;
do_acknowledge_element (i);
void
Base_span_bar_engraver::acknowledge_element (Score_element_info i)
{
- int depth = i.origin_grav_l_arr_.size();
+ int depth = i.origin_trans_l_arr_.size();
if (depth > 1
&& dynamic_cast<Bar *> (i.elem_l_))
{
(c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include "lily-guile.hh"
#include "break-align-item.hh"
#include "dimensions.hh"
#include "p-score.hh"
+#include "paper-def.hh"
void
Break_align_item::do_pre_processing()
{
align_dir_ = break_status_dir();
flip (&align_dir_);
+ sort_elements ();
+
+
+ Link_array<Score_element> elems;
+ for (int i=0; i < elem_l_arr_.size(); i++)
+ {
+ Interval y = elem_l_arr_[i]->extent(axis ());
+ if (!y.empty_b())
+ elems.push (dynamic_cast<Score_element*> (elem_l_arr_[i]));
+ }
+
+
+ if (elems.size ())
+ {
+ Score_element *current_elt =elems[0];
+ SCM current_origin = current_elt->get_elt_property (origin_scm_sym);
+
+ if (current_origin != SCM_BOOL_F)
+ current_origin = SCM_CDR (current_origin);
+
+ for (int i=1; i < elems.size (); i++)
+ {
+ Score_element *next_elt = elems[i];
+ SCM next_origin = next_elt->get_elt_property (origin_scm_sym);
+ if (next_origin != SCM_BOOL_F)
+ {
+ next_origin = SCM_CDR(next_origin);
+ SCM extra_space = scm_eval (scm_listify (ly_symbol ("break-align-spacer"),
+ current_origin,
+ next_origin,
+ SCM_UNDEFINED));
+
+
+ Real spc = gh_scm2double (extra_space);
+ spc *= paper_l ()->get_realvar (interline_scm_sym);
+
+ current_elt->set_elt_property (extra_space_scm_sym,
+ scm_cons (gh_double2scm (0.0),
+ gh_double2scm (spc)));
+
+ }
+ current_elt = next_elt;
+ current_origin = next_origin;
+ }
+
+ }
Axis_align_item::do_pre_processing();
}
warning bells about missing Y refpoints go off later on.
*/
hg->dim_cache_[Y_AXIS]->parent_l_ = dim_cache_[Y_AXIS];
- hg->set_elt_property (ly_symbol("origin"),
- SCM_EOL);
+ hg->set_elt_property (ly_symbol("origin"), gh_str02scm (it->name()));
pscore_l_->typeset_element (hg);
add_element_priority (hg, priority);
if (priority == 0)
center_l_ = hg;
}
-
+
+ /*
hg->set_elt_property (ly_symbol("origin"),
scm_cons (gh_str02scm (it->name()),
hg->get_elt_property (ly_symbol ("origin"))));
+ */
hg->add_element (it);
for (int i=0; i < nongroups.size(); i++)
{ // Is this good enough?
Engraver * eng = dynamic_cast<Engraver*> (nongroups[i]);
- if (eng && eng!= info.origin_grav_l_arr_[0])
+ if (eng && eng!= info.origin_trans_l_arr_[0])
eng->acknowledge_element (info);
}
}
-Engraver_group_engraver::~Engraver_group_engraver ()
-{
-}
-
-Engraver_group_engraver::Engraver_group_engraver ()
-{
-}
}
-
void
Engraver::announce_element (Score_element_info i)
{
- i.origin_grav_l_arr_.push (this);
+ i.origin_trans_l_arr_.push (this);
daddy_grav_l()->announce_element (i);
}
*/
class Align_element : public virtual Axis_group_element {
Hash_table<Score_element*,int> priority_i_hash_;
- void sort_elements ();
public:
Interval threshold_interval_ ;
Score_element *get_elt_by_priority (int) const;
int get_priority (Score_element*) const;
protected:
+ void sort_elements ();
virtual void do_print() const;
virtual void do_substitute_element_pointer (Score_element*,Score_element*);
virtual void do_post_processing() ;
--- /dev/null
+/*
+ audio-item-info.hh -- declare Audio_item_info
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef AUDIO_ITEM_INFO_HH
+#define AUDIO_ITEM_INFO_HH
+
+#include "lily-proto.hh"
+#include "parray.hh"
+
+/**
+ Data container for broadcasts
+ */
+struct Audio_element_info {
+ Audio_element * elem_l_;
+ Music *req_l_;
+ Link_array<Translator> origin_trans_l_arr_;
+
+ Audio_element_info (Audio_element*, Music*);
+ Audio_element_info();
+};
+
+
+#endif
Array<Score_element_info> announce_info_arr_;
public:
VIRTUAL_COPY_CONS(Translator);
- Engraver_group_engraver();
- ~Engraver_group_engraver();
virtual Staff_info get_staff_info() const;
virtual void do_announces();
void read_lily_scm_file (String);
-void init_symbols ();
+void init_lily_guile ();
+
#include "ly-symbols.hh"
/*
- DIY gc protection.
+ Do It Yourself GC protection.
*/
SCM ly_protect_scm (SCM s);
SCM ly_unprotect_scm (SCM s);
struct Articulation_req;
struct Atom;
struct Audio_element;
+struct Audio_element_info;
struct Audio_column;
struct Audio_item;
struct Audio_key;
DECLARE_LY_SYMBOL(notewidth);
DECLARE_LY_SYMBOL(non_default);
DECLARE_LY_SYMBOL(octave_dir);
+DECLARE_LY_SYMBOL(origin);
DECLARE_LY_SYMBOL(output);
DECLARE_LY_SYMBOL(padding);
DECLARE_LY_SYMBOL(pianobrace);
class Performer_group_performer : public Performer, public virtual Translator_group {
public:
VIRTUAL_COPY_CONS(Translator);
-
+
+ virtual void do_announces();
+ virtual void announce_element (Audio_element_info);
+protected:
+ Array<Audio_element_info> announce_info_arr_;
};
#endif // PERFORMER_GROUP_PERFORMER_HH
#ifndef PERFORMER_HH
#define PERFORMER_HH
-#include "lily-proto.hh"
+#include "audio-element-info.hh"
#include "array.hh"
#include "request.hh"
#include "score-element-info.hh"
class Performer : public virtual Translator{
public:
VIRTUAL_COPY_CONS(Translator);
-
+ friend class Performer_group_performer;
Performer_group_performer* daddy_perf_l() const;
protected:
+ virtual void announce_element (Audio_element_info);
+ virtual void acknowledge_element (Audio_element_info);
+ virtual void process_acknowledged ();
virtual int get_tempo_i() const;
virtual void play (Audio_element * elem_p );
};
#endif // PERFORMER_HH
+
#ifndef STAFFELEMINFO_HH
#define STAFFELEMINFO_HH
-#include "scalar.hh"
#include "lily-proto.hh"
#include "parray.hh"
struct Score_element_info {
Score_element * elem_l_;
Music *req_l_;
- Link_array<Engraver> origin_grav_l_arr_;
+ Link_array<Translator> origin_trans_l_arr_;
Score_element_info (Score_element*, Music*);
Score_element_info();
String id_str_;
-
VIRTUAL_COPY_CONS(Translator);
-
void set_acceptor (String accepts, bool add);
void set_element (String elt, bool add);
void add_last_element (String elt);
void check_removal ();
-
Translator *get_simple_translator (String) const;
Translator_group *find_existing_translator_l (String n, String id);
Translator_group *find_create_translator_l (String n, String id);
output->add_at_edge (X_AXIS, RIGHT, m, 0);
}
- if (pitch_arr_.size())
- {
- Molecule m (lookup_l ()->fill (Box (
- Interval (0, paper_l ()->note_width ()),
- Interval (0,0))));
-
- output->add_at_edge (X_AXIS, RIGHT, m,0 );
- }
return output;
}
return list;
}
+SCM
+ly_warning (SCM str)
+{
+ assert (gh_string_p (str));
+ warning ("scheme: " + ly_scm2string (str));
+ return SCM_BOOL_T;
+}
+
+void
+init_functions ()
+{
+ scm_make_gsubr ("ly-warn", 1, 0, 0, ly_warning);
+}
+
+
+extern void init_symbols ();
+
+void
+init_lily_guile ()
+{
+ init_symbols();
+ init_functions ();
+}
*/
extern void ly_init_protection();
ly_init_protection();
- init_symbols ();
+ init_lily_guile ();
read_lily_scm_file ( "lily.scm");
cout << endl;
ADD_THIS_TRANSLATOR(Performer_group_performer);
+
+void
+Performer_group_performer::announce_element (Audio_element_info info)
+{
+ announce_info_arr_.push (info);
+ Performer::announce_element (info);
+}
+
+void
+Performer_group_performer::do_announces()
+{
+ Link_array<Translator_group> groups = group_l_arr ();
+ for (int i=0; i < groups.size(); i++)
+ {
+ Performer_group_performer * group = dynamic_cast<Performer_group_performer*> (groups[i]);
+ if (group)
+ {
+ group->do_announces();
+ }
+ }
+
+ Request dummy_req;
+
+ Link_array<Translator> nongroups = nongroup_l_arr ();
+ while (announce_info_arr_.size ())
+ {
+ for (int j =0; j < announce_info_arr_.size(); j++)
+ {
+ Audio_element_info info = announce_info_arr_[j];
+
+ if (!info.req_l_)
+ info.req_l_ = &dummy_req;
+ for (int i=0; i < nongroups.size(); i++)
+ { // Is this good enough?
+ Performer * eng = dynamic_cast<Performer*> (nongroups[i]);
+ if (eng && eng!= info.origin_trans_l_arr_[0])
+ eng->acknowledge_element (info);
+ }
+ }
+ announce_info_arr_.clear ();
+ for (int i=0; i < nongroups.size(); i++)
+ {
+ Performer * eng = dynamic_cast<Performer*> (nongroups[i]);
+ if (eng)
+ eng->process_acknowledged ();
+ }
+
+ }
+}
+
#include "performer-group-performer.hh"
#include "debug.hh"
-
-
-
void
Performer::play (Audio_element* p)
{
?dynamic_cast<Performer_group_performer *> (daddy_trans_l_)
: 0;
}
+
+void
+Performer::acknowledge_element (Audio_element_info)
+{
+}
+
+void
+Performer::process_acknowledged ()
+{
+}
+
+
+void
+Performer::announce_element (Audio_element_info i)
+{
+ i.origin_trans_l_arr_.push (this);
+ daddy_perf_l()->announce_element (i);
+}
String reststyle = get_property ("restStyle", 0);
if (reststyle.length_i ())
rest_p_->set_elt_property (style_scm_sym,
- gh_str02scm (reststyle.ch_C()));
+ gh_str02scm (reststyle.ch_C()));
}
announce_element (Score_element_info (rest_p_, rest_req_l_));
}
{
#ifndef NPRINT
DOUT << classname(this) << "{\n";
+ if (check_debug && !monitor->silent_b ("Score_element"))
+ ly_display_scm (element_property_alist_);
DOUT << "dependencies: " << dependency_size();
if (original_l_)
DOUT << "Copy ";
Score_engraver::announce_element (Score_element_info info)
{
announce_info_arr_.push (info);
- info.origin_grav_l_arr_.push (this);
+ info.origin_trans_l_arr_.push (this);
if (Spanner *s = dynamic_cast <Spanner *> (info.elem_l_))
pscore_p_->typeset_unbroken_spanner (s);
Score_performer::process()
{
process_requests();
+ do_announces ();
pre_move_processing();
check_removal();
}
Staff_margin_engraver::acknowledge_element (Score_element_info inf)
{
Item *i = cast_to_interesting_item (inf.elem_l_);
- if (!i || inf.origin_grav_l_arr_.size() != 1)
+ if (!i || inf.origin_trans_l_arr_.size() != 1)
return;
Molecule num (lookup_l ()->text ("italic",
number_str_));
num.align_to (X_AXIS, CENTER);
- num.translate_axis (dir_ * paper_l ()->get_realvar (interline_scm_sym), Y_AXIS);
-
+ Real interline = paper_l ()->get_realvar (interline_scm_sym);
+
if (beam_l_arr_.size () == 1 && !bracket_visibility_b_)
{
Beam *beam_l = beam_l_arr_[0];
Directional_spanner* ds = dynamic_cast<Directional_spanner*>(beam_l);
+
+ num.translate_axis (dir_ * interline, Y_AXIS);
num.translate (ds->center ());
num.translate_axis (ncw, X_AXIS);
}
Real dy = column_arr_.top ()->extent (Y_AXIS) [dir_]
- column_arr_[0]->extent (Y_AXIS) [dir_];
Real w = extent (X_AXIS).length () + ncw;
- // num.align_to (Y_AXIS, CENTER);
+ num.align_to (Y_AXIS, CENTER);
+ num.translate_axis (dir_ * interline, Y_AXIS);
+
num.translate (Offset (w/2, dy/2));
mol_p->add_molecule (lookup_l ()->plet (dy, w, dir_));
}
{
mol_p->add_molecule (num);
}
+ mol_p->translate_axis (dir_ * interline, Y_AXIS);
}
return mol_p;
}
bool
Vertical_align_engraver::qualifies_b (Score_element_info i) const
{
- Translator * t = i.origin_grav_l_arr_[0];
- int sz = i.origin_grav_l_arr_.size() ;
+ Translator * t = i.origin_trans_l_arr_[0];
+ int sz = i.origin_trans_l_arr_.size() ;
#if 0
return (sz == 1 && dynamic_cast<Translator_group*> (t))
{
valign_p_->add_element (i.elem_l_);
}
- else if (dynamic_cast<Span_bar*>(i.elem_l_) && i.origin_grav_l_arr_.size ())
+ else if (dynamic_cast<Span_bar*>(i.elem_l_) && i.origin_trans_l_arr_.size ())
{
i.elem_l_->add_dependency (valign_p_);
}
+%%In the file ly/auto-beam-settings.ly, all necessary i-iii settings should
+%%be listed, here's a new version with more comments, (hw, please include).
+%%duh
+
+% auto-beam-settings.ly
+% setup for auto-beam engraver
%
-% setup for auto beamer
-%
+% specify generic beam end times
-% *num_den (omitted if "1")
+% format:
+%
+% [time-signature]'beamAutoEnd'[duration]
+%
+% where
+%
+% time-signature = 'time'[numerator]'_'denominator; eg: 3_4
+% duration = [numerator]'_'denominator; eg: 3_8, _16
+%
-time2_8beamAutoEnd = "2/8";
+% in 3/2 time:
+% end beams each 1/2 note
+% end beams with 16th notes each 1/4 note
+% end beams with 32th notes each 1/8 note
time3_2beamAutoEnd = "1/2";
time3_2beamAutoEnd_16 = "1/4";
time3_2beamAutoEnd_32 = "1/8";
+
time3_4beamAutoBegin = "1/4";
time3_4beamAutoEnd_8 = "3/4";
time3_4beamAutoBegin_32 = "1/8";
time3_4beamAutoEnd_32 = "1/8";
+
time3_8beamAutoBegin = "1/8";
time3_8beamAutoEnd = "3/8";
+
+% in common time:
+% end beams each 1/2 note
+% end beams with 32th notes each 1/8 note
+% end beams with 1/8 triplets each 1/4 note
+
time4_4beamAutoEnd_8 = "1/2";
-% 1/12 == 1/8 * 2/3
time4_4beamAutoEnd_12 = "1/4";
time4_4beamAutoEnd_32 = "1/8";
+
time4_8beamAutoEnd_8 = "1/4";
time4_8beamAutoEnd_16 = "1/4";
time4_8beamAutoEnd_32 = "1/8";
+
time4_16beamAutoEnd = "1/8";
+
time6_8beamAutoEnd_8 = "3/8";
time6_8beamAutoEnd_16 = "3/8";
time6_8beamAutoEnd_32 = "1/8";
+
time9_8beamAutoEnd_8 = "3/8";
time9_8beamAutoEnd_16 = "3/8";
time6_8beamAutoEnd_32 = "1/8";
+%{
+
+Users may override in most cases, simply by issuing
+
+ % from here on consider ending beam every 1/4 note
+ \property Voice.beamAutoEnd = "1/4"
+
+ % no autobeaming
+ \property Voice.beamAuto = "0"
+
+or, more globally, by doing:
+
+ \paper{
+ \translator{
+ \VoiceContext
+ % consider ending beam at every 1/2 note
+ beamAutoEnd = "1/2";
+ }
+ }
+
+see also input/test/auto-beam-override.ly
+
+%}
+
alignmentReference = \center;
\consists "Staff_group_bar_engraver";
- \consistsend "Axis_group_engraver";
+
\accepts "Staff";
\accepts "RhythmicStaff";
\accepts "GrandStaff";
make all
ln -s /usr/share/texmf/fonts/tfm/public/cm/ tfm
-make -C Documentation info || true
+make -C Documentation || true
make htmldoc || true
strip lily/out/lilypond mi2mu/out/mi2mu
make prefix="$RPM_BUILD_ROOT/usr" install
-gzip -9fn $RPM_BUILD_ROOT/usr/info/* || true
+# gzip -9fn $RPM_BUILD_ROOT/usr/info/* || true
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
touch /tmp/.lilypond-install
rm `find /var/lib/texmf -name 'feta*pk -print' -or -name 'feta*tfm -print'` /tmp/.lilypond-install
-/sbin/install-info /usr/info/lilypond.info.gz /usr/info/dir || true
+# /sbin/install-info /usr/info/lilypond.info.gz /usr/info/dir || true
%preun
if [ $1 = 0 ]; then
- /sbin/install-info --delete /usr/info/lilypond.info.gz /usr/info/dir || true
+ true # /sbin/install-info --delete /usr/info/lilypond.info.gz /usr/info/dir || true
fi
/usr/bin/ly2dvi
/usr/bin/lilypond
/usr/bin/mi2mu
-/usr/info/*
/usr/man/man1/mi2mu.1
/usr/man/man1/lilypond.1
/usr/man/man1/mudela-book.1
Begin3
Titel: LilyPond
-Versie: 1.1.45
-Inschrijf datum: 28MAY99
+Versie: 1.1.46
+Inschrijf datum: 04JUN99
Beschrijving: @FLAPTEKST@
Trefwoorden: muziek typezetten midi notatie
Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
- 770k lilypond-1.1.45.tar.gz
+ 770k lilypond-1.1.46.tar.gz
Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 770k lilypond-1.1.45.tar.gz
+ 770k lilypond-1.1.46.tar.gz
Copi-eer voorwaarden: GPL
End
Begin3
Title: LilyPond
-Version: 1.1.45
-Entered-date: 28MAY99
+Version: 1.1.46
+Entered-date: 04JUN99
Description:
LilyPond is the GNU Project music typesetter. This program can print
beautiful sheet music from a music definition file. It can also play
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 770k lilypond-1.1.45.tar.gz
+ 770k lilypond-1.1.46.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 770k lilypond-1.1.45.tar.gz
+ 770k lilypond-1.1.46.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.1.45
+Version: 1.1.46
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.45.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.46.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
Packager: Han-Wen Nienhuys <hanwen@cs.uu.nl>
make all
ln -s /usr/share/texmf/fonts/tfm/public/cm/ tfm
-make -C Documentation info || true
+make -C Documentation || true
make htmldoc || true
strip lily/out/lilypond mi2mu/out/mi2mu
make prefix="$RPM_BUILD_ROOT/usr" install
-gzip -9fn $RPM_BUILD_ROOT/usr/info/* || true
+# gzip -9fn $RPM_BUILD_ROOT/usr/info/* || true
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
touch /tmp/.lilypond-install
rm `find /var/lib/texmf -name 'feta*pk -print' -or -name 'feta*tfm -print'` /tmp/.lilypond-install
-/sbin/install-info /usr/info/lilypond.info.gz /usr/info/dir || true
+# /sbin/install-info /usr/info/lilypond.info.gz /usr/info/dir || true
%preun
if [ $1 = 0 ]; then
- /sbin/install-info --delete /usr/info/lilypond.info.gz /usr/info/dir || true
+ true # /sbin/install-info --delete /usr/info/lilypond.info.gz /usr/info/dir || true
fi
/usr/bin/ly2dvi
/usr/bin/lilypond
/usr/bin/mi2mu
-/usr/info/*
/usr/man/man1/mi2mu.1
/usr/man/man1/lilypond.1
/usr/man/man1/mudela-book.1
localinstall:
mkdir -p $(datadir)
+ rm -f $(datadir)/cmtfm
$(LN_S) $(TEX_TFMDIR) $(datadir)/cmtfm
-
local-WWW-clean:
$(depth)/buildscripts/out/clean-fonts
input feta-klef;
input feta-timesig;
else:
- input feta-bolletjes;
+% input feta-bolletjes;
% input feta-banier;
% input feta-eindelijk;
% input feta-klef;
% input feta-toevallig;
-% input feta-schrift;
-% input feta-schrift;
+ input feta-schrift;
% input feta-haak;
% input feta-timesig;
fi
%
def set_horizontal_spacing =
save left_space ,right_space;
- left_space# = reduced_il#;
- right_space# = reduced_il#;
+ left_space# = 0;
+ right_space# = 0;
enddef;
--- /dev/null
+% feta-test16
+% part of LilyPond's pretty-but-neat music font
+
+input feta-autometric;
+fet_beginfont("feta-test", 16);
+staffsize#:=16pt#;
+test:=1;
+
+% smoked cheese
+% test := -1;
+
+
+% dem piksels.
+%test := 1;
+
+input feta-generic;
+
+fet_endfont("feta");
+
+end.
+
definition below. --MB
%}
-\version "1.0.16";
+\version "1.0.18";
global = \notes {
\property StaffGroup.timeSignatureStyle = "old"
0 0 moveto
- 0 tuplet_h lineto
+ 0 tuplet_h dir mul lineto
tuplet_dx tuplet_gapx sub 2 div
- tuplet_dy tuplet_gapy sub 2 div tuplet_h add lineto
+ tuplet_dy tuplet_gapy sub 2 div tuplet_h dir mul add lineto
tuplet_dx tuplet_gapx add 2 div
- tuplet_dy tuplet_gapy add 2 div tuplet_h add moveto
- tuplet_dx tuplet_dy tuplet_h add lineto
+ tuplet_dy tuplet_gapy add 2 div tuplet_h dir mul add moveto
+ tuplet_dx tuplet_dy tuplet_h dir mul add lineto
tuplet_dx tuplet_dy lineto
stroke
} bind def
(define Piano_bar_engraver_visibility postbreak_only_visibility)
(define Staff_group_bar_engraver_visibility postbreak_only_visibility)
-
-
+;; Spacing constants for prefatory matter.
+;;
+;; rules for this are complicated. See [Wanske] page 126 -- 134
+;;
+;;
+(define space-alist
+ '(
+ (("Clef_item" "Key_item") . 2.5)
+ (("Key_item" "Time_signature") . 2.5)
+ (("Clef_item" "Time_signature") . 2.75)
+ (("Staff_bar" "Clef_item") . 1.0)
+ (("Clef_item" "Staff_bar") . 3.7)
+ (("Time_signature" "Staff_bar") . 2.0)
+ (("Key_item" "Staff_bar") . 2.5)
+ (("Span_bar" "Clef_item") . 1.0)
+ (("Clef_item" "Span_bar") . 3.7)
+ (("Time_signature" "Span_bar") . 2.0)
+ (("Key_item" "Span_bar") . 2.5)
+ (("Staff_bar" "Time_signature") . 1.0)
+ )
+
+ )
+
+(define (break-align-spacer this next)
+ (let ((entry (assoc `(,this ,next) space-alist)))
+ (if entry
+ (cdr entry)
+ (begin (ly-warn (string-append "Unknown spacing pair " this ", " next))
+ 0.0))))
+
+
;;;;;;;; TeX
import sys
import re
import string
+import mpz
header = {}
global_voice_stuff = []
default_len = 4
global_key = [0] * 7 # UGH
+DIGITS='0123456789'
+def gcd (a, b):
+ while a % b:
+ a,b = b, a % b
+ return b
+
+class Rational:
+ def __init__ (self, n, d = 1):
+ self.num = n
+ self.den = d
+
+ def simplify (self):
+ g = gcd (self.num, self.den)
+ self.num = self.num / g
+ self.den = self.den /g
+ if self.den < 0:
+ self.den = - self.den
+ self.num = - self.num
+
+ def __sub__ (self, other):
+ pass
+
def dump_header (hdr):
def parse_num (str):
durstr = ''
- while str[0] in "1234567890":
+ while str[0] in DIGITS:
durstr = durstr + str[0]
str = str[1:]
return (str,n)
-def duration_to_mudela_duration (multiply_tup, defaultlen):
+def duration_to_mudela_duration (multiply_tup, defaultlen, dots):
base = 1
+ # (num / den) / defaultlen < 1/base
+ while base * multiply_tup[0] < defaultlen * multiply_tup[1]:
+ base = base * 2
+
+
+ return '%d%s' % ( base, '.'* dots)
+
+class Parser_state:
+ def __init__ (self):
+ self.next_dots = 0
+ self.next_den = 1
+
+
# WAT IS ABC EEN ONTZETTENDE PROGRAMMEERPOEP !
-def try_parse_note (str):
+def try_parse_note (str, parser_state):
mud = ''
slur_begin =0
str = str[1:]
num = 0
- den = 0
+ den = parser_state.next_den
+ parser_state.next_den = 1
(str, num) = parse_num (str)
if not num:
num = 1
if str[0] == '/':
- divide =1
- str = str[1:]
- (str, den) =parse_num (str)
-
- if not den: den = 1
+ while str[0] == '/':
+ str= str[1:]
+ d = 2
+ if str[0] in DIGITS:
+ (str, d) =parse_num (str)
+
+ den = den * d
+
+ current_dots = parser_state.next_dots
+ parser_state.next_dots = 0
+ while str[0] == '>':
+ str = str [1:]
+ current_dots = current_dots + 1;
+ parser_state.next_den = parser_state.next_den * 2
+
+ while str[0] == '<':
+ str = str [1:]
+ den = den * 2
+ parser_state.next_dots = parser_state.next_dots + 1
+
- print duration_to_mudela_duration ((num,den), default_len)
- print '%s%s%d' % (pitch_to_mudela_name(notename, acc + global_key[notename]) , octave_to_mudela_quotes (octave), duration_mult)
+
+ print '%s%s%s' % (pitch_to_mudela_name(notename, acc + global_key[notename]) , octave_to_mudela_quotes (octave),
+ duration_to_mudela_duration ((num,den), default_len, current_dots))
slur_end =0
if str[0] == ')':
return str
+def try_parse_escape (str):
+ if str [0] != '\\':
+ return str
+
+ str = str[1:]
+ if str[0] == 'K':
+ compute_key ()
+
+ return str
+
+
def try_parse_bar (str):
if str[0] == '|':
str = str[1:]
return str
-def try_parse_body_line (ln):
+
+
+def try_parse_body_line (ln, state):
prev_ln = ''
while ln and ln != prev_ln:
prev_ln = ln
- ln = try_parse_note (ln)
+ ln = try_parse_note (ln, state)
ln = try_parse_bar (ln)
ln = junk_space (ln)
+ ln = try_parse_escape (ln)
if ln:
print 'Huh %s' % ln
+
+
+
+
def parse_file (fn):
f = open (fn)
ls = f.readlines ()
head = 1
+ state = Parser_state ()
for l in ls:
if re.match ('^[\t ]*(%.*)?$', l):
continue
head = 0
if not head:
- m = try_parse_body_line (l)
+ m = try_parse_body_line (l,state)
def identify():
# -pipe makes it go faster, but is not supported on all platforms.
# EXTRA_CXXFLAGS= -Wall -Winline -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
-EXTRA_CXXFLAGS= -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
+EXTRA_CXXFLAGS= -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
CXXFLAGS = $(ICFLAGS) $(DEFINES) $(addprefix -I,$(INCLUDES)) $(USER_CFLAGS) $(EXTRA_CFLAGS) $(MODULE_CFLAGS) $($(PACKAGE)_CFLAGS) $($(PACKAGE)_CXXFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS)