\def\fetdef#1#2{%
\def#1{\hbox{\char#2}}}
+% huh? from where
\input feta20.sty
\font\fetasixteenfont=feta16
%
% \mud elafile{beam-repeat.ly}
+Beams should behave reasonably well, even under extreme circumstances.
+Stems may be short, but noteheads should never touch the beam.
+
+\mudelafile{beam-extreme.ly}
+
+Slurs should look nice and symmetric. The curvature may increase
+only to avoid noteheads, and as little as possible.
+
+\mudelafile{slur-symmetry.ly}
+\mudelafile{slur-symmetry-1.ly}
+
+Ties are strictly horizontal. They are placed in between note heads.
+The horizontal middle should not overlap with a staffline.
+
+\mudelafile{tie.ly}
+
Beams can be typeset over fixed distance aligned staffs, beam
beautification doesn't really work, but knees do. Beams should be
behave well, wherever the switching point is.
output, the key comes before the time signature: LilyPond knows about
music typesetting conventions.
verb(
- \repeat 2 {
+ \repeat "semi" 2 {
) COMMENT(
) This command tells LilyPond that the enclosed piece of music must
c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64 c'2. c'8. c'16
)
-mudela()(
+COMMENT(
\score {
\notes {
c'\longa c'\breve
Of course, you can also use different ratios, and use beamed notes or
rests:
-COMMENT( BROKEN
-
-lilypond: score-element.cc:134: class Paper_def * Score_element::paper() const: Assertion `pscore_l_' failed.
-
-mudela(fragment)(
+COMMENT(
+)mudela(fragment)(
\context Voice \times 4/5 { [c''8 c''16 c''16] r8 [g'8 g'8] }
)
-)
+
If you make a tuplet of beamed notes, where the beam is as wide as
the bracket, the bracket is omitted.
A repeated piece of music can consist of two parts: one part to be
repeated, and optionally, a list of alternative endings:
COMMENT(
+
)mudela(verbatim,fragment,center)(
\relative c'{
\time 2/4;
g' a
- \repeat 2 { b c }
+ \repeat "semi" 2 { b c }
\alternative {
{ d c } { d e }
}
a couple alternatives, but nothing is repeated. The code(\repeat) command
must be present, but it may specify an empty music list:
COMMENT(
+
)mudela(verbatim,fragment,center)(
\context Lyrics \lyrics {
- \repeat 2 { }
- \alternative <
+ \repeat "folded" 2 { }
+ \alternative {
{ Let's not sing
this twice }
{ Rather sing
this in- stead }
- >
+ }
}
)
+pl 56.jcn3
+ - slur de-hairification
+ * slurs always attached to noteheads, by default
+ * corrections for steep and high slurs
+ * snap to stem end when close
+ - bow/tie/slur dy/dx fix
+
+pl 56.hwn1
+ - some spacing tweaks.
+ - bf: two repeats + alts after each other.
+pl 56.jcn2
+ - tie: bfs + even simpler
+
+pl 56.jcn1
+ - bf: re-added \textflat,sharp to fix chords...
+ - bf: chord-modifier and mandatory dot: c-maj5
+ - tutorial chord fixes
+ - tie fixes and boldifying:
+ * removed sloping (dy!=0) code
+ * use actual note-widths
+ * y[left] == y[right]
+ * follow OSU rules, I hope (from comments in text -- must check)
+ * undetermined direction -> down; inverse of stem
+ - bf: beam: undetermined direction -> up; like stem
+ - slur-symmetry fixes
+ - fix for \rhythm and seq_iter childs (still crude, but more effective)
+*********
+
pl 55.uu1
- use GS' anti aliasing
Grep for TODO and ugh/ugr/urg.
.* TODO before 1.2
-. * rename abc2ly mup2ly
. * rename 'staff_line_leading' (who is being lead where?) to
staff_space, interline; (or other meaningful name) and use throughout lily
. * rename files to class-name:
. * p-score
. * engraver-group
. * standardise(d) switches: -v, --version; -d, --debug,
-. * Auto_beam debugging output (waarom/wanneer heb jij die weggehaald?)
+. * Peter 1. Key signatures are no longer transposed with the rest
+ of
+ the music.
+
+ \notes\transpose bes {\key D; d1 }
+ should produce no key signature (key C)
+
+ 2. Crescendos and other dynamic markings that start inside a
+ \grace { } section are ignored.
+
+ \notes \relative c' { fis4 r4 \grace { [g16 ( \< a16] }
+ ) b4 \! a8. g16}
+
+ 3. Slurs that end within a grace section but start outside
+ are treated strangely.
+ a2 d,4 ( \grace { [e16 ) d16]} cis8 d
+
+
+ 4. Lyrics and grace sections don't go too well together.
+ The words are aligned with the main note, not the start of the
+ grace note. This is usually wrong, but is sometimes right.
+
+
. * Auto_beam debugging output (waarom/wanneer heb jij die weggehaald?)
. * Rename illegal to invalid
. * Mats:
- The paper11/13/26 files have to be updated.
. * Grace_slur_engraver.
+. * input/star-spangled-banner.ly: fold for lyrics?
. * Break_req handling is silly (break_forbid () + \break fucks up.)
. * hangOnClef with non-breakable clefs.
. * do scaled fonts generally
. * fix partial measures in meaningful way.
+. * Michael
+
+- The two spacing bugs in the choral-1.ly I sent you earlier, small
+GIFs attached for easy reference: #1: time meter and first note on the
+line are too close; #2: last note on the line and next bar are too
+close.
+
+- And I haven't got any feedback on this one, posted last week:
+
+Check out:
+
+\score {
+ \notes \relative c' {
+ \context Staff <
+ \context Voice = one { \stemdown c1 c4 }
+ \context Voice = two { \stemup d1 d4 }
+ >
+ }
+}
+
+Notes are shifted as expected. Now check out:
+
+\score {
+ \notes \relative c' {
+ \context Staff <
+ \context Voice = one { \stemdown c1 <a4 c4> }
+ \context Voice = two { \stemup d1 d4 }
+ >
+ }
+}
+
+i.e. do
+
+- \context Voice = one { \stemdown c1 c4 }
++ \context Voice = one { \stemdown c1 <a4 c4> }
+
+Now the chord collides with the note of the other voice!
+
. * relative mode for midi2ly
+. *
+Crescendi/diminuendi that cross a line break lose their vertical
+position and all end up above the top staff line, see the
+following example.
+
+----------------
+\score{
+ \context StaffGroup <
+ \context Staff=s1 \notes\relative c'{
+ c d e f |
+ g f e d | \break %% If this break is removed, it works fine
+ c d e f |}
+ \context Staff=s2 \notes\relative c'{
+ c \< d e f |
+ g f e d |
+ c d e \! f |}
+ >
+}
. * uniformise recent feta contributions.
. * bigger and fatter 4/4 C
. * sort out directory stuff.
[/home/fred/usr/src/lilypond/scm/lily.scm]
warning: can't find file: `init'
. * indent = 0.0 with linewidth=-1.0
+. * collisions & accidentals.
. * auto-beaming in input/test/spacing.ly.
huh, snap niks van: gewone beam gaat wel goed. hoe kan abe nu
invloed hebben op beam-creatie, stopt toch gewoon stokken in?
. * Beam
. * Stem
. * Rhythmic_column and interaction stem/rhythmic_column/note_head/dots.
-. * Slur
. * Duration
. * clef engraver
. * parser
(require 'allout)
(outline-init 't)
+
++ pl 56.jcn3
++ - slur de-hairification
++ * slurs always attached to noteheads, by default
++ * corrections for steep and high slurs
++ * snap to stem end when close
++ - bow/tie/slur dy/dx fix
++
++
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=1
-PATCH_LEVEL=56
+PATCH_LEVEL=57
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
-
-
-
-/*#include <typeinfo>
-
-signature S
-{
- int foo ();
- int bar (int);
-};
-*/
-
#include <ctype.h>
#include "virtual-methods.hh"
--- /dev/null
+
+% TODO:
+% Copyright, Header etc.
+% Begleitsatz
+% Tempo
+
+\include "deutsch.ly"
+
+global = \notes {
+ \time 2/2; \partial 2*1;
+ \key g;
+
+ s2 | s1 | s1 |
+ \time 3/2;
+ s1. | s1. |
+ \time 2/2;
+ s1 | s1 | s1 | s2
+
+ s2 | s1 | s1 |
+ \time 3/2;
+ s1. | s1. |
+ \time 2/2;
+ s1 | s1
+ \time 3/2;
+ s1. \bar "||";
+
+ s1. | s1. | s1. | s1. |
+ s1. | s1. | s1. | s1. \bar "||";
+
+ \key es;
+ s1. | s1. | s1. | s1. |
+ s1. | s1. | s1. | s1 \bar "||";
+
+ \key g;
+ s2 |
+ \time 2/2;
+ s1 | s1 |
+ \time 3/2;
+ s1. | s1. |
+ \time 2/2;
+ s1 | s1 | s1 | s2
+
+ s2 | s1 | s1 |
+ \time 3/2;
+ s1. | s1. |
+ \time 2/2;
+ s1 | s1 | s1 \bar "|.";
+}
+
+themeMelody = \notes \relative c'' {
+ g2 | g d' | h a |
+ g fis g | a ~ a \breathe b |
+ d b | a a | g ~ g ~ | g \breathe
+
+ g2 | g d' | h a |
+ g fis g | a ~ a \breathe b |
+ d b |
+}
+
+themeBeforeBreak1EndMelody = \notes \relative c'' {
+ a2 a | g ~ g ~ g4 r4
+}
+
+themeFinalEndMelody = \notes \relative c'' {
+ a2 a ~ | a1^\fermata
+}
+
+themeRightHand = \notes \relative c' {
+ d2 | c <e g> | <e g> <d fis> | d2 es es4 c4 |
+ <d1 e1> <d2 f2> | <g2 b2> f2 | <cis2 e2> <e2 g2> |
+ <d2 f2> <c4 f4> cis4 | <dis2 fis2>
+
+ <c2 e2> | <c e> <e g> | <e g> <d fis> | d2 es es4 c4 |
+ <d1 e1> <d2 f2> | <g2 b2> f2 |
+}
+
+themeBeforeBreak1EndRightHand = \notes \relative c' {
+ <cis2 e2> <e2 g2> | <d2 f2> <c4 f4> cis4 <dis4 fis4> r4 |
+}
+
+themeFinalEndRightHand = \notes \relative c' {
+ <cis2 e2> <e2 g2> | <d1 f1>
+}
+
+themeLeftHand = \notes \relative c {
+ <d2 g h> | <f a h> <g c> | <g cis> c | <g2 {a4 c4}> <a2 c2> <g2 {b4 a4}> |
+ <a,1 fis'1 a1> <d2 g2 b2> | <g2 b2 e2> <f2 a2 d2> | <a2 h2> <a2 cis2> |
+ <g2 b2> a2 | h2
+
+ g2 | <g a> <g c> | <g cis> c | <g2 {a4 c4}> <a2 c2> <g2 {b4 a4}> |
+ <a,1 fis'1 a1> <d2 g2 b2> | <g2 b2 e2> <f2 a2 d2> |
+}
+
+themeBeforeBreak1EndLeftHand = \notes \relative c' {
+ <a2 h2> <a2 cis2> | <g2 b2> a2 h4 r4 |
+}
+
+themeFinalEndLeftHand = \notes \relative c' {
+ <a2 h2> <a2 cis2> | <g1 b1>
+}
+
+themePedal = \notes \relative c' {
+ g4 fis | f2 c | a' d, |
+ h c es | d ~ d b |
+ e, g | a a | d, f4 a | h2
+
+ c2 | e2 c | a' d, |
+ h c es | d ~ d b |
+ e, g |
+}
+
+themeBeforeBreak1EndPedal = \notes \relative c {
+ a2 a | d,2 f4 a h4 r4 |
+}
+
+themeFinalEndPedal = \notes \relative c {
+ a2 a | d,1_\fermata
+}
+
+break1Melody = \notes \relative c'' {
+ g4( fis e fis d' h | )a1. |
+ g4( es g b es g | <fis1. )a1.> |
+ b,2 g es | d1. |
+ b'2 g d' | a1 r2 |
+}
+
+break1RightHand = \notes \relative c' {
+ e1. | g4( fis e fis g fis |
+ )es1. | dis'2 d4 c b a \breathe |
+ s1. | s1. |
+ es1 <es2 g2> | <dis1 fis1 > r2 |
+}
+
+break1LeftHand = \notes \relative c {
+ <
+ \context Voice = oben {
+ \stemup
+ c'1. | d2. c4 h a | b1. | d1. |
+ }
+ \context Voice = unten {
+ \stemdown
+ <c,1. g'1.> | <d1. a'1.> | <es1. g1.> | d2. e4 fis d |
+ }
+ >
+ r4 b2( g4 b c | d c b g fis d |
+ <)es1 c'1> <c2 c'2> | <h1 h'1> r2 |
+}
+
+break2RightHand = \notes \relative c'' {
+ g8 r8 c,8 r8 <fis8 g8> r8 c r g' r c, r |
+ <fis8 g8> r c r b' r es, r <es g> r es r |
+ b' r es, r <es g> r es r d' r <d, g> r |
+ d' r f, r <f b> r f r d' r <fis, a> r |
+ d' r g, r <g b> r g r d' r g, r |
+ es' r g, r <g b> r g b es r <a, c> r |
+ d8 r b r d8 f d b a r <a cis> r |
+ <fis1 a d1> \breathe
+}
+
+break2LeftHand = \notes \relative c' {
+ r8 g r g r g r g r g r g |
+ r8 g r g r b r b r b r b |
+ r c r c r c r c r h r h |
+ r d r d r d r d r d r d |
+ r d r d r d r d r c r c |
+ r <b es> r <b es> r <b es> r <g es'> r f' r <a, f'> |
+ r <b f'> r <b f'> r <g f'> r <g f'> r <a e'> r <a e'> |
+ <d,1 d'1>
+}
+
+break2Pedal = \notes \relative c {
+ c2 c g' | es1 d2 | c1 h2 |
+ b1 d2 \breathe | g2 g f2 | es1 f2 |
+ b,2 g a | d1 \breathe
+}
+
+\score {
+ <
+ \context PianoStaff <
+ \context Staff = treble <
+ \global
+ \context Voice = melody {
+ \stemup \themeMelody \themeBeforeBreak1EndMelody
+ \break1Melody
+ \stemboth \break2RightHand
+ \stemup \themeMelody \themeFinalEndMelody
+ }
+ \context Voice = firstdown {
+ \stemdown \themeRightHand \themeBeforeBreak1EndRightHand
+ \break1RightHand
+ \notes {
+ s1. | s1. | s1. | s1. |
+ s1. | s1. | s1. | s1
+ }
+ \themeRightHand \themeFinalEndRightHand
+ }
+ >
+ \context Staff = bass <
+ \clef "bass";
+ \global
+ {
+ \themeLeftHand \themeBeforeBreak1EndLeftHand
+ \break1LeftHand
+ \break2LeftHand
+ \themeLeftHand \themeFinalEndLeftHand
+ }
+ >
+ >
+ \context Staff = pedal {
+ \clef "bass";
+ <
+ \global
+ {
+ \themePedal \themeBeforeBreak1EndPedal
+ \notes {
+ s1. | s1. | s1. | s1. |
+ s1. | s1. | s1. | s1. |
+ }
+ \break2Pedal
+ \themePedal \themeFinalEndPedal
+ }
+ >
+ }
+ >
+
+ \header {
+ title = "Choral I";
+ subtitle = "(über ``Aus meines Herzens Grunde'')";
+ composer = "Michael Krause 1999 (*1977)";
+ enteredby = "Michael Krause";
+ copyright = "dunno";
+ }
+
+ \paper {
+ linewidth = 18.0 \cm;
+ textheight = 28.0 \cm;
+
+ indent = 0.0 \mm;
+ \translator { \OrchestralScoreContext }
+ }
+}
--- /dev/null
+\score {
+ \notes {
+ c'\longa c'\breve
+ c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64 c'2. c'8. c'16
+ }
+ \paper {
+ linewidth = -1.0;
+ \translator { \type "Score_engraver";
+ \name "Score";
+ \consists "Note_heads_engraver";
+ \consists "Stem_engraver";
+ \consists "Rhythmic_column_engraver";
+ }}}
+
+++ /dev/null
-text = \lyrics { four4 syl- la ble }
-two = \notes { c4. c8 }
-fourn = \notes { c4. c8 c4. c8 }
-fiven = \notes { [c16 c16 \bar ""; <{ c8 } { c16 c16 }> c8 }
-
-\score { \notes{
- \context Staff = SA
- < \context Staff { \two }
- \context Lyrics { \rhythm \fourn \text }
- >
- < \context Staff { \two }
- \context Lyrics { \rhythm \two \text }
- >
- < \context Staff { \fiven }
- \context Lyrics { \rhythm \fiven \text }
- >
-
-}
-}
%{
-Converted from star.mup with the aid of mup-to-ly.py
+Converted from star.mup with the aid of mup2ly.py
http://www.Arkkra.com/doc/star.html
http://www.Arkkra.com/doc/star.ps
%}
g8. g16 fis4.()a,8 d8 e8 fis2 b8 b8 a4. a8 a,4 d2 s4
}
-text = \lyrics
- { Oh4 __ \repeat fold 2 { }
+% hw: how does this work with new repeats?
+textx = \lyrics {
+ Oh4 __ \repeat fold 2 { }
\alternative {
- { say.4 can you | see,2 by8. the16 dawn's4 ear- ly light2 What8
- so8 proud-4. ly8 we4 hailed,2 At8. the16 twi-4 light's last gleam-
- ing. Whose8. broad16 }
+ {
+ say.4 can you | see,2 by8. the16 dawn's4 ear- ly light2 What8
+ so8 proud-4. ly8 we4 hailed,2 At8. the16 twi-4 light's last gleam-
+ ing. Whose8. broad16
+ }
- { stripes4 and bright stars,2 through8. the16 per-4 il- ous fight,2
- O'er8 the8 ram-4. parts8 we4 watched,2 were8. so16 gal-4 lant- ly }
+ {
+ stripes4 and bright stars,2 through8. the16 per-4 il- ous fight,2
+ O'er8 the8 ram-4. parts8 we4 watched,2 were8. so16 gal-4 lant- ly
+ }
}
stream-4 ing. And8. the16 rock-4 ets' red glare,2 the8 bombs8
burst-4 ing in air,2 gave4 proof4. through8 the4 night2 that8.
and8 the8 home4. of8 the4 brave.2
}
+text = \lyrics {
+ Oh4 __
+ %\alternative {
+ {
+ say.4 can you | see,2 by8. the16 dawn's4 ear- ly light2 What8
+ so8 proud-4. ly8 we4 hailed,2 At8. the16 twi-4 light's last gleam-
+ ing. Whose8. broad16
+ }
+
+ %{
+ stripes4 and bright stars,2 through8. the16 per-4 il- ous fight,2
+ O'er8 the8 ram-4. parts8 we4 watched,2 were8. so16 gal-4 lant- ly
+ }
+ %}
+ stream-4 ing. And8. the16 rock-4 ets' red glare,2 the8 bombs8
+ burst-4 ing in air,2 gave4 proof4. through8 the4 night2 that8.
+ our16 flag4 was still there,2 Oh4 say, does that star- span-
+ gled ban- ner yet wave,2 __ O'er8. the16 land2 __ of8 the8 free2
+ and8 the8 home4. of8 the4 brave.2
+}
+
global = \notes {
\time 3/4;
\key D;
--- /dev/null
+\score{
+ \notes\relative c''{
+ [g8 c c,]
+ [c16 c'' a f]
+ \stemup
+ [c,,32 c'' a f]
+
+ }
+ \paper{
+ linewidth=-1.;
+ }
+}
}
tab = \notes\transpose c'''\chords{
- c1 c-m c-4 c-m.4 c-5+ c-5- c-m.5- c-5-.5+ c-6\break %c-m6\break
+ c1 c-m c-4 c-m4 c-5+ c-5- c-m5- c-5-.5+ c-6\break %c-m6\break
}
\score{
-\rhythm { 4. 8 8. 16 } { c'' d e f }
+%\rhythm { 4. 8 8. 16 } { c'' d e f }
+\rhythm { c4. c8 c8. c16 } { c'' d e f }
\score{
\context Voice \notes\relative c''{
- c4. 8 4. 8
+ % still thinking 'bout this
+ %c4. 8 4. 8
+ c4. c8 c4. c8
}
}
+++ /dev/null
-
-
-
-\version "1.1.52";
-
-onestaff = \context Staff = foo\notes {
- \property Staff.instr = instr
- \property Staff.instrument = instrument \mark "B"; c1 \mark "A"; \break c2 c2 \break }
-
-grstaff = \notes \context GrandStaff <
- \context Staff = bar {
-
- \property Staff.instr = instr
-
- \mark "B"; \break c1 \mark "A"; c2 }
- \context Staff = bufl { c1 c2 } >
-
-scpaper = \paper {Score = \translator {
- \context Score_engraver;
- barScriptPadding = "2.0"; % dimension \pt
- markScriptPadding = "4.0";
- barColumnPriority = "-4";
- markBreakPriority = "-4";
- barNumberBreakPriority = "-4";
-
- \consists "Timing_engraver";
- \consists "Bar_column_engraver";
- \consists "Bar_number_engraver";
- \consists "Mark_engraver";
- \consists "Span_score_bar_engraver";
- \consists "Score_priority_engraver";
- \consists "Priority_horizontal_align_engraver";
- \consists "Vertical_align_engraver";
-
- \accepts "ChoirStaff";
- \accepts "StaffGroup";
- \accepts "Staff";
- \accepts "RhythmicStaff";
- \accepts "Lyrics";
- \accepts "GrandStaff";
-}}
-
-stpaper =\paper{
-Staff = \translator {
- \context "Line_group_engraver_group";
- defaultclef = violin;
- barColumnPriority = "0";
-
- marginBreakPriority = "-4";
-
- \consists "Bar_engraver";
- \consists "Clef_engraver";
- \consists "Key_engraver";
- \consists "Time_signature_engraver";
- \consists "Local_key_engraver";
- \consists "Staff_sym_engraver";
- \consists "Mark_engraver";
- \consists "Collision_engraver";
- \consists "Rest_collision_engraver";
- \consists "Bar_column_engraver";
- \consists "Bar_number_engraver";
- \consists "Separating_line_group_engraver";
- \consists "Staff_margin_engraver";
- \accepts "Voice";
-}}
-
-scscore = \score { \grstaff \paper {
-\scpaper
-}}
-
-
-stscore = \score { \onestaff \paper {
- \stpaper
-}}
-
-%\score {\stscore}
-\score {\scscore}
-\header{
-% should look the same
-title="symmetry";
-}
\score{
- \notes\relative c'{
- [g'8( e )c' g,] r2
- \break
- [d''8( f )a, d'] r2
- }
+ \notes\relative c''<
+ \time 4/4;
+ \context Staff{
+ f8(f f)f f(g g)f f(a a)f f(b b)f
+ }
+ \context Staff=x{
+ e,(e e)e e(d d)e e(c c)e e(b b)e
+ }
+ >
\paper{
- castingalgorithm = \Wordwrap;
- linewidth = 50.0\mm;
+ linewidth=-1.;
}
}
--- /dev/null
+\header{
+% should look the same
+title="symmetry";
+}
+\score{
+ \notes\relative c'{
+ [g'8( e )c' g,]
+ [d'( f' )a, a]
+ [d( f )a, d']
+ [g,( e, )c' c]
+ }
+ \paper{
+ castingalgorithm = \Wordwrap;
+ linewidth = 50.0\mm;
+ }
+}
--- /dev/null
+\header{
+% should look the same
+title="symmetry";
+}
+\score{
+ \notes\relative c'{
+ [g'8( e )c' g,] r2
+ \break
+ [d''8( f )a, d'] r2
+ }
+ \paper{
+ castingalgorithm = \Wordwrap;
+ linewidth = 50.0\mm;
+ }
+}
-\header{
-% should look the same
-title="symmetry";
-}
\score{
- \notes\relative c'{
- [g'8( e )c' g,]
- [d'( f' )a, a]
- [d( f )a, d']
- [g,( e, )c' c]
- }
+ \notes\relative c'<
+ \time 6/8;
+ \context Staff{
+ e8(e)e e(d)e e(c)e e(b)e
+ }
+ \context Staff=x{
+ f'8(f)f f(g)f f(a)f f(b)f
+ }
+ >
\paper{
- castingalgorithm = \Wordwrap;
- linewidth = 50.0\mm;
+ linewidth=-1.;
}
}
-\version "1.1.52";
-
-tie = \notes\transpose c''{
-
- e4 ~ e e e ~ |
- e ~ a a a ~ |
- a d d d ~ |
- e e e e |
- g,, g,, g,, g,, ~ |
- g,, g,, g,, g,, |
-}
-
\score{
- \tie
- \paper{
- indent = 0.0\pt;
- linewidth= 30.\mm;
- castingalgorithm = \Wordwrap;
+ \notes\relative c''{
+ %b2~b4~b8~b16~b32~b64 r64\break
+ %a2~a4~a8~a16~a32~a64 r64
+ d2~d4~d8~d16~d32~d64 r64\break
+ a2~a4~a8~a16~a32~a64 r64
+ %c2~c4~c8~c16~c32~c64 r64
+ }
+ \paper{
+ linewidth=0.;
}
}
c' d e f |
\repeat semi 2 { g a b c }
\alternative { { c b a g a g a g} { f e d c } } \break
-c, d e f | % Assertion failure if this line is removed!!
+%c, d e f | % Assertion failure if this line is removed!!
\repeat semi 2 { g a b c }
\alternative { { c b a g \break a g a g} { f e d c } } \break
c, d e f |
+++ /dev/null
-
-%{
-What's supposed to be demonstrated here?
-%}
-\score{
- \context Staff \notes\relative c'''{
- < \context Voice = one {
- \stemup
- \voiceone
- [g8 a g f]
- }
- \context Voice=two
- {
- \stemdown
- \voicetwo
- [c8 f e d]
- }>
- }
- \paper{
- linewidth=-1.;
- }
-}
-
-\version "1.1.52";
+++ /dev/null
-\header{
-enteredby = "jcn";
-copyright = "PD";
-TestedFeatures = "This file tests trills" +
- "(Feta definitively is not an abbreviation of Font-En-TjA)";
-}
-
-\version "1.1.52";
-
-\score{
- \notes{
- c-\prall c-\mordent c-\prallprall c-\prallmordent
- c-\upprall c-\downprall
- }
- \paper{ }
-}
-
source file of the GNU LilyPond music typesetter
- (c) 1997--1999, 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
wants to provide some real simple hands-on rules.
We have our doubts, so we simply provide all sensible alternatives.
+
+ If dir is not determined: up (see stem::get_default_dir ())
*/
Dir_algorithm a = (Dir_algorithm)rint(paper_l ()->get_var ("beam_dir_algorithm"));
switch (a)
{
case MAJORITY:
- beamdir = (count[UP] > count[DOWN]) ? UP : DOWN;
+ beamdir = (count[UP] >= count[DOWN]) ? UP : DOWN;
break;
case MEAN:
// mean center distance
- beamdir = (total[UP] > total[DOWN]) ? UP : DOWN;
+ beamdir = (total[UP] >= total[DOWN]) ? UP : DOWN;
break;
default:
case MEDIAN:
// median center distance
+ if (!count[DOWN])
+ beamdir = UP;
if (!count[UP])
beamdir = DOWN;
- else if (!count[DOWN])
- beamdir = UP;
else
- beamdir = (total[UP] / count[UP] > total[DOWN] / count[DOWN]) ? UP : DOWN;
+ beamdir = (total[UP] / count[UP] >= total[DOWN] / count[DOWN]) ? UP : DOWN;
break;
}
return beamdir;
cout << "dy_f_r: " << dy_f_drul_[RIGHT] << endl;
cout << "dy_f: " << dy_f_drul_[RIGHT] - dy_f_drul_[LEFT] << endl;
}
- a.translate (Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT]));
-
return new Molecule (a);
}
Array<Offset>
Bow::get_encompass_offset_arr () const
{
- Offset d (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
- dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
- d.x() += extent (X_AXIS). length ();
-
- Array<Offset> notes;
- notes.push (Offset (0, 0));
- notes.push (d);
-
- return notes;
+ Array<Offset> offset_arr;
+ offset_arr.push (Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT]));
+ offset_arr.push (Offset (do_width ().length () + dx_f_drul_[RIGHT],
+ dy_f_drul_[RIGHT]));
+
+ return offset_arr;
}
void
Break_align_item::do_pre_processing()
{
- align_dir_ = break_status_dir();
+ if (break_status_dir() == LEFT)
+ align_dir_ = LEFT;
+ else
+ align_dir_ = RIGHT;
+
flip (&align_dir_);
sort_elements ();
Real interline= paper_l ()->get_realvar (interline_scm_sym);
elems.push (dynamic_cast<Score_element*> (elem_l_arr_[i]));
}
-
-
if (!elems.size ())
return;
assert (0);
}
-Encompass_info::Encompass_info (Note_column const* note, Direction dir, Slur const* slur_l)
+Encompass_info::Encompass_info (Note_column const* note_column, Direction dir, Slur const* slur_l)
{
interstaff_f_ = 0;
- Paper_def* paper = note->paper_l ();
-
- // UGH
- Real notewidth = paper->note_width () * 0.8;
-
-
- Stem* stem_l = note->stem_l_;
+ Stem* stem_l = note_column->stem_l_;
if (!stem_l)
{
- warning ("Slur over rest?");
- o_[X_AXIS] = note->hpos_f ();
+ warning (_ ("Slur over rest?"));
+ o_[X_AXIS] = note_column->hpos_f ();
return;
}
- Real internote = stem_l-> staff_line_leading_f ()/2.;
+ o_[X_AXIS] = stem_l->hpos_f ();
+#if 0
/*
+ Let's not do this; yields ugly assymetric slurs.
+
set o_[X_AXIS] to middle of notehead or on the exact position of stem,
according to slur direction
- */
- o_[X_AXIS] = stem_l->hpos_f ();
- /*
+
stem_l->dir == dir
________
| | / \
*/
+ dx_f_drul_[d] = -d * spanned_drul_[d]->extent (X_AXIS).length ();
+
if (stem_l->dir_ != dir)
- o_[X_AXIS] -= 0.5 * notewidth * stem_l->dir_;
+ o_[X_AXIS] -= 0.5 * stem_l->dir_ * note_column->extent (X_AXIS).length ();
+
+#else
- o_[Y_AXIS] = stem_l->extent (Y_AXIS)[dir];
/*
- leave a gap: slur mustn't touch head/stem
+ Instead; simply set x to middle of notehead
*/
- o_[Y_AXIS] += 2.5 * internote * dir;
- if (stem_l->dir_ != dir)
- o_[Y_AXIS] += 1.0 * internote * dir;
+ o_[X_AXIS] -= 0.5 * stem_l->dir_ * note_column->extent (X_AXIS).length ();
+
+#endif
+
+ if (stem_l->dir_ == dir)
+ {
+ o_[Y_AXIS] = stem_l->extent (Y_AXIS)[dir];
+ }
+ else
+ {
+ o_[Y_AXIS] = note_column->extent (Y_AXIS)[dir];
+ }
+ /*
+ leave a gap: slur mustn't touch head/stem
+ */
+ o_[Y_AXIS] += dir * slur_l->paper_l ()->get_var ("slur_y_free");
Dimension_cache *common = stem_l->common_group (slur_l, Y_AXIS);
Align_element * align = dynamic_cast<Align_element*> (common->element_l ());
interstaff_f_ = align->threshold_interval_[MIN];
Dimension_cache * slur_refpoint = slur_l->dim_cache_[Y_AXIS];
- Dimension_cache * note_refpoint = note->dim_cache_[Y_AXIS];
+ Dimension_cache * note_refpoint = note_column->dim_cache_[Y_AXIS];
while (slur_refpoint->parent_l_ != common)
slur_refpoint = slur_refpoint->parent_l_;
*/
class Slur : public Bow
{
- bool broken_edge_b ( Direction dir) const;
- bool normal_edge_b ( Direction dir) const;
- Drul_array<Note_column*> extrema () const;
-
public:
Slur ();
VIRTUAL_COPY_CONS(Score_element);
source file of the GNU LilyPond music typesetter
- (c) 1997--1999, 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
%type <pitch_arr> pitch_list
%type <music> chord
%type <pitch_arr> chord_additions chord_subtractions chord_notes
-%type <pitch> chord_addsub chord_note chord_inversion
+%type <pitch> chord_note chord_inversion
%type <midi> midi_block midi_body
%type <duration> duration_length
| '-' chord_notes {
$$ = $2;
}
+ | '-' CHORDMODIFIER_PITCH {
+ $$ = new Array<Musical_pitch>;
+ $$->push (*$2);
+ }
+ | '-' CHORDMODIFIER_PITCH chord_notes {
+ $$ = $3;
+ $$->push (*$2);
+ }
;
chord_notes:
- chord_addsub {
+ chord_note {
$$ = new Array<Musical_pitch>;
$$->push (*$1);
}
- | chord_notes '.' chord_addsub {
+ | chord_notes '.' chord_note {
$$ = $1;
$$->push (*$3);
}
forevery : X : optional_X sucks. Devise a solution.
*/
-
-chord_addsub:
- chord_note
- | CHORDMODIFIER_PITCH
- ;
-
chord_inversion:
{
$$ = 0;
else
becel.append (new Bar_create_event (walk_mom, "stop"));
}
- }
- create_barmoments_queue_ = becel.head_ ;
+ }
+
+ Cons<Bar_create_event> *&tail = create_barmoments_queue_
+ ? last_cons (create_barmoments_queue_)->next_
+ : create_barmoments_queue_;
+
+ tail = becel.head_ ;
becel.head_ = 0;
}
/*
Do all the events that need to be done now.
*/
- bool stop = false;
while (head && now_mom () == head->car_->when_)
{
create_barmoments_queue_ = create_barmoments_queue_->next_;
#include "debug.hh"
#include "sequential-music-iterator.hh"
#include "music-list.hh"
+// hmm
+//#include "request-chord-iterator.hh"
+#include "request-iterator.hh"
void
Sequential_music_iterator::do_print() const
}
else
{
- // urg FIXME: grace-iterator::next_music_l () fools me!
- if (dynamic_cast<Grace_iterator*> (iter_p_))
- iter_p_ = 0;
+ // urg FIXME: sequential children should be iterated to finish
+ if (dynamic_cast<Request_chord_iterator*> (iter_p_))
+ delete iter_p_;
+ iter_p_ = 0;
leave_element ();
if (cursor_)
source file of the GNU LilyPond music typesetter
- (c) 1996, 1997--1999, 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1996, 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
/*
[TODO]
- * URG: share code with tie
- * begin and end should be treated as a Script.
- * damping
- * slur from notehead to stemend: c''()b''
+ * begin and end should be treated as a/acknowledge Scripts.
+ * broken slur should have uniform trend
*/
#include "slur.hh"
else
{
encompass_arr_.push (n);
- // n->stem_l_->slur_l_ = this;
add_dependency (n);
}
}
return Item::left_right_compare (n1, n2);
}
-bool
-Slur::broken_edge_b ( Direction dir) const
-{
- return extrema ()[dir] != spanned_drul_[dir];
-}
-
-bool
-Slur::normal_edge_b ( Direction dir) const
-{
- Note_column *n = extrema ()[dir];
- return !broken_edge_b ( dir)
- && n->stem_l_
- && n->stem_l_->get_elt_property (transparent_scm_sym) == SCM_BOOL_F
- && n->head_l_arr_.size ();
-}
-
-Drul_array<Note_column*>
-Slur::extrema ()const
-{
- Drul_array<Note_column*> extrema;
- extrema[LEFT] = encompass_arr_[0];
- extrema[RIGHT] = encompass_arr_.top ();
- return extrema;
-}
-
-/*
- TODO.
-
- Unhair this.
- */
void
Slur::do_post_processing ()
{
if (!dir_)
dir_ = get_default_dir ();
- Real interline_f = paper_l ()->get_realvar (interline_scm_sym);
- Real internote_f = interline_f / 2;
- // URG
- Real notewidth_f = paper_l ()->note_width () * 0.8;
-
/*
- [OSU]: slur and tie placement
+ Slur and tie placement [OSU]
- slurs:
- * x = center of head (upside-down: inner raakpunt stem) - d * gap
+ Slurs:
+ * x = centre of head - d * x_gap_f
- * y = length < 5ss : horizontal raakpunt + d * 0.25 ss
+ TODO:
+ * y = length < 5ss : horizontal tangent + d * 0.25 ss
y = length >= 5ss : y next interline - d * 0.25 ss
- --> height <= 5 length ?? we use <= 3 length, now...
*/
-
- Real gap_f = paper_l ()->get_var ("slur_x_gap");
+ Real interline_f = paper_l ()->get_realvar (interline_scm_sym);
+ Real internote_f = interline_f / 2;
+
+ Real x_gap_f = paper_l ()->get_var ("slur_x_gap");
+ Real y_gap_f = paper_l ()->get_var ("slur_y_gap");
+
+ Drul_array<Note_column*> note_column_drul;
+ note_column_drul[LEFT] = encompass_arr_[0];
+ note_column_drul[RIGHT] = encompass_arr_.top ();
- Direction d=LEFT;
-
+ bool fix_broken_b = false;
+ Direction d = LEFT;
do
{
- if (broken_edge_b (d))
+ dx_f_drul_[d] = dy_f_drul_[d] = 0;
+ if ((note_column_drul[d] == spanned_drul_[d])
+ && note_column_drul[d]->head_l_arr_.size ()
+ && (note_column_drul[d]->stem_l_))
{
- // ugh -- check if needed
- dx_f_drul_[d] = -d
- *(spanned_drul_[d]->extent (X_AXIS).length () - 0.5 * notewidth_f);
-
- // prebreak
- if (d == RIGHT)
+ Stem* stem_l = note_column_drul[d]->stem_l_;
+ /*
+ side directly attached to note head;
+ no beam getting in the way
+ */
+ if (((stem_l->get_elt_property (transparent_scm_sym) != SCM_BOOL_F)
+ || !((stem_l->dir_ == dir_) && (dir_ != d)))
+ && !((dir_ == stem_l->dir_)
+ && stem_l->beam_l_ && (stem_l->beams_i_drul_[-d] >= 1)))
{
- dx_f_drul_[LEFT] = spanned_drul_[LEFT]->extent (X_AXIS).length ();
-
- // urg -- check if needed
- if (encompass_arr_.size () > 1)
- dx_f_drul_[RIGHT] += notewidth_f;
+ dx_f_drul_[d] = spanned_drul_[d]->extent (X_AXIS).length () / 2;
+ dx_f_drul_[d] -= d * x_gap_f;
+
+ if (stem_l->dir_ != dir_)
+ {
+ dy_f_drul_[d] = note_column_drul[d]->extent (Y_AXIS)[dir_];
+ }
+ else
+ {
+ dy_f_drul_[d] = stem_l->chord_start_f ()
+ + dir_ * internote_f;
+ }
+ dy_f_drul_[d] += dir_ * y_gap_f;
}
- }
- /*
- normal slur
- */
- else if (normal_edge_b (d))
- {
- Real notewidth_f = extrema ()[d]->extent (X_AXIS).length ();
- dy_f_drul_[d] = (int)rint (extrema ()[d]->stem_l_-> extent (Y_AXIS)[dir_]);
- dx_f_drul_[d] += 0.5 * notewidth_f - d * gap_f;
- if (dir_ == extrema ()[d]->stem_l_->dir_)
+ /*
+ side attached to (visible) stem
+ */
+ else
{
- if (dir_ == d)
- dx_f_drul_[d] += 0.5 * dir_ * notewidth_f;
+ dx_f_drul_[d] = stem_l->hpos_f ()
+ - spanned_drul_[d]->absolute_coordinate (X_AXIS);
+ /*
+ side attached to beamed stem
+ */
+ if (stem_l->beam_l_ && (stem_l->beams_i_drul_[-d] >= 1))
+ {
+ dy_f_drul_[d] = stem_l->extent (Y_AXIS)[dir_];
+ dy_f_drul_[d] += dir_ * 2 * y_gap_f;
+ }
+ /*
+ side attached to notehead, with stem getting in the way
+ */
else
- dx_f_drul_[d] += 0.25 * dir_ * notewidth_f;
+ {
+ dx_f_drul_[d] -= d * x_gap_f;
+
+ dy_f_drul_[d] = stem_l->chord_start_f ()
+ + dir_ * internote_f;
+ dy_f_drul_[d] += dir_ * y_gap_f;
+ }
}
}
- else
- {
- Real notewidth_f = extrema ()[d]->extent (X_AXIS).length ();
- dy_f_drul_[d] = (int)rint (extrema ()[d]->head_positions_interval ()
- [dir_]) * internote_f;
- dx_f_drul_[d] += 0.5 * notewidth_f - d * gap_f;
+ /*
+ loose end
+ */
+ else
+ {
+ dx_f_drul_[d] -= d * x_gap_f;
+ /*
+ broken: should get y from other piece, so that slur
+ continues up/down trend
+
+ for now: be horizontal..
+ */
+ fix_broken_b = true;
}
- dy_f_drul_[d] += dir_ * interline_f;
- if (extrema ()[d]->stem_l_ && (dir_ == extrema ()[d]->stem_l_->dir_))
- dy_f_drul_[d] -= dir_ * internote_f;
- }
- while (flip(&d) != LEFT);
+ }
+ while (flip (&d) != LEFT);
- // now that both are set, do dependent
- do
- {
- if (broken_edge_b (d))
- {
- Direction u = d;
- flip(&u);
+ if (fix_broken_b)
+ do {
+ if (dy_f_drul_[d])
+ dy_f_drul_[-d] = dy_f_drul_[d];
+ }
+ while (flip (&d) != LEFT);
+
+
+ /*
+ Now we've got a fine slur
+ Catch and correct some ugly cases
+ */
- // postbreak
- if (d == LEFT)
- dy_f_drul_[u] += dir_ * internote_f;
+ Real dx_f = do_width ().length () + dx_f_drul_[RIGHT] - dx_f_drul_[LEFT];
+ Real dy_f = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
+ Real height_f = do_height ().length ();
- dy_f_drul_[d] = dy_f_drul_[u];
- }
- }
- while (flip(&d) != LEFT);
+ Real height_damp_f = paper_l ()->get_var ("slur_height_damping");
+ Real slope_damp_f = paper_l ()->get_var ("slur_slope_damping");
+ Real ratio_f;
+
+
+ /*
+ Avoid too steep slurs.
+ */
+ ratio_f = abs (dy_f / dx_f);
+ if (ratio_f > slope_damp_f)
+ {
+ Direction d = (Direction)(- dir_ * (sign (dy_f)));
+ if (!d)
+ d = LEFT;
+ dy_f_drul_[d] += dir_ * (ratio_f - slope_damp_f) * dx_f;
+ }
/*
- Slur should follow line of music
+ Avoid too high slurs
*/
- if (normal_edge_b (LEFT)
- && normal_edge_b (RIGHT)
- && (extrema ()[LEFT]->stem_l_ != extrema ()[RIGHT]->stem_l_))
+ ratio_f = abs (height_f / dx_f);
+ if (ratio_f > height_damp_f)
{
- Real note_dy = extrema ()[RIGHT]->stem_l_->head_positions ()[dir_]
- - extrema ()[LEFT]->stem_l_->head_positions ()[dir_];
- Real dy = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
+ Direction d = (Direction)(- dir_ * (sign (dy_f)));
+ if (!d)
+ d = LEFT;
+ dy_f_drul_[d] += dir_ * height_f * height_damp_f;
/*
- Should we always follow note-heads, (like a tie)?
- For now, only if the note_dy != slur_dy, we'll do
- slur_dy := note_dy * factor.
- */
- if (sign (dy) != sign (note_dy))
+ if y positions at same height, correct both ends
+ */
+ if (abs (dy_f / dx_f ) < slope_damp_f)
{
- Real damp_f = paper_l ()->get_var ("slur_slope_follow_music_factor");
- Real realdy = note_dy * damp_f;
- Direction adjust_dir = (Direction)(- dir_ * sign (realdy));
- if (!adjust_dir)
- adjust_dir = -dir_;
- /*
- adjust only if no beam gets in the way
- */
- if (!extrema ()[adjust_dir]->stem_l_->beam_l_
- || (adjust_dir == extrema ()[adjust_dir]->stem_l_->dir_)
- || (extrema ()[adjust_dir]->stem_l_->beams_i_drul_[-adjust_dir] < 1))
- {
- dy_f_drul_[adjust_dir] = dy_f_drul_[-adjust_dir]
- + 2 * adjust_dir * realdy;
- Real dx = notewidth_f / 2;
- if (adjust_dir != extrema ()[adjust_dir]->stem_l_->dir_)
- dx /= 2;
- dx_f_drul_[adjust_dir] -= adjust_dir * dx;
- }
+ dy_f_drul_[-d] += dir_ * height_f * height_damp_f;
}
}
/*
- Avoid too steep slurs.
- */
- Real damp_f = paper_l ()->get_var ("slur_slope_damping");
- Offset d_off = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
- dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
- d_off[X_AXIS] += extent (X_AXIS).length ();
-
- Real ratio_f = abs (d_off[Y_AXIS] / d_off[X_AXIS]);
- if (ratio_f > damp_f)
- dy_f_drul_[(Direction)(- dir_ * sign (d_off[Y_AXIS]))] +=
- dir_ * (ratio_f - damp_f) * d_off[X_AXIS];
+ If, after correcting, we're close to stem-end...
+ */
+ Real snap_f = paper_l ()->get_var ("slur_snap_to_stem");
+ do
+ {
+ if ((note_column_drul[d] == spanned_drul_[d])
+ && (note_column_drul[d]->stem_l_)
+ && (note_column_drul[d]->stem_l_->dir_ == dir_)
+ && (abs (note_column_drul[d]->stem_l_->extent (Y_AXIS)[dir_]
+ - dy_f_drul_[d]) <= snap_f))
+ {
+ /*
+ attach to stem-end
+ */
+ Stem* stem_l = note_column_drul[d]->stem_l_;
+ dx_f_drul_[d] = stem_l->hpos_f ()
+ - spanned_drul_[d]->absolute_coordinate (X_AXIS);
+ dy_f_drul_[d] = stem_l->extent (Y_AXIS)[dir_];
+ dy_f_drul_[d] += dir_ * 2 * y_gap_f;
+ }
+ }
+ while (flip (&d) != LEFT);
}
Array<Offset>
Slur::get_encompass_offset_arr () const
{
- Real notewidth = paper_l ()->note_width () * 0.8;
- Real gap = paper_l ()->get_var ("slur_x_gap");
-
- /*
- urg. Calcs done wrt the leftmost note. Fixme.
-
- Calcs ignore possibility of pre/postbreak.
-
-
- */
-
- Offset left = Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT]);
- left[X_AXIS] += encompass_arr_[0]->stem_l_->hpos_f ();
-
- Real internote = encompass_arr_[0]->stem_l_->staff_line_leading_f ()/2.0;
-
- /*
- <URG>
- i don't understand these two, but *must* for symmetry
- look at encompass array:
- lilypond -D input/test/slur-symmetry*.ly
- lilypond -D input/test/sleur.ly
-
- do_post_processing should have calculated these into
- dx_f_drul_[], no??
-
- */
-
- if (dir_ != encompass_arr_[0]->stem_l_->dir_)
- left[X_AXIS] += - 0.5 * notewidth * encompass_arr_[0]->stem_l_->dir_
- + gap;
- else if (encompass_arr_[0]->stem_l_->dir_ == UP)
- left[X_AXIS] -= notewidth;
-
- if ((dir_ == encompass_arr_[0]->stem_l_->dir_)
- && (encompass_arr_[0]->stem_l_->dir_ == DOWN))
- left[Y_AXIS] -= internote * encompass_arr_[0]->stem_l_->dir_;
- /* </URG> */
-
- Offset d = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
- dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
- d[X_AXIS] += extent (X_AXIS).length ();
+ Array<Offset> offset_arr;
+ Offset origin (absolute_coordinate (X_AXIS), 0);
int first = 1;
- int last = encompass_arr_.size () - 1;
+ int last = encompass_arr_.size () - 2;
-
- Array<Offset> notes;
- notes.push (Offset (0,0));
-
- // prebreak
- if (broken_edge_b (RIGHT))
- last++;
- else
- {
- Encompass_info info (encompass_arr_.top (), dir_, this);
- d[Y_AXIS] += info.interstaff_f_;
- }
-
- // postbreak
- if (broken_edge_b (LEFT))
+ /*
+ left is broken edge
+ */
+ if (encompass_arr_[0] != spanned_drul_[LEFT])
{
first--;
- /*
- interstaff postbreak: slur begins at height of last note
- */
- Encompass_info info (encompass_arr_[0], dir_, this);
- notes[0][Y_AXIS] += info.interstaff_f_;
}
- else
+ Encompass_info left_info (encompass_arr_[0], dir_, this);
+ offset_arr.push (Offset (0, left_info.interstaff_f_));
+
+ /*
+ right is broken edge
+ */
+ if (encompass_arr_.top () != spanned_drul_[RIGHT])
{
- Encompass_info info (encompass_arr_[0], dir_, this);
- notes[0][Y_AXIS] += info.interstaff_f_;
+ last++;
}
- for (int i = first; i < last; i++)
+ for (int i = first; i <= last; i++)
{
Encompass_info info (encompass_arr_[i], dir_, this);
- notes.push (info.o_ - left);
+ offset_arr.push (info.o_ - origin);
}
- /*
- interstaff prebreak: slur ends at height of last note
- */
- if (broken_edge_b (RIGHT))
- d[Y_AXIS] = notes.top ()[Y_AXIS];
+ offset_arr.push (Offset (do_width ().length (), 0));
- notes.push (d);
+#if 1
+ offset_arr[0] += Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT]);
+ offset_arr.top () += Offset (dx_f_drul_[RIGHT], dy_f_drul_[RIGHT]);
+#else
+ /*
+ check non-disturbed slur
+ FIXME: ends off by a tiny bit!!
+ */
+ offset_arr[0] += Offset (0, dy_f_drul_[LEFT]);
+ offset_arr.top () += Offset (0, dy_f_drul_[RIGHT]);
+#endif
- return notes;
+ return offset_arr;
}
Array<Spring> meas_springs;
+ Real non_musical_space_strength = paper_l ()->get_var ("non_musical_space_strength");
for (int i= col1; i < col2; i++)
{
Item * l = scol(i);
else if (!lc->musical_b() && i+1 < col_count())
{
s.distance_f_ = default_bar_spacing (lc,rc,shortest);
- s.strength_f_ = 2.0;
+ s.strength_f_ = non_musical_space_strength; // fixed after complaints by michael krause
}
else if (lc->musical_b())
{
s.distance_f_ += correction;
}
-
+
+ if (s.distance_f_ <=0)
+ {
+ /*
+ \bar "". We give it 0 space, with high strength.
+ */
+ s.distance_f_ = 0.0 PT;
+ s.strength_f_ = 20.0;
+ }
meas_springs.push (s);
}
}
}
Link_array<Item> break_points = pscore_l_->broken_col_range (left,right);
- Link_array<Spanner> broken_into_l_arr;
break_points.insert (left,0);
break_points.push (right);
Real d = cr.distance_f_;
if (fabs (d) < EPS)
{
- connect (idx, this_rank, 0.0, 10); // large strength.
- programming_error ("requesting zero distance.");
+ connect (idx, this_rank, cr.distance_f_, cr.strength_f_); // large strength.
}
else
connect (idx, this_rank, cr.distance_f_,
ugh: direction of the Tie is more complicated. See [Ross] p136 and further
*/
Direction
-Tie::get_default_dir() const
+Tie::get_default_dir () const
{
- int m= (head_l_drul_[LEFT]->position_i_
+ int m = (head_l_drul_[LEFT]->position_i_
+ head_l_drul_[RIGHT]->position_i_) /2;
- return(m < 0)? DOWN : UP;
+ /*
+ If dir is not determined: inverse of stem: down
+ (see stem::get_default_dir ())
+ */
+ return (m <= 0)? DOWN : UP;
}
void
void
Tie::do_post_processing()
{
- // URG: share code with slur!
assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]);
- // URG
- Real notewidth = paper_l ()->note_width () * 0.8;
Real interline_f = paper_l ()->get_realvar (interline_scm_sym);
+ Real internote_f = interline_f / 2;
+ Real x_gap_f = paper_l ()->get_var ("tie_x_gap");
+ Real y_gap_f = paper_l ()->get_var ("tie_y_gap");
/*
- [OSU]: slur and tie placement
+ Slur and tie placement [OSU]
+
+ Ties:
- ties:
- * x = inner raakpunt - d * gap
+ * x = inner vertical tangent - d * gap
- * y = length < 5ss : horizontal raakpunt
- y = length >= 5ss : y next interline - d * 0.25 ss
- --> height <= 5 length ?? we use <= 3 length, now...
*/
- Real gap_f = paper_l ()->get_var ("slur_x_gap");
+ /*
+ OSU: not different for outer notes, so why all this code?
+ ie, can we drop this, or should it be made switchable.
+ */
+#if 0
Direction d = LEFT;
do
{
- dy_f_drul_[d] = .5 * interline_f * (head_l_drul_[d]
- ? head_l_drul_[d]->position_i_
- : head_l_drul_[(Direction)-d]->position_i_);
- }
- while (flip(&d) != LEFT);
-
- do
- {
- // tie attached to outer notehead
+ Real head_width_f = head_l_drul_[d]
+ ? head_l_drul_[d]->extent (X_AXIS).length ()
+ : 0;
+ /*
+ side attached to outer (upper or lower) notehead of chord
+ */
if (head_l_drul_[d]
- && head_l_drul_[d]->remove_elt_property (extremal_scm_sym) != SCM_BOOL_F)
- {
- if (d == LEFT)
- dx_f_drul_[d] += notewidth;
- dx_f_drul_[d] += -d * gap_f;
- /* attach to outer 3/4 end of head */
- dy_f_drul_[d] += dir_ * 0.25 * interline_f;
- }
- // tie attached to inner notehead
- else if (head_l_drul_[d] && d == LEFT)
+ /*
+ && head_l_drul_[d]->remove_elt_property (extremal_scm_sym) != SCM_BOOL_F)
+ ugh, ugh:
+
+ a~a~a;
+
+ to second tie, middle notehead seems not extremal
+
+ Getting scared a bit by score-element's comment:
+ // is this a good idea?
+ */
+ && (head_l_drul_[d]->get_elt_property (extremal_scm_sym)
+ != SCM_BOOL_F))
{
- dx_f_drul_[d] += -d * notewidth;
+ if (d == LEFT)
+ dx_f_drul_[d] += head_width_f;
+ dx_f_drul_[d] += -d * x_gap_f;
}
- // uhm? loose end of tie // tie attached to stem
+ /*
+ side attached to inner notehead
+ */
else
{
- dx_f_drul_[d] = -d * (spanned_drul_[d]->extent (X_AXIS).length ()
- -0.5 * notewidth);
+ dx_f_drul_[d] += -d * head_width_f;
}
- }
- while (flip(&d) != LEFT);
+ } while (flip (&d) != LEFT);
- // now that both are set, do dependent
- do
- {
- // tie attached to outer notehead
- if (!head_l_drul_[d])
- {
- dy_f_drul_[d] = dy_f_drul_[(Direction) -d];
- }
- }
- while (flip(&d) != LEFT);
+#else
- /*
- Avoid too steep ties
- * slur from notehead to stemend: c''()b''
+ if (head_l_drul_[LEFT])
+ dx_f_drul_[LEFT] = head_l_drul_[LEFT]->extent (X_AXIS).length ();
+ dx_f_drul_[LEFT] += x_gap_f;
+ dx_f_drul_[RIGHT] -= x_gap_f;
+
+#endif
+
+ /*
+ Slur and tie placement [OSU] -- check this
+
+ Ties:
+
+ * y = dx < 5ss: horizontal tangent
+ y = dx >= 5ss: y next interline - d * 0.25 ss
+
+ which probably means that OSU assumes that
+
+ dy <= 5 dx
+
+ for smal slurs
*/
- Real damp_f = paper_l ()->get_var ("tie_slope_damping");
- Offset d_off = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
- dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
- d_off.x () += extent (X_AXIS).length ();
-
- Real ratio_f = abs (d_off.y () / d_off.x ());
- if (ratio_f > damp_f)
- dy_f_drul_[(Direction)(- dir_ * sign (d_off.y ()))] +=
- dir_ * (ratio_f - damp_f) * d_off.x ();
+
+ int ypos_i = head_l_drul_[LEFT] ? head_l_drul_[LEFT]->position_i_
+ : head_l_drul_[RIGHT]->position_i_;
+
+ Real y_f = internote_f * ypos_i;
+
+ Real dx_f = extent (X_AXIS).length () + dx_f_drul_[RIGHT] - dx_f_drul_[LEFT];
+ if (dx_f < paper_l ()->get_var ("tie_staffspace_length"))
+ {
+ if (abs (ypos_i) % 2)
+ y_f += dir_ * internote_f;
+ y_f += dir_ * y_gap_f;
+ }
+ else
+ {
+ if (! (abs (ypos_i) % 2))
+ y_f += dir_ * internote_f;
+ y_f += dir_ * internote_f;
+ y_f -= dir_ * y_gap_f;
+ }
+
+ dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = y_f;
}
void
Tie::do_substitute_element_pointer (Score_element*o, Score_element*n)
{
- Note_head *new_l =n?dynamic_cast<Note_head *> (n):0;
+ Note_head *new_l = n ? dynamic_cast<Note_head *> (n) : 0;
if (dynamic_cast <Item *> (o) == head_l_drul_[LEFT])
head_l_drul_[LEFT] = new_l;
else if (dynamic_cast <Item *> (o) == head_l_drul_[RIGHT])
% OSU: suggested gap = ss / 5;
slur_x_gap = \interline / 5.0;
+slur_y_gap = 0.25 * \interline;
+slur_y_free = 0.75 * \interline;
slur_x_minimum = 3.0 * \interline;
% slope damping: keep dy/dx < slur_slope_damping
-slur_slope_damping = 0.6;
-
-% dy_slur := dy_music * factor
-slur_slope_follow_music_factor = 0.8;
+slur_slope_damping = 0.3;
+% height damping: keep h/dx < slur_height_damping
+slur_height_damping = 0.5;
+% snap to stem if slur ends closer to stem than
+slur_snap_to_stem = 1.5 * \interline;
tie_x_minimum = \slur_x_minimum;
+% OSU: tie gap == slur gap
tie_x_gap = \slur_x_gap;
-tie_slope_damping = 0.8;
+tie_y_gap = 0.25 * \interline;
+% length of a tie that's a staffspace high
+tie_staffspace_length = 4.0 * \interline;
% ugh: rename to bow (in bezier.cc and fonts.doc too...)
% slur_thickness = 1.8 * \staffline;
stemSpacingCorrection = 0.5*\interline;
+% relative strength of space following time signature,
+non_musical_space_strength = 4.0;
Begin3
Titel: LilyPond
-Versie: 1.1.56
-Inschrijf datum: 11JUL99
+Versie: 1.1.57
+Inschrijf datum: 13JUL99
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.56.tar.gz
+ 770k lilypond-1.1.57.tar.gz
Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 770k lilypond-1.1.56.tar.gz
+ 770k lilypond-1.1.57.tar.gz
Copi-eer voorwaarden: GPL
End
Begin3
Title: LilyPond
-Version: 1.1.56
-Entered-date: 11JUL99
+Version: 1.1.57
+Entered-date: 13JUL99
Description:
LilyPond is the GNU Project music typesetter. It transforms a musical
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.56.tar.gz
+ 770k lilypond-1.1.57.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 770k lilypond-1.1.56.tar.gz
+ 770k lilypond-1.1.57.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.1.56
+Version: 1.1.57
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.56.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.57.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>
void open (String filename_str, Sources*);
void parse_header ();
- // why the #*&$#{%) has Link_array another behaviour than Link_list??
- // int find_earliest_i (Link_array<Midi_track_parser*>& tracks);
int find_earliest_i (Link_array<Midi_track_parser>& tracks);
Mudela_score* parse_score ();
};
(("" "Span_bar") . (extra_space 0.0))
(("" "Time_signature") . (extra_space 0.0))
(("" "begin-of-note") . (minimum_space 1.5))
- (("Clef_item" "Key_item") . (minimum_space 3.5))
- (("Key_item" "Time_signature") . (extra_space 2.0))
+ (("Clef_item" "Key_item") . (minimum_space 4.0))
+ (("Key_item" "Time_signature") . (extra_space 1.0))
(("Clef_item" "Time_signature") . (minimum_space 3.5))
(("Staff_bar" "Clef_item") . (minimum_space 1.0))
(("Clef_item" "Staff_bar") . (minimum_space 3.7))
--- /dev/null
+% fetdefs.tex
+% encapsulating tex backend for auto-generated feta definitions
+
+% fix chord.cc::banter_str before removing these
+\def\fetdef#1#2{%
+ \def#1{\hbox{\char#2}}}
+
+\fetdef\sharp{16}
+\fetdef\flat{18}
+\font\fetasixteenfont=feta16
+\def\fetafont{\fetasixteenfont}
+\def\textflat{{\fetafont\raise 1ex\hbox{\flat}}}
+\def\textsharp{{\fetafont\raise1ex\hbox{\sharp}}}
+
+\endinput
nolilyfooter\texsuffix\endcsname
\fi
+% fix chord.cc::banter_str before removing these
+\input fetdefs
\endinput
% generates par
\def\interscoreline{}
% generates par
-\musixsixteendefs
-\def\musixsixteendefs{}
+%\musixsixteendefs
+%\def\musixsixteendefs{}
\def\nolilyfooter{}
%urg: missing \begin{document}?
\def\noindent{}