+++ /dev/null
-Keywords: midi notation music typesetting gnu font engraving
-Subject: GNU LilyPond 1.0 released - The Music Typesetter
-
-GNU LilyPond - The Music Typesetter
-
-
-WHAT IS LilyPond?
-
-LilyPond is the GNU Project music typesetter. This program can print
-beautiful sheet music from a music definition file. It can also play
-performances to a MIDI file.
-
-
-WHAT'S NEW SINCE VERSION 0.1?
-
-* LilyPond now includes a completely new music font: the Feta font.
- We were quite disappointed with available music fonts, so we rolled
- our own. We did our best to copy the best symbol designs available,
- and we think that we've succeeded in doing so. We're proud of the
- result, and we hope you agree, so go check it out!
-
-* More elegant output due to
-
- * more sophisticated beam/slur formatting
- * better spacing
- * better line breaking
- * better font design
- * PostScript output for variable symbols
-
-* Lots of bugfixes
-
-* More robust, flexible and tweakable design
-
-* Better MIDI file importing
-
-* Easier to use due to better shell scripts and input format
-enhancements
-
-* MusixTeX is not needed anymore
-
-* Faster
-
-
-
-FEATURES
-
-* Multiple staffs, polyphonic music (more voices on one staff),
-Polymetric music.
-
-* Support for full orchestral score: Hara_kiri systems (lines with
-only rests are automatically skipped), multi-measure rests, bar
-numbering, brackets at the left.
-
-* Optimal beam slopes, slur/notehead collision resolution, dashed
-slurs. Formatting parameters are runtime tunable
-
-* Very beautiful symbols. Variable size symbols generated on the fly
-as embedded postscript.
-
-* MIDI output
-
-* Optimal linebreaking, manual intervention possible. Linelength is
-settable per line.
-
-* Readable yet very fast to type input language. With configurable
-note names and identifiers. Comes with an emacs-mode
-
-* With lots of examples (among others a fragment of Van Beethoven's
-Coriolan, J.S.Bach Cello Suite II, F. Schubert "Leise flehen meine
-Lieder")
-
-* Runs on UNIX and Windows-32.
-
-* Easy generation of titling.
-
-* WWW browsable documentation.
-
-* Support for Urtext: separation of modern and original interpretation.
-
-* Polyphonic music (with automatic collision resolution)
-
-* Spacing and collision resolution of accidentals and syllables is
-done automatically
-
-* Internationalisation support (Italian, Dutch)
-
-* Multiple font sizes within one piece
-
-* Integration with LaTeX and YODL
-
-
-MORE INFO
-
-Sources for this project are on
-
- ftp://pcnov095.win.tue.nl/pub/lilypond/ (Europe)
- ftp://ftp.gnu.org/pub/gnu/
-
-More detailed info and examples can be found on the webpage at
-
- http://www.cs.uu.nl/~hanwen/lilypond/index.html
-
--- /dev/null
+Keywords: midi notation music typesetting gnu font engraving
+Subject: GNU LilyPond 1.0 released - The Music Typesetter
+
+GNU LilyPond - The Music Typesetter
+
+
+WHAT IS LilyPond?
+
+LilyPond is the GNU Project music typesetter. This program can print
+beautiful sheet music from a music definition file. It can also play
+performances to a MIDI file.
+
+
+WHAT'S NEW SINCE VERSION 0.1?
+
+* LilyPond now includes a completely new music font: the Feta font.
+ We were quite disappointed with available music fonts, so we rolled
+ our own. We did our best to copy the best symbol designs available,
+ and we think that we've succeeded in doing so. We're proud of the
+ result, and we hope you agree, so go check it out!
+
+* More elegant output due to
+
+ * more sophisticated beam/slur formatting
+ * better spacing
+ * better line breaking
+ * better font design
+ * PostScript output for variable symbols
+
+* Lots of bugfixes
+
+* More robust, flexible and tweakable design
+
+* Better MIDI file importing
+
+* Easier to use due to better shell scripts and input format
+enhancements
+
+* MusixTeX is not needed anymore
+
+* Faster
+
+
+
+FEATURES
+
+* Multiple staffs, polyphonic music (more voices on one staff),
+Polymetric music.
+
+* Support for full orchestral score: Hara_kiri systems (lines with
+only rests are automatically skipped), multi-measure rests, bar
+numbering, brackets at the left.
+
+* Optimal beam slopes, slur/notehead collision resolution, dashed
+slurs. Formatting parameters are runtime tunable
+
+* Very beautiful symbols. Variable size symbols generated on the fly
+as embedded postscript.
+
+* MIDI output
+
+* Optimal linebreaking, manual intervention possible. Linelength is
+settable per line.
+
+* Readable yet very fast to type input language. With configurable
+note names and identifiers. Comes with an emacs-mode
+
+* With lots of examples (among others a fragment of Van Beethoven's
+Coriolan, J.S.Bach Cello Suite II, F. Schubert "Leise flehen meine
+Lieder")
+
+* Runs on UNIX and Windows-32.
+
+* Easy generation of titling.
+
+* WWW browsable documentation.
+
+* Support for Urtext: separation of modern and original interpretation.
+
+* Polyphonic music (with automatic collision resolution)
+
+* Spacing and collision resolution of accidentals and syllables is
+done automatically
+
+* Internationalisation support (Italian, Dutch)
+
+* Multiple font sizes within one piece
+
+* Integration with LaTeX and YODL
+
+
+MORE INFO
+
+Sources for this project are on
+
+ ftp://pcnov095.win.tue.nl/pub/lilypond/ (Europe)
+ ftp://ftp.gnu.org/pub/gnu/
+
+More detailed info and examples can be found on the webpage at
+
+ http://www.cs.uu.nl/~hanwen/lilypond/index.html
+
is not a recommendation, however. We recommend you use Unix, in
particular, use GNU/Linux. For further information see file(README-W32).
+question(Where is guile-config)
+
+RedHat RPMS don't include guile-config. You need guile-config as it
+was produced during the RPM build run. Build the RPM from source
+(file(.src.rpm)), and use the guile-config that is in
+file(/usr/src/redhat/BUILD/guile-1.3/guile-config/).
+
+
question(I get all kinds of errors while compiling file(parser.cc))
LilyPond uses features of bison version 1.25. Please confirm that
dit(lurl(http://sca.uwaterloo.ca/lilypond/))
Eric Praetzel was kind enough to provide a mirror of both the website
and the ftp site.
-dit(lurl(ftp://ftp.lilypond.org/pub/lilypond/))
- A mirror of the FTP site. Updated at 12:00 MET daily.
+dit(lurl(ftp://ftp.lilypond.org/pub/LilyPond/))
+ A mirror of the FTP site. Updated at 0:00 MET daily.
)
nsect(NEWS)
-pl 34.jcn1
- - templates for windows
+pl 35
+
+pl 34.hwn2
+ - "Lily Was Here" is def'd as \mudelatagline, override with
+ \header { tagline = "... " ; }
+ - \property currentBarNumber: set
+ current bar number.
+ - \property postBreakPadding: tune extra
+ space padding after linebreaks.
+ - \property textEmptyDimension: disregard script text
+ dimensions (untested)
+ - \property staffLineLeading: set the staff space
+ - adjustable staff space size (per staff)
+ - Staff_symbol_referencer as base class for elements that use
+ info of the staff symbol. \property numberOfStaffLines also works OK
+ with ledger lines. (Is that useful? dunno.)
+ - warning if someone does \translator with no name
+ - junk Item::breakable_b_
+ - junk PointerList<Music*>, use Killing_cons
+ - bf: Auto_beam_engraver.
+ - bf: mmrest engraver.
+ - use callbacks for Dimension_cache.
+ - lots of small cleanups. Junk various members of
+ Score_element & derived classes:
+ * Item::original_l_,
+ * Spanner::original_l_,
+ * Score_element::transparent_b_,
+ * Item::break_priority_i_,
+ * Item::break_status_dir_,
+ - merge Score_priority_engraver / Score_horizontal_align_engraver
+ - Use more generic element properties.
+ - precompute SCM symbols.
+ - remove_elt_property (): Try to junk an element property, if not
+ needed anymore.
+
+
+
+pl 34.uu1
+ - more PointerList junkings.
+ - MIDI bugfix.
+ - be more conservative with Dicts/Hashes mem usage
+
+*********
+pl 34
pl 33.uu2
- some performance cleanups: junked PointerList instance, plugged some leaks.
Grep for TODO and ugh/ugr/urg.
.* BUGS
+. * AFM for BlueSky AFM files.
+. * staff size for post/prebreaks
. * .ly files
. * input/star-spangled-banner
. * mutopia/J.S.Bach/wtk1-fugue2.ly
. * input/test/grace
. * fix: text on rests: ridiculous dims
+. * \score { \notes { c8 c8 c8 c c c }
+\paper { \translator { \VoiceContext \remove "Auto_beam_engraver";}}
+}
. * m=\notes\relative c'''{
\time 2/4;
}
}
}
-. * - Look at input/test/span-bars.ly. The staff lines extend too far
- to the left on the note systems including the GrandStaff.
. * midi key.
. *P.P.S. It can be cool in mudela-book to distinguish in pre,postMudelaExample,
whether MudelaExample is epsed or not: ( if this fragment is floating eps, than 1,
otherwise 2). say preMudelaExample[eps]{}, and change it in document body sometimes.
. * tetex: mfplain.mem
-. * fix midi output:
-. * default duration? d
- duration must be not entered explicitely on first note.
. * fix singleStaffBracket
+. * declare performers in \midi
+. * fix MIDI
. * \shape 1st dim skipped?
. * turn slope-damping on/off
. * tremolo stuff
specify the third. Should there be?
.* TODO before 1.2
+. * break priority setting from SCM.
. * Gade score
. * remove [] in favour of auto-beamer
-. * In the score, the staff lines extend too far to the left.
- This is also illustrated in the second score of span-bars.ly
- as I've pointed out earlier.
-. *m=\notes\relative c''{
- \property Staff.instr = "Instr "
- \key f;
- f4 \p \< g a bes |
- c d e \f \! f |
- f e d c |
- bes \mf a g f \pp
- }
-
-n=\notes\relative c'{
- \property Staff.instr = "Instr "
- \key f;
- f4 \mp g a \< bes |
- c d e \ff \! f |
- f e d c |
- bes \mp a g f \ppp
- }
-
-\score{
- \type StaffGroup <
- \type Staff = a <{\stemup \property Voice.dynamicDir = \down \m}
- {\stemdown \property Voice.dynamicDir = \up \n}>
- >
-}
. * The minimum distance between different staffs works only within
StaffGroups, not between StaffGroups. The Gade Score looks quite
strange on the pages where the Timpani and/or Brass sections don't
\OrchestralScoreContext
minVerticalAlign = 2.5*\staffheight;
}
-
- I sent a copy of the score to the conductor and his reaction was
- that it would be easy to fix some "spacing problems" with Finale,
- if we could convert the score to Finale. I'm not sure what he
- meant, since we just have had mail conversations so far. Maybe
- it's the staff distances I mentioned above.
-
-. * For the trumpet and horn parts, I wrote two parts on the same
- staff line in the score. I haven't managed to get different
- directions of the dynamics for the two parts.
- Voice.dynamicDir seems to set the direction for the full staff.
-. * hangOnClef with non-breakable clefs.
+. * hangOnClef with non-breakable clefs.
. * Aha, the problem is the new TeX code generation for changing fonts.
> (The explanation below is mostly intended for Han-Wen and Jan)
> Before, the font was changed with macros declared separately for
> argument that's clearly irrelevant in our application. Yet we
> see the problem for August.
. * Check gcc 2.8.1 compatibility
-. * Document source code.
-. * limit memory usage; the full coriolan takes up too much resources.
-. * Sort items after breaking in order of linenumber. Then be more
- eficient with finding
-. * Do Mark & sweep GC for Score_elems
-. * make "in-between" engraver (Tie, Extender)
-. * textWidthFatness property
+. * Abstraction for engravers:
+. * make "in-between" engraver (Tie, Extender)
+. * make wide_spanner_engraver (line_group_spanne,r staff_symbol)
+. * remove Interval dim_ from Dimension_cache and rename the struct.
+. * merge align_element and axis_element_group.
+. * do scaled fonts generally
. * The Lilypond accidental symbols are available through the TeX macros,
\textflat, \textsharp and \textnatural defined in the init file
lilyponddefs.tex. All the symbols are defined in the files fetaXX.tex
where XX corresponds to the size. I don't know where (or even if) they
are installed but they are generated in the mf/out/ directory during the
compilation.
-. * compulsory hshift
-. * 1. Can Lily be told where to start numbering?
-. * do scaled fonts.
-. * profile atom smobs
. * make dependencies () a virtual function.
. * fix Repeated_music design
. * one big ly2dvi input that includes *all* tests.
-. * Don't use boolean properties (0,1), instead check existence
-of property.
. * store req -> element, element -> element causes for warnings
. * junk Text_def, use G_text_item in stead.
. * junk Script_def
+. * include examples in RPM.
. * fix partial measures in meaningful way.
-. * fix AFM for BlueSky AFM files.
. * working notehead style.
-. * remove links to non-free SW.
. * add scripts to bars eg. |^"bla"
. * relative mode for mi2mu
. * uniformise recent feta contributions.
. * --prefix option?
. * -I option per filetype?
. * kpathsea?
-. * todo doc left/rightbeamcount
-. * doc Single_malt_grouping_item
+
. * ly2dvi/lilypond logfile.
. * How can I specify a chord whose duration is longer than a whole note?
\type ChordNames { \chord{ A1*2-min } }
-Use of semicolons is still rather confusing. They are obligatory
-after some types of assignments and illegal after others.
-
- \property foo=bar illegal
- foo = 3 at top level illegal
- foo = 3 inside \paper obligatory
- foo = \notes{ ...} top level illegal
- foo = \translator{ } in \paper obligatory
-
-As far as I can tell, the sole accomplishment of this syntactic
-irregularity is to keep the user as confused as possible.
-
-
-I was trying to get interstaff beams to work and did this:
-
-\score{
-\type GrandStaff <
-\type Staff=one \notes\relative c'{
- \stemup
- [c8 c \translator Staff=two \stemup c c]
- \translator Staff=one
- \stemdown
- [ b8 \translator Staff=two a8]
- \translator Staff=one
- c4
- }
-\type Staff=two \notes{ \clef bass; s1 }
->
-\paper{
- \translator{
- \GrandStaffContext
- minVerticalAlign = 3.0*\staffheight;
- maxVerticalAlign = 3.0*\staffheight;
- }
- linewidth = -1.;
-}
-}
-
-The beams are at the right angle, but they aren't in the right place.
. * fractional chord durs.
. * hang Item on Spanner
-. * remove Interval dim_ from Dimension_cache and rename the struct.
. * do --safe for PS output?
. * convert-mudela --output
. * Staff_margin (with a partial measure.)
. * sharp /flat on trills (in MIDI ??)
. * scm-ify \property values.
. * move class Lookup {} into scm
-. * collisions/voices \voiceone \voicetwo are broken; see
. * msgfmt -o check?
. * \breathmark TeX macro
-. * catch GUILE errors?
. * add new glyphs to font.ly
. * formatting of input stuff.
. * \notes{ a \< b \cr } vs \notes{ a \< b \! }
-. * if possible, it might be nice for a warning to appear if someone does
- \translator with no name and without assigning it to an
- identifier.
. * space after bars?
. * 'hinterfleisch' before bar (e.g. wtk1-fugue2)?
-. * \type Voice \times 2/3 { [c8 c16 c16 c16 c16] }
-. * repeat bars: need distance after ":|" and before "|:"
. * Summary of minor spelling irregularities:
. * capitalization/use of underscores in property names
. * fix SkipBars -> skipBars
-
. * broken scripts:
lbheel = \script { "bheel" 0 0 -1 0 0 }
rbheel = \script { "bheel" 0 0 1 0 0 }
portato= \script { "portato" 0 -1 0 1 0 }
. * ly2dvi
. * bottomnote for ly2dvi
-. * cf'able ly2dvi tagline.
. * deps for ly2dvi
.* STUFF
+. * compulsory hshift
. * arrows on slurs.
. * Align_element::padding ?
. * uniformise property names...
. * strip EXEs before installing
. * zip target for binary windows dist (JBR)
. * junking \skip req in lyrics
-. * Language:
-. * \type -> \context ?
-. * \translator -> ?
-. * fix \partial
-. * \bla {} vs \bla ;
-. * mix engraver hacking with music ?
-. * \once\property KEY = VAL
-. * \addtranslator, \removetranslator
-. * junk ^ and _ for scripts
-. * junk _ for lyrics.
-. * abstract grammar.
. * percussion note heads
. * mi2mu empty staffs.
. * horizontal centering of dynamics
-. * gzip RH manpage
-. * stable make/config stuff
. * $DEPENDENCIES_OUTPUT support
. * Xdvi zooming ?! Try to understand GS garbage collection.
- gs: Error: /undefined in draw_beam
- gs: Operand stack:
+gs: Error: /undefined in draw_beam
+gs: Operand stack:
. * fix vertical alignment and stafflines
+. * declaring Performers
. * GrandStaff needs more work -- I want a single word
`harpsichord' to the left of the grandstaff, not one on each
stave. (Organ staff -- with separate pedal -- but common
through, so the \property Voice.Instrument would be a stop,
and \property GrandStaff.instrument would be PipeOrgan...)
. * revise the Score_priority_align_engraver concept. It sucks.
-. * make new VoiceOne, VoiceTwo, VoiceThree contexts with
-ydirection and hshift preset
. * *.yo: fix pod manpage layout legacy
. * text-items clash with stems/beams
. * --include, -I option for ly2dvi (pass on to lily)
<{\voiceone cis4. cis8 cis4 | cis4 cis cis | r1 }
{\voicetwo cis,4 r r | r2. | r1 }> |
}
-. * try to use template<Type> iso MACRO(Type)
-. * Musical_pitch (analogous to Duration and Rhythmic_req)
+. * Musical_pitch (analogous to Duration and Rhythmic_req)
think about, analogous to pitch:
* { a4 a16 } c <-- duration of c?
* < a4 b8 > c <-- duration of c?
. * split error/warning in error/warning/non_fatal_error
. * add a Duration_convert member to Duration_iter to set parameters.
Junk global duration settings.
-. * minimum length second part broken tie
. * en-,discouraged linebreaking:
. * handle DISALLOW < penalty > FORCE
. * discourage breaking of slurs
. * <\voiceone c4. \voicetwo c4>
. * add full cello suites to web site (kom op, Maarten!)
. * Rethink Time_description
- * \cadenza , \meter, \grouping should all be \properties
+\cadenza , \meter, \grouping should all be \properties
. * rename
. * measure -> bar
. * abbrev -> tremolo
. * move paper vars into engraver properties
. * check for groff / troff/ nroff et
. * more intelligent file searching
-. * make LilyPond RPM fully relocatable
. * disable spaces in TeX stuff
. * handle ^C for tmp/file creation.
+. * make LilyPond RPM fully relocatable
. * dots & rest collisions.
. * documentation
+. * remove links to non-free SW.
+. * internal documentation
+. * a general paper.
+. * \properties
+. * left/rightbeamcount
+. * various other new properties.
. * introduction?
. * info?
. * LaTeX?
. * more manpages?
-. * versioning for Feta
. * the warning about the negative slur/tie length appears twice
- which is irritating.
-. * The `3' in the meter key is a one or two pixels too thin (at 600dpi)
- in the middle:
-. * the bracket is ugly (wings are too parabolic, should be more circular)
+which is irritating.
. * better hshift (dots, distance, head dependent)
. * clefs (AG): The "8" should appear closer to the actual clef,
touching it.
. * put errorlevel in Input class
. * junk nesting slurs
. * integrate midi-elts from mi2mu and lily?
+
+.* FONT
+. * the bracket is ugly (wings are too parabolic, should be more circular)
+. * versioning for Feta
+. * The `3' in the meter key is a one or two pixels too thin (at 600dpi)
+ in the middle:
+. * design macro for penstroke with rounded endings
+. * timesig C: fat yet less curved. Check out relations.
+. * design decent macro for bulbed endings
+. * printer dependencies.
+. * y-refpoint for rests should be the 4th staffline (gclef: b')
+. * clean-up eight+ rests
+. * versioning
+. * lo-res fixes.
+. * work out sizes of character fonts.
+. * more symbols
+. * piano pedals: Ped/*
+. * maxima notehead
+. * coda signs: Segno, O+
+. * glissando, arpeggio
+. * lengthened trill
+. * 128th flags
+. * include important spacing dims in fetalog
.* 3RD PARTY BUGS
. * GNU diff 2.7: diff -rN does not see a new directory with empty file
. * check out GCC signatures?
. * fontlock: \melodic \melodic
. * use properties for:
-. * Staff_sym size
. * default tempo.
. * cadenza mode?
. * slurs
. * accents
. * dynamics
+
+> Would it be hard to add support for proper dynamics in MIDI output? I
+> would really like to have this feature...
+
+To answer this, I have to give a little background. Please say so if
+I am being obtuse.
+
+Both audio and notation elements are created decentrally, when
+LilyPond says "Interpreting music ... [8][16] etc." After all
+elements are created, they are processed again to calculate all
+parameters. After that is done, they are dumped onto the output (the
+MIDI stream or the TeX file).
+
+The audio and notation elements are created by objects called
+performer and engraver respectively. They work by taking a chunk of
+input (a so-called request), and using the request to create an audio
+or notation element.
+
+After some processing, the engraver sends the created elements to
+its enclosing notation/performance context.
+
+In the case of notation, engravers can also modify existing elements
+created by sibling engravers. Eg. the beam-engraver will modify stems
+when it creates a beam over a couple of stems. This is done in
+Engraver::do_acknowledge_element () and
+Engraver::do_process_acknowledged ().
+
+In the case of audio, there are no mechanisms to modify existing audio
+elements. After the audio elements are created, they are sent directly
+to the enclosing context (an instance of Performer_group_performer),
+through the method Performer::play ()
+
+Concretely spoken, for dynamics you have to write a performer
+(Dynamics_performer), that will take the input requests. If I
+understand correctly, every MIDI note played must have its dynamic
+strength set separately. That means the the Dynamics_performer must
+set the strength of every Audio_note it finds. This means that one
+has to modify existing Audio items. The best way of doing this is
+with a broadcast/acknowledge process.
+
+So the best way of handling this, is
+
+* supporting dynamic settings in Audio_note
+
+* mimicking the broadcast/acknowledge mechanism of the Engravers in
+ the Performers
+
+* using that mechanism to write a Dynamics_performer that will modify
+ any notes it finds to set appropriate strengths.
+
+You could also kludge this by deriving from Performer_group_performer
+a performer that also sets dynamics within notes, but that is not the
+elegant way to do it.
+
+I'd say that the work involved is not hard, but you have to be fluent
+with C++ and need some insight into the working of Notation Contexts
+and friends. I guess I could do it in a day or so, but if you are not
+so fluent with the inner workings of LilyPond, it could take you some
+more time (A few more days?).
+
+Please note, that I am *not* going to code this myself: my days are
+valuable, and I think I have more interesting things to do than fixing
+the MIDI output (I don't even have a soundcard). But I *do* want to help
+you or other people with implementing this, so if you need help, don't
+hesitate to ask.
+
. * account for rhythmic position in measure
. * etc.
. * specify number of lines
.* INPUTLANGUAGE
-
+. * Language:
+. * \type -> \context ?
+. * \translator -> ?
+. * fix \partial
+. * \bla {} vs \bla ;
+. * mix engraver hacking with music ?
+. * \once\property KEY = VAL
+. * \addtranslator, \removetranslator
+. * junk ^ and _ for scripts
+. * junk _ for lyrics.
+. * abstract grammar.
+. * Figure out semicolons.
. * c4 4 4 4 for c4 c4 c4 c4?
. * <c f a>4 ?
. * Viola mode?
. * Text_crescendo
-. * clean solution for staffsize in items.
-
. * revise calcideal
.* IDEAS
.* SMOBS
Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
-> mcmanus@IDT.NET writes:
-> > > I want different C++ objects (with scheme embedded) to be linked by
-> > > C++ pointers. I want to access these other objects from the Scheme
-> > > code, and I want access to these pointers from C++.
-> >
-> > You can do this with a combination of smob's and primitive functions,
-> > though it may not be be exactly what you wanted. You would have one
-> > smob for each class in your application, and then you would write a
-> > primitive function that would return the objects that are linked to a
-> > base object.
->
-> And the smob and the C++ class are interlinked? Like
->
> class Foo_class {
> Foo_smob *smob_ptr_;
> }
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=1
-PATCH_LEVEL=34
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=35
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
+/*
+ hash.cc -- implement various functions for hash tables.
+
+ source file of the Flower Library
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
#include "string.hh"
#include "array.hh"
#include "dictionary.hh"
// Note: assumes long is at least 32 bits.
const unsigned long my_prime_list[] =
{
+ 5, 11, 23, // be a bit careful for short lists: we want reasonable mem usage.
53, 97, 193, 389, 769,
1543, 3079, 6151, 12289, 24593,
49157, 98317, 196613, 393241, 786433,
1610612741u, 3221225473u, 4294967291u
};
-unsigned long prime_list (int idx)
+unsigned long
+prime_list (int idx)
{
return my_prime_list [idx];
}
-unsigned int string_hash (String s)
+unsigned int
+string_hash (String s)
{
const char* str = s.ch_C ();
unsigned int result = 0;
}
-unsigned int hash (unsigned int i)
+unsigned int
+hash (unsigned int i)
{
return i;
}
-unsigned int int_hash (int i)
+unsigned int
+int_hash (int i)
{
return (unsigned) i;
}
-unsigned int hash ( );
#define UNIONFIND_HH
#include "array.hh"
-/*
+/**
which points of a graph are connected?.
Union find, a standard algorithm:
Union_find (int sz);
private:
- Array<int> classes;
-
+ /**
+ This array provides the representing point for each node in the graph.
+ */
+ Array<int> classes_;
};
#endif
Union_find::Union_find (int n)
{
- classes.set_size (n);
+ classes_.set_size (n);
for (int i=0; i < n; i++)
{
- classes[i] = i;
+ classes_[i] = i;
}
}
Union_find::find (int i)
{
int rep = i;
- while (classes[rep] != rep)
- rep = classes[rep];
- while (classes[i] != rep)
+ while (classes_[rep] != rep)
+ rep = classes_[rep];
+ while (classes_[i] != rep)
{
- int next =classes[i];
- classes[i] = rep;
- i = next;
+ int next =classes_[i];
+ classes_[i] = rep;
+ i = next;
}
return rep;
}
{
i = find (i);
j = find (j);
- classes[i] = j;
+ classes_[i] = j;
}
--- /dev/null
+ \score { \notes {
+
+ c1 c1 c1 c1\break
+ c1 c1 c1 c1\break
+ \property Score.currentBarNumber = "25"
+ c1 c1 c1 c1
+}
+ \paper{ \translator {\BarNumberingStaffContext }}}
--- /dev/null
+
+c c c \property Staff . numberOfStaffLines = 3
--- /dev/null
+< \type Staff = VA {
+ \property Staff.staffLineLeading = "4" \property Staff.fontsize = "-2"
+ \property Voice . dynamicDir = \up \stemdown
+\key gis;
+ c8 d [e f g a] b c \ff
+ }
+
+\type Staff = VB { \property Voice . dynamicDir = \down c,,4 \ff}
+
+>
#include "cursor.tcc"
#include "list.tcc"
-#if defined NEED_EXPLICIT_INSTANTIATION || __CYGWIN__
-// huh?
-//LIST_INSTANTIATE (void *);
-template class List<void*>;
-template class Cursor<void*>;
+#ifdef NEED_EXPLICIT_INSTANTIATION
+LIST_INSTANTIATE (void *);
#endif
POINTERLIST_INSTANTIATE (Source_file);
Molecule*
Abbreviation::do_brew_molecule_p () const
{
- Real interbeam_f = paper ()->interbeam_f (stem_l_->mult_i_);
+ Real interbeam_f = paper_l ()->interbeam_f (stem_l_->mult_i_);
Real w = 1.5 * lookup_l ()->ball (2).dim_.x ().length ();
- Real internote_f = paper ()->internote_f ();
- Real beam_f = paper ()->beam_thickness_f ();
+ Real space = stem_l_->staff_line_leading_f ();
+ Real internote_f = space/2;
+
+ Real beam_f = paper_l ()->beam_thickness_f ();
int beams_i = 0;
- Real slope_f = internote_f / 4 / internote_f;
+ Real slope_f = internote_f / 4 / internote_f; // HUH?
if (stem_l_ && stem_l_->beam_l_) {
slope_f = stem_l_->beam_l_->slope_f_;
stem_l_->beam_l_->dir_ * beams_i * interbeam_f));
}
else
-#if 1
{
/*
Beams should intersect one beamthickness below staff end
dy += stem_l_->stem_end_f ();
dy *= internote_f;
// urg: can't: stem should be stetched first
-// dy -= paper ()->beam_thickness_f () * stem_l_->dir_;
+// dy -= paper_l ()->beam_thickness_f () * stem_l_->dir_;
beams->translate (Offset(stem_l_->hpos_f () - hpos_f (), dy));
}
-#else
- {
- /*
- urg: this is wrong, even if coded correctly
-
- Try to be in the middle of the open part of the stem and
- between on the staff.
-
- (urgh)
- */
- Direction sd = stem_l_->dir_;
- // watch out: chord_start_f is (the only one) not in dim(internote)
- Interval empty_stem (stem_l_->chord_start_f () / internote_f * sd
- + interline_f, (stem_l_->stem_end_f ()* sd));
- empty_stem *= sd;
-
- Interval instaff = empty_stem;
- /*
- huh? i don't understand, hw
- what about:
- .fly= \stemup d'''2:16
- instaff.intersect (Interval (-4,4));
- */
- // hmm, let's try
- if (stem_l_->get_default_dir () == stem_l_->dir_)
- instaff.intersect (Interval (-4,4));
- if (instaff.empty_b ())
- instaff = empty_stem;
-
- instaff.print ();
- instaff *= internote_f;
- beams->translate (Offset(stem_l_->hpos_f () - hpos_f (),
- instaff.center ()));
- }
-#endif
+ /*
+ there used to be half a page of code that was long commented out.
+ Removed in 1.1.35
+ */
}
return beams;
Molecule*
Abbreviation_beam::do_brew_molecule_p () const
{
- /*
- todo
- */
return Beam::do_brew_molecule_p ();
-#if 0
- Molecule *mol_p = new Molecule;
- // huh? inter-what
- // Real inter_f = paper ()->interbeam_f ();
- Real inter_f = paper ()->internote_f ();
- Real x0 = stems[0]->hpos_f ();
- for (int j=0; j <stems.size (); j++)
- {
- Stem *i = stems[j];
- Stem * prev = (j > 0)? stems[j-1] : 0;
- Stem * next = (j < stems.size ()-1) ? stems[j+1] :0;
-
- Molecule sb = stem_beams (i, next, prev);
- Real x = i->hpos_f ()-x0;
- sb.translate (Offset (x, (x * slope_f + left_y)* inter_f));
- mol_p->add (sb);
- }
- mol_p->translate_axis (x0 - spanned_drul_[LEFT]->absolute_coordinate (X_AXIS), X_AXIS);
- return mol_p;
-#endif
}
void
#include "align-element.hh"
#include "interval.hh"
#include "direction.hh"
-
+#include "debug.hh"
struct Align_element_content {
Score_element * elem_l_;
static int compare (Align_element_content const &h1,
Align_element_content const &h2)
- {
- return h1.priority_i_ - h2.priority_i_;
- }
+ {
+ return h1.priority_i_ - h2.priority_i_;
+ }
Align_element_content (Score_element *elem_l, int p)
- {
- priority_i_ = p;
- elem_l_ = elem_l;
- }
+ {
+ priority_i_ = p;
+ elem_l_ = elem_l;
+ }
Align_element_content () {
elem_l_ = 0;
priority_i_ = 0;
void
Align_element::do_substitute_element_pointer (Score_element*o,
- Score_element*n)
+ Score_element*n)
{
int i;
while ((i = elem_l_arr_.find_i (o))>=0)
}
}
-/**
- Align elements top to bottom.
- The first element has its top at y = 0.0 afterwards
-
- TODO configurable, like Horizontal_align_item
-
- TODO should parametrise in direction and coordinate.
- */
void
Align_element::do_post_processing()
{
center_f = where_f;
where_f += stacking_dir_ * dy;
-
-
elem_l_arr_[i]->translate_axis (where_f, axis_);
}
Align_element::Align_element()
{
threshold_interval_ = Interval (0, Interval::infinity ());
- transparent_b_ = true;
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
set_empty (true);
stacking_dir_ = DOWN;
align_dir_ = LEFT;
return elem_l_arr_.find_l (e);
}
-
-
-
void
Align_element::sort_elements ()
{
void
Align_element::do_print () const
{
-#if 0
+#ifndef NPRINT
DOUT << "contains: ";
- for (int i=0 ; i < item_l_arr_.size(); i++)
- DOUT << classname (item_l_arr_[i]) << ", ";
+ for (int i=0 ; i < elem_l_arr_.size(); i++)
+ DOUT << classname (elem_l_arr_[i]) << ", ";
#endif
}
+
+Score_element*
+Align_element::get_elt_by_priority (int p) const
+{
+ for (int i=0; i < priority_i_arr_.size (); i++)
+ {
+ if (priority_i_arr_[i] == p)
+ return elem_l_arr_[i];
+ }
+ return 0;
+}
void
Audio_column::add_audio_item (Audio_item* l)
{
- audio_item_l_list_.bottom().add (l);
+ audio_item_l_arr_.push (l);
l->audio_column_l_ = this;
}
#ifndef NPRINT
DOUT << "Audio_column {";
DOUT << "at: " << at_mom_ << ". Contains:";
- for (PCursor<Audio_item*> i (audio_item_l_list_.top ()); i.ok (); i++)
- DOUT << classname (i.ptr ()) << ", ";
+ for (int i =0; i < audio_item_l_arr_.size (); i++)
+ DOUT << classname (audio_item_l_arr_[i]) << ", ";
DOUT << "\n}\n";
#endif
}
void
Audio_staff::add_audio_item (Audio_item* l)
{
- audio_item_l_list_.bottom().add (l);
+ audio_item_l_arr_.push (l);
}
+
void
Audio_staff::output (Midi_stream& midi_stream_r, int track_i)
{
consider_end_and_begin ();
}
grouping_p_->add_child (start, rhythmic_req->length_mom ());
- stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_;
+
+ //stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_;
+
stem_l_arr_p_->push (stem_l);
Moment now = now_mom ();
last_add_mom_ = now;
Auto_beam_engraver::junk_beam ()
{
assert (stem_l_arr_p_);
- for (int i = 0; i < stem_l_arr_p_->size (); i++)
- (*stem_l_arr_p_)[i]->flag_i_ = 0;
+ /* for (int i = 0; i < stem_l_arr_p_->size (); i++)
+ (*stem_l_arr_p_)[i]->flag_i_ = 0;*/
+
delete stem_l_arr_p_;
stem_l_arr_p_ = 0;
delete grouping_p_;
Axis_group_element::Axis_group_element(Axis a1, Axis a2)
: Graphical_axis_group (a1,a2)
{
- transparent_b_ = true;
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
}
Axis_group_element::Axis_group_element ()
: Graphical_axis_group (X_AXIS, Y_AXIS)
{
- transparent_b_ = true;
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
}
Direction j=LEFT;
do
{
- Item *new_l =
- it_l->find_prebroken_piece (broken_to_drul_[j]->break_status_dir_);
- (dynamic_cast<Axis_group_item*> (broken_to_drul_[j]))->add_element (new_l);
+ Axis_group_item * my_brok
+ = dynamic_cast<Axis_group_item*> (find_prebroken_piece(j));
+ Item *new_l = it_l->find_prebroken_piece (j);
+ my_brok->add_element (new_l);
}
while (flip(&j)!=LEFT);
}
{
Item * item_l = dynamic_cast<Item*> (elems[i]);
if (item_l
- && item_l->breakable_b_
+ && item_l->breakable_b ()
&& item_l->break_status_dir() == 0)
{
// last two checks are paranoia
my_broken_l->add_element (broken_span_l);
}
}
- else if (it && it->breakable_b_ && it->break_status_dir () == 0)
+ else if (it && it->broken_original_b ())
{
// broken items
Direction j=LEFT;
do
{
- Item * my_item = it->broken_to_drul_[j];
- Line_of_score * item_line_l = my_item->line_l() ;
+ Item * broken_item = it->find_prebroken_piece (j);
+ Line_of_score * item_line_l = broken_item->line_l() ;
if (! item_line_l)
continue;
Axis_group_spanner * v
= dynamic_cast<Axis_group_spanner*>(find_broken_piece (item_line_l));
if (v)
- v->add_element (my_item);
+ v->add_element (broken_item);
else
{
- my_item->transparent_b_ = true;
- my_item->set_empty (true);
+ broken_item->set_elt_property (transparent_scm_sym, SCM_BOOL_T);
+ broken_item->set_empty (true);
}
}
*/
#include "bar-engraver.hh"
-#include "bar.hh"
+#include "staff-bar.hh"
#include "musical-request.hh"
#include "multi-measure-rest.hh"
#include "command-request.hh"
{
if (!bar_p_)
{
- bar_p_ = new Bar;
- bar_p_->break_priority_i_ = 0;
+ bar_p_ = new Staff_bar;
+ bar_p_->set_elt_property (break_priority_scm_sym, gh_int2scm (0));
+
// urg: "" != empty...
String default_type = get_property ("defaultBarType", 0);
if (default_type.length_i ())
{
bar_p_->type_str_ = default_type;
}
+
+ /*
+ urg. Why did I implement this?
+ */
Scalar prop = get_property ("barAtLineStart", 0);
if (prop.to_bool ())
{
staff_side_p_ = new G_staff_side_item;
staff_side_p_->axis_ = axis_;
- staff_side_p_->breakable_b_ = true; // ugh
+ staff_side_p_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); // ugh
text_p_ = new G_text_item;
- text_p_->breakable_b_ = true; // ugh
+ text_p_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); // ugh
Scalar prop = get_property (type_ + "Direction", 0);
if (prop.isnum_b ())
}
- staff_side_p_->set_elt_property (ly_symbol ("visibility_lambda"),
+ staff_side_p_->set_elt_property (visibility_lambda_scm_sym,
visibility_lambda_);
- text_p_->set_elt_property (ly_symbol ("visibility_lambda"),
+ text_p_->set_elt_property (visibility_lambda_scm_sym,
visibility_lambda_);
announce_element (Score_element_info (text_p_, rq));
Bar::Bar ()
{
- breakable_b_ = true;
+ set_elt_property (breakable_scm_sym, SCM_BOOL_T);
type_str_ = "|";
at_line_start_b_ = false;
}
#endif
}
+Real
+Bar::get_bar_size () const
+{
+ return paper_l ()->get_var ("barsize");
+}
+
+
Molecule*
Bar::do_brew_molecule_p () const
{
- Paper_def *p = paper ();
- Molecule *output = new Molecule (lookup_l ()->bar (type_str_, p->get_var ("barsize")));
+ Molecule *output = new Molecule (lookup_l ()->bar (type_str_, get_bar_size ()));
return output;
}
/**
Prescriptions for splitting bars.
- TODO: parametrise this (input-settable)
+ TODO: put this in SCM.
*/
static char const *bar_breaks[][3] ={
{":|", ":|:", "|:"},
if (bar_breaks[i][1] == type_str_)
{
type_str_ = bar_breaks[i][break_status_dir ()+1];
- if (at_line_start_b_ && (break_status_dir_ == 1) && (type_str_ == ""))
+ if (at_line_start_b_ && (break_status_dir () == RIGHT) && (type_str_ == ""))
{
type_str_ = "|";
}
}
}
-
- /*
- span_score_bar needs dims, so don't do
-
- transparent_b_ = empty_b_ = (!type_str_);
-
- */
}
spanbar_p_ = get_span_bar_p();
String visnam = String(name()) + "_visibility";
- spanbar_p_->set_elt_property (ly_symbol ("visibility_lambda"),
+ spanbar_p_->set_elt_property (visibility_lambda_scm_sym,
gh_eval_str (visnam.ch_C()));
if (use_priority_b_)
{
- spanbar_p_->break_priority_i_ = break_priority_i_;
+ spanbar_p_->set_elt_property (break_priority_scm_sym,
+ gh_int2scm (break_priority_i_));
}
else
{
Beam::do_brew_molecule_p () const
{
Molecule *mol_p = new Molecule;
- Real internote_f = paper ()->internote_f ();
-
Real x0 = stems_[0]->hpos_f ();
for (int j=0; j <stems_.size (); j++)
{
Molecule sb = stem_beams (i, next, prev);
Real x = i->hpos_f ()-x0;
- sb.translate (Offset (x, (x * slope_f_ + left_y_) * internote_f));
+ sb.translate (Offset (x, (x * slope_f_ + left_y_) *
+ i->staff_line_leading_f ()/2 ));
mol_p->add_molecule (sb);
}
mol_p->translate_axis (x0
// correct if last note (and therefore reference point of beam)
// is on different staff
- mol_p->translate_axis (- sinfo_.top ().interstaff_f_ * internote_f, Y_AXIS);
+ Stem_info si = sinfo_.top ();
+ mol_p->translate_axis (-si.interstaff_f_ * si.stem_l_->staff_line_leading_f ()/2,
+ Y_AXIS);
return mol_p;
}
Offset
Beam::center () const
{
- Real w= (paper ()->note_width () + extent (X_AXIS).length ())/2.0;
- return Offset (w, (left_y_ + w* slope_f_)*paper ()->internote_f ());
+ Stem_info si = sinfo_[0];
+
+ Real w= (si.stem_l_->note_delta_f () + extent (X_AXIS).length ())/2.0;
+ return Offset (w, (left_y_ + w* slope_f_) *
+ si.stem_l_->staff_line_leading_f ()/2);
}
void
if (stems_.size () < 2)
{
warning (_ ("beam with less than two stems"));
- transparent_b_ = true;
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
return ;
}
calculate_slope ();
We have our doubts, so we simply provide all sensible alternatives.
*/
- Dir_algorithm a = (Dir_algorithm)rint(paper ()->get_var ("beam_dir_algorithm"));
+ Dir_algorithm a = (Dir_algorithm)rint(paper_l ()->get_var ("beam_dir_algorithm"));
switch (a)
{
case MAJORITY:
Real
Beam::check_stemlengths_f (bool set_b)
{
- Real interbeam_f = paper ()->interbeam_f (multiple_i_);
- Real internote_f = paper ()->internote_f ();
- Real beam_f = paper ()->beam_thickness_f ();
- Real staffline_f = paper ()->rule_thickness ();
+ Real interbeam_f = paper_l ()->interbeam_f (multiple_i_);
+
+ Real beam_f = paper_l ()->beam_thickness_f ();
+ Real staffline_f = paper_l ()->rule_thickness ();
Real epsilon_f = staffline_f / 8;
Real dy_f = 0.0;
for (int i=0; i < sinfo_.size (); i++)
// correct for knee
if (dir_ != sinfo_[i].dir_)
{
+ Real internote_f = sinfo_[i].stem_l_->staff_line_leading_f ()/2;
y -= dir_ * (beam_f / 2
+ (sinfo_[i].mult_i_ - 1) * interbeam_f) / internote_f;
- if (!i && sinfo_[i].stem_l_->staff_sym_l_ !=
- sinfo_.top ().stem_l_->staff_sym_l_)
+ if (!i && sinfo_[i].stem_l_->staff_symbol_l () !=
+ sinfo_.top ().stem_l_->staff_symbol_l ())
y += dir_ * (multiple_i_ - (sinfo_[i].stem_l_->flag_i_ - 2) >? 0)
* interbeam_f / internote_f;
}
void
Beam::set_steminfo ()
{
+ if(!stems_.size ())
+ return;
+
assert (multiple_i_);
int total_count_i = 0;
int forced_count_i = 0;
total_count_i++;
}
- Real internote_f = paper ()->internote_f ();
- int stem_max = (int)rint(paper ()->get_var ("stem_max"));
- Real shorten_f = paper ()->get_var (String ("forced_stem_shorten"
+ Real internote_f = stems_[0]->staff_line_leading_f ()/2;
+ int stem_max = (int)rint(paper_l ()->get_var ("stem_max"));
+ Real shorten_f = paper_l ()->get_var (String ("forced_stem_shorten"
+ to_str (multiple_i_ <? stem_max)))
/ internote_f;
Real dx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f ();
// urg, these y internote-y-dimensions
- Real internote_f = paper ()->internote_f ();
- Real lengthened = paper ()->get_var ("beam_lengthened") / internote_f;
- Real steep = paper ()->get_var ("beam_steep_slope") / internote_f;
+ Real internote_f = stems_[0]->staff_line_leading_f ()/2;
+
+ Real lengthened = paper_l ()->get_var ("beam_lengthened") / internote_f;
+ Real steep = paper_l ()->get_var ("beam_steep_slope") / internote_f;
if (((left_y_ - sinfo_[0].idealy_f_ > lengthened)
&& (slope_f_ > steep))
|| ((left_y_ + slope_f_ * dx_f - sinfo_.top ().idealy_f_ > lengthened)
if (quantisation_ <= NONE)
return;
- Real interline_f = paper ()->interline_f ();
+ Real interline_f = stems_[0]->staff_line_leading_f ();
Real internote_f = interline_f / 2;
- Real staffline_f = paper ()->rule_thickness ();
- Real beam_f = paper ()->beam_thickness_f ();
+ Real staffline_f = paper_l ()->rule_thickness ();
+ Real beam_f = paper_l ()->beam_thickness_f ();
Real dx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f ();
hang straddle sit inter hang
*/
- Real interline_f = paper ()->interline_f ();
- Real internote_f = paper ()->internote_f ();
- Real staffline_f = paper ()->rule_thickness ();
- Real beam_f = paper ()->beam_thickness_f ();
+ Real space = stems_[0]->staff_line_leading_f ();
+ Real internote_f = space /2;
+ Real staffline_f = paper_l ()->rule_thickness ();
+ Real beam_f = paper_l ()->beam_thickness_f ();
/*
[TODO]
Real straddle = 0;
Real sit = beam_f / 2 - staffline_f / 2;
- Real inter = interline_f / 2;
- Real hang = interline_f - beam_f / 2 + staffline_f / 2;
+ Real inter = space / 2;
+ Real hang = space - beam_f / 2 + staffline_f / 2;
/*
Put all allowed positions into an array.
}
}
- Interval iv = quantise_iv (allowed_position, interline_f, dy_f);
+ Interval iv = quantise_iv (allowed_position, space, dy_f);
Real quanty_f = dy_f - iv.min () <= iv.max () - dy_f ? iv.min () : iv.max ();
if (extend_b)
void
Beam::set_stemlens ()
{
- Real staffline_f = paper ()->rule_thickness ();
+ Real staffline_f = paper_l ()->rule_thickness ();
// enge floots
Real epsilon_f = staffline_f / 8;
assert (!next || next->hpos_f () > here->hpos_f ());
assert (!prev || prev->hpos_f () < here->hpos_f ());
- Real staffline_f = paper ()->rule_thickness ();
- Real interbeam_f = paper ()->interbeam_f (multiple_i_);
- Real internote_f = paper ()->internote_f ();
- Real beam_f = paper ()->beam_thickness_f ();
+ Real staffline_f = paper_l ()->rule_thickness ();
+ Real interbeam_f = paper_l ()->interbeam_f (multiple_i_);
+
+ Real internote_f = here->staff_line_leading_f ()/2;
+ Real beam_f = paper_l ()->beam_thickness_f ();
Real dy = interbeam_f;
Real stemdx = staffline_f;
Molecule rightbeams;
// UGH
- Real nw_f = paper ()->note_width () * 0.8;
+ Real nw_f = paper_l ()->note_width () * 0.8;
/* half beams extending to the left. */
if (prev)
return;
#ifndef STANDALONE
- Real internote_f = paper_l_->internote_f ();
+ Real internote_f = paper_l_->get_realvar (interline_scm_sym)/2.0;
#else
Real internote_f = STAFFHEIGHT / 8;
#endif
Real s = sqrt (control_[3].x () * control_[3].x ()
+ control_[1].y () * control_[2].y ());
#ifndef STANDALONE
- Real internote = paper_l_->internote_f ();
+ Real internote = paper_l_->get_realvar (interline_scm_sym)/2.0;
#else
Real internote = STAFFHEIGHT / 8;
#endif
// emperic computer science:
// * tangents somewhat steeper than minimal line
#ifndef STANDALONE
- Real internote = paper_l_->internote_f ();
+ Real internote = paper_l_->get_realvar (interline_scm_sym)/2.0;
Real rc_correct = paper_l_->get_var ("slur_rc_factor");
#else
Real internote = STAFFHEIGHT / 8;
Molecule*
Bow::do_brew_molecule_p () const
{
- Real thick = paper ()->get_var ("slur_thickness");
+ Real thick = paper_l ()->get_var ("slur_thickness");
Array<Offset> c = get_controls ();
Real dy = c[3].y () - c[0].y ();
Molecule a;
Array<Offset>
Bow::get_controls () const
{
- Bezier_bow b (paper ());
+ Bezier_bow b (paper_l ());
b.set (get_encompass_offset_arr (), dir_);
b.calc ();
Array<Offset> controls;
Array<int> retval;
for (int i=0; i < all.size (); i++)
- if (all[i]->breakable_b_)
+ if (all[i]->breakable_b ())
retval.push (i);
if (linelength <=0)
Line_of_cols retval;
for (int i=0; i < all.size (); i++)
- if (all[i]->breakable_b_)
+ if (all[i]->breakable_b ())
retval.push (all[i]);
void
Break_algorithm::OK () const
{
-#ifndef NDEBUG
- #if 0
- iter_top (pscore_l_->col_p_list_,start);
- PCursor<Paper_column *> end (pscore_l_->col_p_list_.bottom ());
-
- assert (start->breakable_b_);
- assert (end->breakable_b_);
- #endif
-#endif
}
Array<Column_x_positions>
if (Note_head * h = dynamic_cast<Note_head*>(it_l))
{
// h->position_i_ += c0_position_i_;
- h->position_i_ = h->steps_i_ + c0_position_i_;
+ h->position_i_ += c0_position_i_;
}
else if (Local_key_item *i = dynamic_cast<Local_key_item*> (it_l))
{
if (!clef_p_)
{
Clef_item *c= new Clef_item;
- c->break_priority_i_ = -2; // ugh
+ c->set_elt_property (break_priority_scm_sym, gh_int2scm (-2)); // ugh
announce_element (Score_element_info (c, clef_req_l_));
clef_p_ = c;
}
-
clef_p_->symbol_ = clef_type_str_;
clef_p_->y_position_i_ = clef_position_i_;
void
Clef_item::do_pre_processing()
{
- dim_cache_[Y_AXIS].translate (paper()->internote_f () * y_position_i_);
+ dim_cache_[Y_AXIS].translate (y_position_i_ * staff_line_leading_f () / 2.0);
change_b_ = (break_status_dir() != RIGHT);
}
*/
Clef_item::Clef_item()
{
- breakable_b_ =true;
+ set_elt_property (breakable_scm_sym, SCM_BOOL_T);
default_b_ = false;
change_b_ = true;
octave_dir_ = CENTER;
void
Clef_item::do_add_processing ()
{
- if (!break_status_dir_) // broken stuff takes care of their own texts
+ if (!break_status_dir ()) // broken stuff takes care of their own texts
{
SCM defvis = gh_eval_str ("(lambda (d) (if (= d 1) '(#f . #f) '(#t . #t)))");
G_text_item *g =0;
if (default_b_)
{
- set_elt_property (ly_symbol ("visibility_lambda"),
+ set_elt_property (visibility_lambda_scm_sym,
defvis);
if (g)
- g->set_elt_property (ly_symbol ("visibility_lambda"),
+ g->set_elt_property (visibility_lambda_scm_sym,
defvis);
}
}
}
int d = (c_l->dir_);
- clash_group_arr_a[idx (d, c_l->h_shift_b_)].push (c_l);
+ SCM shift = c_l->remove_elt_property (horizontal_shift_scm_sym);
+ bool shift_b = (shift != SCM_BOOL_F);
+ clash_group_arr_a[idx (d, shift_b)].push (c_l);
}
Interval_t<int> y_extent[4];
Note_column * col_l_a[4];
Real x_off [4];
- int y_off[4];
for (int j =0 ; j < 4; j++)
{
x_off [j] = 0.0;
- y_off[j] = 0;
}
do
}
}
- Real inter_f = paper()->internote_f ();
- Real wid_f = paper()->note_width ();
+
+ Real wid_f = paper_l ()->note_width ();
for (int j=0; j < 4; j++)
{
if (col_l_a[j])
(shaddup)
*/
- Offset o (x_off[j] * wid_f, y_off[j] * inter_f);
+ Offset o (x_off[j] * wid_f, 0);
col_l_a[j]->translate (o);
// ((Score_element*)col_l_a[j])->translate (o);
}
Dimension_cache::Dimension_cache (Dimension_cache const &d)
{
init();
+ callback_l_ = d.callback_l_;
empty_b_ = d.empty_b_;
offset_ = d.offset_; //let's hope others will copy the refpoint appropriately.
}
void
Dimension_cache::init()
{
+ callback_l_ =0;
offset_ =0.0;
elt_l_ = 0;
dim_.set_empty ();
return r;
}
- assert (valid_b_);
+ if (!valid_b_)
+ {
+ Dimension_cache *nc = ((Dimension_cache*)this);
+ nc->dim_= (*callback_l_ ) (nc);
+ nc->valid_b_ = true;
+ }
r=dim_;
if (!r.empty_b()) // float exception on DEC Alpha
return r;
}
-
+void
+Dimension_cache::set_callback (Dim_cache_callback c)
+{
+ callback_l_ =c;
+}
position_i_ ++;
if (!no_dots_i_)
{
- transparent_b_ = true;
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
set_empty (true);
}
}
d.translate_axis (2*dw,X_AXIS);
out->add_molecule (d);
}
- Real inter_f = paper ()->internote_f ();
- out->translate_axis (inter_f * position_i_, Y_AXIS);
+ out->translate_axis (staff_line_leading_f () * position_i_ /2., Y_AXIS);
return out;
}
#include "lookup.hh"
#include "paper-def.hh"
#include "score-column.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
#include "note-column.hh"
#include "g-text-item.hh"
#include "g-staff-side.hh"
}
cresc_p_ = new_cresc_p;
- cresc_p_->set_bounds(LEFT,get_staff_info().musical_l ());
+ cresc_p_->set_bounds(LEFT,get_staff_info().musical_pcol_l ());
if (text_p_)
{
cresc_p_->dyn_b_drul_[LEFT] = true;
void
Dynamic_engraver::do_pre_move_processing()
{
- Staff_symbol* s_l = get_staff_info().staff_sym_l_;
- if (to_end_cresc_p_)
- to_end_cresc_p_->add_support (s_l);
- if (staff_side_p_)
- {
- staff_side_p_->add_support (s_l);
- // staff_side_p_->dim_cache_[Y_AXIS].parent_l_ = &s_l->dim_cache_[Y_AXIS];
- }
-
typeset_all ();
}
{
if (to_end_cresc_p_)
{
- to_end_cresc_p_->set_bounds(RIGHT,get_staff_info().musical_l ());
+ to_end_cresc_p_->set_bounds(RIGHT,get_staff_info().musical_pcol_l ());
typeset_element (to_end_cresc_p_);
to_end_cresc_p_ =0;
}
#include "paper-def.hh"
#include "encompass-info.hh"
#include "slur.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
#include "note-head.hh"
#include "debug.hh"
assert (0);
}
-Encompass_info::Encompass_info (Note_column const* note, Direction dir)
+Encompass_info::Encompass_info (Note_column const* note, Direction dir, Slur const* slur_l)
{
interstaff_f_ = 0;
- Paper_def* paper = note->paper ();
- Real interline = paper->interline_f ();
+ Paper_def* paper = note->paper_l ();
+
// UGH
Real notewidth = paper->note_width () * 0.8;
- Real internote = interline / 2;
+
Stem* stem_l = note->stem_l_;
+ Real internote = stem_l-> staff_line_leading_f ()/2.;
+
/*
set o_.x () to middle of notehead or on the exact position of stem,
according to slur direction
if (stem_l->dir_ != dir)
o_.y () += 1.0 * internote * dir;
- Slur* slur_l = stem_l->slur_l_;
if (slur_l->encompass_arr_.size ()
- && stem_l->staff_sym_l_ != slur_l->encompass_arr_[0]->stem_l_->staff_sym_l_)
+ && stem_l->staff_symbol_l () != slur_l->encompass_arr_[0]->stem_l_->staff_symbol_l ())
{
-#if 0 // this is nonsense..., don't issue warning
- if (stem_l->staff_sym_l_->dim_cache_[Y_AXIS].valid_b ())
- {
- interstaff_f_ = stem_l->staff_sym_l_->absolute_coordinate (Y_AXIS)
- - slur_l->encompass_arr_[0]->stem_l_->staff_sym_l_->absolute_coordinate (Y_AXIS);
- }
- else
-#endif
- {
- // warning (_ ("invalid dimension cache: guessing staff position"));
- if (slur_l->vertical_align_drul_[MIN] !=
- slur_l->vertical_align_drul_[MAX])
- warning (_ ("minVerticalAlign != maxVerticalAlign: interstaff slurs may be broken"));
- interstaff_f_ = slur_l->vertical_align_drul_[MIN];
- /* urg, guess staff order */
- int d = note->head_l_arr_.top ()->steps_i_
- - slur_l->encompass_arr_[0]->head_l_arr_[0]->steps_i_;
- if (abs (d > 3))
- interstaff_f_ *= sign (d);
- else if (stem_l->chord_start_f () >
- slur_l->encompass_arr_[0]->stem_l_->chord_start_f ())
- interstaff_f_ *= -1;
- }
+ if (slur_l->vertical_align_drul_[MIN] !=
+ slur_l->vertical_align_drul_[MAX])
+ warning (_ ("minVerticalAlign != maxVerticalAlign: interstaff slurs may be broken"));
+ interstaff_f_ = slur_l->vertical_align_drul_[MIN];
+ /* urg, guess staff order */
+ int d = note->head_l_arr_.top ()->position_i_
+ - slur_l->encompass_arr_[0]->head_l_arr_[0]->position_i_;
+ if (abs (d > 3))
+ interstaff_f_ *= sign (d);
+ else if (stem_l->chord_start_f () >
+ slur_l->encompass_arr_[0]->stem_l_->chord_start_f ())
+ interstaff_f_ *= -1;
o_.y () += interstaff_f_;
}
}
Paper_def*
-Engraver::paper() const
+Engraver::paper_l () const
{
return dynamic_cast<Paper_def*>(output_def_l_);
}
if (extender_spanner_p_)
{
req_l_->warning (_ ("unterminated extender"));
- extender_spanner_p_->set_bounds(RIGHT, get_staff_info ().command_l ());
+ extender_spanner_p_->set_bounds(RIGHT, get_staff_info ().command_pcol_l ());
}
}
Real w = extent (X_AXIS).length ();
w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
- Real h = paper ()->get_realvar (ly_symbol ("extender_height"));
+ Real h = paper_l ()->get_realvar (extender_height_scm_sym);
Molecule a = lookup_l ()->filledbox ( Box (Interval (0,w), Interval (0,h)));
a.translate (Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT]));
assert (item_l_drul_[LEFT] || item_l_drul_[RIGHT]);
// UGH
- Real nw_f = paper ()->note_width () * 0.8;
+ Real nw_f = paper_l ()->note_width () * 0.8;
Direction d = LEFT;
do
void
Font_size_engraver::acknowledge_element (Score_element_info e)
{
- e.elem_l_->set_elt_property (ly_symbol ("fontsize"),
+ e.elem_l_->set_elt_property (fontsize_scm_sym,
gh_int2scm (size_i_));
}
*/
#include "g-staff-side.hh"
+#include "staff-symbol.hh"
G_staff_side_item::G_staff_side_item ()
{
dir_ = CENTER;
to_position_l_ = 0;
- transparent_b_ = true;
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
padding_f_ = 0;
axis_ = Y_AXIS;
}
void
G_staff_side_item::do_substitute_element_pointer (Score_element*o, Score_element*n)
{
+ Staff_symbol_referencer::do_substitute_element_pointer (o,n);
if (o == to_position_l_)
to_position_l_ = n;
else
position_self ();
}
+
+void
+G_staff_side_item::do_add_processing ()
+{
+ if (axis_ == Y_AXIS && staff_symbol_l ())
+ {
+ add_support (staff_symbol_l ());
+ }
+}
Molecule*
G_text_item::do_brew_molecule_p () const
{
- Molecule a= paper ()->lookup_l(0)->text (style_str_,text_str_);
+ Molecule a= paper_l ()->lookup_l(0)->text (style_str_,text_str_);
+
return new Molecule (a);
}
void
Graphical_axis_group::add_element (Graphical_element*e)
{
+ used_b_ =true;
+ e->used_b_ = true;
for (int i = 0; i < 2; i++)
{
Axis a = axes_[i];
#include "graphical-axis-group.hh"
#include "debug.hh"
-bool
-Graphical_element::empty_b () const
-{
- return dim_cache_[X_AXIS].empty_b () && dim_cache_[Y_AXIS].empty_b ();
-}
-
Graphical_element::Graphical_element ()
{
+ used_b_ = false;
init ();
}
Graphical_element::Graphical_element (Graphical_element const &s)
: dim_cache_ (s.dim_cache_)
{
+ used_b_ = true;
init ();
}
if (d->empty_b ())
return Interval ();
- if (!d->valid_b ())
- ((Dimension_cache*)d)->set_dim ((a == X_AXIS)? do_width(): do_height ());
-
-
return d->get_dim ();
}
Link_array<Score_element> childs = get_children ();
for (int i = 0; i < childs.size (); i++)
{
- childs[i]->transparent_b_ = true;
+ childs[i]->set_elt_property (transparent_scm_sym, SCM_BOOL_T);
childs[i]->set_empty (true);
}
set_empty (true);
dot_p_arr_.push (d);
}
- note_p->steps_i_ = note_req_l->pitch_.steps ();
- // note_p->position_i_ = note_req_l->pitch_.steps ();
+ // note_p->steps_i_ = note_req_l->pitch_.steps ();
+ note_p->position_i_ = note_req_l->pitch_.steps ();
String noteheadstyle = get_property ("noteheadStyle", 0);
if (noteheadstyle.length_i ())
#include "axes.hh"
/**
- Order elements top to bottom.
+ Order elements top to bottom/left to right/right to left etc..
- TODO: merge with Horizontal_align_item
+ TODO: implement padding.
*/
class Align_element : virtual public Score_element {
Link_array<Score_element> elem_l_arr_;
void add_element (Score_element*);
void add_element_priority (Score_element*, int);
bool contains_b (Score_element const*) const;
-
+
+ Score_element *get_elt_by_priority (int) const;
protected:
virtual void do_print() const;
virtual void do_substitute_element_pointer (Score_element*,Score_element*);
#define AUDIO_COLUMN_HH
#include "proto.hh"
-#include "plist.hh"
#include "lily-proto.hh"
#include "moment.hh"
-#include "pcursor.hh"
+#include "parray.hh"
#include "audio-element.hh"
/**
Moment at_mom() const;
void print() const;
- Link_list<Audio_item *> audio_item_l_list_;
+ Link_array<Audio_item> audio_item_l_arr_;
Performance * performance_l_;
private:
#define AUDIO_STAFF_HH
#include "proto.hh"
-#include "plist.hh"
+#include "parray.hh"
#include "lily-proto.hh"
#include "audio-element.hh"
void add_audio_item (Audio_item* l);
void output (Midi_stream& midi_stream_r, int track_i);
- Link_list<Audio_item*> audio_item_l_list_;
-
+ Link_array<Audio_item> audio_item_l_arr_;
};
#endif // AUDIO_STAFF_HH
Axis_group_element(Axis,Axis);
Axis_group_element();
virtual Link_array<Score_element> get_children ();
-
-
};
#endif // AXIS_GROUP_ELEMENT_HH
#ifndef BAR_HH
#define BAR_HH
#include "item.hh"
+
/**
A vertical bar.
*/
protected:
virtual void do_pre_processing ();
virtual Molecule* do_brew_molecule_p () const;
-
+ virtual Real get_bar_size () const;
private:
void do_print () const;
};
#include "lily-proto.hh"
#include "directional-spanner.hh"
#include "stem-info.hh"
-#include "plist.hh"
+
/** a beam connects multiple stems.
Beam adjusts the stems its owns to make sure that they reach the
beam and that point in the correct direction */
-class Beam: public Directional_spanner {
+class Beam : public Directional_spanner {
public:
/**
The beams should be prevented to conflict with the stafflines,
#include "text-def.hh"
#include "direction.hh"
#include "pointer.hh"
-
+#include "staff-symbol-referencer.hh"
/**
Set a clef in a staff.
*/
-class Clef_item : public Item {
+class Clef_item : public Item, public Staff_symbol_referencer {
protected:
virtual void do_pre_processing();
virtual Molecule* do_brew_molecule_p() const;
public:
Cons<T> * head_;
Cons<T> ** tail_;
- Cons_list () { head_ =0; tail_ = &head_; }
+ Cons_list () { init_list (); }
+ void init_list () {head_ =0; tail_ = &head_; }
void append (Cons<T> *c)
{
assert (!c->next_);
void
clone_killing_cons_list (Cons_list<T>&, Cons<T> *src);
+template<class T> int cons_list_size_i (Cons<T> *l)
+{
+ int i=0;
+ while (l)
+ {
+ l = l->next_;
+ i++;
+ }
+ return i;
+}
+
+
+
#endif /* CONS_HH */
#include "lily-proto.hh"
#include "parray.hh"
+class Dimension_cache;
+typedef Interval (*Dim_cache_callback)(Dimension_cache *);
/**
Adminstration of offset dimension info.
*/
Real offset_;
Graphical_element *elt_l_;
+ Dim_cache_callback callback_l_;
friend class Graphical_element;
void init ();
public:
+ void set_callback (Dim_cache_callback);
/** The #offset_# is defined with regard to this graphical_element/
dimension_cache. */
#include "spanner.hh"
-/// a spanner which can be pointing "up" or "down"
+/** a spanner which can be pointing "up" or "down".
+
+ JUNKME?
+ */
class Directional_spanner : public Spanner{
public:
- /// -1 below heads, +1 above heads.
- Direction dir_;
- Directional_spanner();
+ /// -1 below heads, +1 above heads.
+ Direction dir_;
+ Directional_spanner();
- /// offset of "center" relative to left-column/0-pos of staff
- virtual Offset center() const;
- virtual void set_default_dir();
+ /// offset of "center" relative to left-column/0-pos of staff
+ virtual Offset center() const;
+ virtual void set_default_dir();
protected:
- virtual void do_pre_processing();
+ virtual void do_pre_processing();
};
#endif // DIRECTIONALSPANNER_HH
#define DOTS_HH
#include "item.hh"
-
+#include "staff-symbol-referencer.hh"
/**
The dots to go with a notehead/rest. A separate class, since they
are a party in collision resolution.
*/
-class Dots : public Item
+class Dots : public Item, public Staff_symbol_referencer
{
protected:
virtual Molecule * do_brew_molecule_p () const;
struct Encompass_info
{
Encompass_info ();
- Encompass_info (Note_column const*, Direction);
+ Encompass_info (Note_column const*, Direction, Slur const *);
Offset o_;
Real interstaff_f_;
#include "lily-proto.hh"
#include "parray.hh"
-#include "plist.hh"
#include "score-element-info.hh"
#include "engraver.hh"
#include "translator-group.hh"
Engraver_group_engraver();
~Engraver_group_engraver();
-
-
virtual Staff_info get_staff_info() const;
virtual void do_announces();
virtual void announce_element (Score_element_info);
/// utility
- Paper_def * paper() const;
+ Paper_def * paper_l() const;
/**
Invoke walker method to typeset element. Default: pass on to daddy.
*/
#define G_STAFF_SIDE_HH
#include "item.hh"
+#include "staff-symbol-referencer.hh"
-class G_staff_side_item : public Item
+class G_staff_side_item : public Item, public Staff_symbol_referencer
{
void position_self ();
public:
virtual void set_default_direction ();
VIRTUAL_COPY_CONS(Score_element);
protected:
+ virtual void do_add_processing ();
virtual void do_substitute_element_pointer (Score_element*,Score_element*);
virtual void do_pre_processing ();
virtual void do_post_processing ();
public:
Dimension_cache dim_cache_[NO_AXES];
+ /**
+ Set this if anyone points to me, or if I point to anyone.
+ */
+ bool used_b_;
+
char const * name () const;
void set_empty (bool);
- bool empty_b () const;
-
Graphical_element ();
Graphical_element (Graphical_element const&);
virtual ~Graphical_element ();
Graphical_element *parent_l (Axis a) const;
virtual void do_print () const;
-protected:
- virtual Interval do_height () const=0;
- virtual Interval do_width () const=0;
};
#endif // GRAPHICAL_ELEMENT_HH
class Item : public virtual Score_element {
void do_break ();
void try_visibility_lambda ();
-
-public:
- Link_array<Spanner> attached_span_l_arr_;
Drul_array<Item*> broken_to_drul_;
- Item *unbroken_original_l_;
- /// should be put in a breakable col.
- bool breakable_b_;
+
+public:
/// I am really to be broken?
- virtual bool breakable_b () const;
+ bool breakable_b () const;
+ bool broken_original_b () const;
- Direction break_status_dir_;
- int break_priority_i_;
+ Direction break_status_dir () const;
- /// nobreak = 0, pre = -1, post = 1
- Direction break_status_dir() const;
Item * find_prebroken_piece (Direction) const;
Item * find_prebroken_piece (Line_of_score*) const;
virtual void do_breakable_col_processing();
virtual void handle_prebroken_dependencies();
virtual void do_print() const;
- virtual bool linked_b() const;
-
virtual void handle_prebroken_dependents ();
void copy_breakable_items();
#include "item.hh"
#include "array.hh"
-
+#include "staff-symbol-referencer.hh"
/// An item which places accidentals at the start of the line
-struct Key_item : Item {
+class Key_item :public Item, public Staff_symbol_referencer {
+public:
+
Array<int> pitch_arr_;
Array<int> acc_arr_;
Array<int> old_pitch_arr_;
void add (int pitch, int acc);
void add_old (int pitch, int acc);
void set_c_position (int);
- int Key_item::calculate_position(int p, int a) const;
+ int calculate_position(int p, int a) const;
protected:
virtual void do_pre_processing();
}
}
-
#endif /* KILLING_CONS_TCC */
void read_lily_scm_file (String);
+void init_symbols ();
+#include "ly-symbols.hh"
#endif // LILY_GUILE_HH
#include "super-element.hh"
/// the columns of a score that form one line.
-class Line_of_score : public Spanner , public Super_element
+class Line_of_score : public Spanner, public Super_element
{
public:
Link_array<Paper_column> cols_;
- bool error_mark_b_;
-
-
Line_of_score();
void add_element (Score_element *);
protected:
virtual Link_array<Score_element> get_extra_dependencies () const;
-
-
virtual Interval do_width() const;
virtual void do_print() const;
VIRTUAL_COPY_CONS(Score_element);
#include "item.hh"
#include "array.hh"
#include "musical-pitch.hh"
+#include "staff-symbol-referencer.hh"
struct Local_key_cautionary_tuple
{
figure out private/public
*/
-class Local_key_item : public Item {
+class Local_key_item : public Item, public Staff_symbol_referencer {
Array<Local_key_cautionary_tuple> accidental_arr_;
Link_array<Item> support_items_;
public:
--- /dev/null
+/*
+ ly-symbols.hh -- declare SCM symbols.
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef LY_SYMBOLS_HH
+#define LY_SYMBOLS_HH
+
+#ifndef DECLARE_LY_SYMBOL
+#define DECLARE_LY_SYMBOL(a) extern SCM a ## _scm_sym
+#endif
+
+DECLARE_LY_SYMBOL(beam);
+DECLARE_LY_SYMBOL(beam_thickness);
+DECLARE_LY_SYMBOL(bracket);
+DECLARE_LY_SYMBOL(break_helper_only);
+DECLARE_LY_SYMBOL(break_priority);
+DECLARE_LY_SYMBOL(breakable);
+DECLARE_LY_SYMBOL(char);
+DECLARE_LY_SYMBOL(extender_height);
+DECLARE_LY_SYMBOL(filledbox);
+DECLARE_LY_SYMBOL(fontsize);
+DECLARE_LY_SYMBOL(header);
+DECLARE_LY_SYMBOL(horizontal_shift);
+DECLARE_LY_SYMBOL(interbeam);
+DECLARE_LY_SYMBOL(interbeam4);
+DECLARE_LY_SYMBOL(interline);
+DECLARE_LY_SYMBOL(linewidth);
+DECLARE_LY_SYMBOL(notewidth);
+DECLARE_LY_SYMBOL(output);
+DECLARE_LY_SYMBOL(pianobrace);
+DECLARE_LY_SYMBOL(placebox);
+DECLARE_LY_SYMBOL(rulesym);
+DECLARE_LY_SYMBOL(rulethickness);
+DECLARE_LY_SYMBOL(staffheight);
+DECLARE_LY_SYMBOL(text);
+DECLARE_LY_SYMBOL(transparent);
+DECLARE_LY_SYMBOL(tuplet);
+DECLARE_LY_SYMBOL(tuplet_thick);
+DECLARE_LY_SYMBOL(visibility_lambda);
+DECLARE_LY_SYMBOL(volta);
+DECLARE_LY_SYMBOL(volta_thick);
+
+
+#endif /* LY_SYMBOLS_HH */
+
struct Midi_note_event : PQueue_ent<Moment, Midi_note_off*>
{
- bool ignore_b_;
- Midi_note_event();
+ bool ignore_b_;
+ Midi_note_event();
};
int compare (Midi_note_event const& left, Midi_note_event const& right);
/**
walk audio and output midi
*/
-class Midi_walker : public PCursor<Audio_item*>
+class Midi_walker// : public PCursor<Audio_item*>
{
public:
- Midi_walker (Audio_staff* audio_staff_l, Midi_track* midi_track_l);
- ~Midi_walker();
-
- void process();
+ Midi_walker (Audio_staff* audio_staff_l, Midi_track* midi_track_l);
+ ~Midi_walker();
+ void process();
+ void operator ++(int);
+ bool ok () const;
private:
- void do_start_note (Midi_note* note_p);
- void do_stop_notes (Moment now_mom);
- void output_event (Moment now_mom, Midi_item* l);
-
- Midi_track* track_l_;
- PQueue<Midi_note_event> stop_note_queue;
- Moment last_mom_;
+ void do_start_note (Midi_note* note_p);
+ void do_stop_notes (Moment now_mom);
+ void output_event (Moment now_mom, Midi_item* l);
+
+ Midi_track* track_l_;
+ Audio_staff* staff_l_;
+ int index_;
+ Link_array<Audio_item> * item_l_arr_l_;
+ PQueue<Midi_note_event> stop_note_queue;
+ Moment last_mom_;
};
#define MOLECULE_HH
#include "lily-proto.hh"
-#include "plist.hh"
#include "box.hh"
#include "axes.hh"
#include "direction.hh"
#define MULTI_MEASURE_REST_HH
#include "spanner.hh"
+#include "staff-symbol-referencer.hh"
-class Multi_measure_rest : public Spanner
+class Multi_measure_rest : public Spanner, public Staff_symbol_referencer
{
public:
Multi_measure_rest ();
#define MUSIC_ITERATOR_HH
#include "lily-proto.hh"
-#include "plist.hh"
#include "array.hh"
#include "moment.hh"
#include "virtual-methods.hh"
#define MUSIC_LIST_ITERATOR_HH
#include "music-iterator.hh"
-#include "pcursor.hh"
-#include "plist.hh"
+
class Music_list_iterator : public Music_iterator
{
#define Music_sequence_HH
#include "music.hh"
-#include "plist.hh"
+#include "cons.hh"
-class Music_list : public Pointer_list<Music*>
+class Music_list : public Cons_list<Music>
{
public:
Musical_pitch do_relative_octave (Musical_pitch, bool);
#include "string.hh"
#include "lily-proto.hh"
#include "virtual-methods.hh"
-#include "plist.hh"
#include "dictionary.hh"
/**
public:
/** The relative position of the "voice" containing this
chord. Normally this would be the same as the stem direction,
- but rests do not have stems.
+ but rests do not have stems.
+
+ JUNKME.v
*/
Direction dir_;
- bool h_shift_b_;
Stem* stem_l_;
/// position of top line (5 linestaff: 8)
int position_i_;
- /// pitch in steps
- int steps_i_;
-
/// -1 = lowest, 0 = inside, 1 = top
int extremal_i_;
Note_head ();
static int compare (Note_head * const &a, Note_head *const &b) ;
-
protected:
virtual Interval do_width () const;
virtual void do_pre_processing();
#define P_COL_HH
#include "horizontal-group-item.hh"
-#include "plist.hh"
#include "rod.hh"
*/
class Paper_column : public Horizontal_group_item {
-protected:
- virtual bool breakable_b () const;
public:
-
VIRTUAL_COPY_CONS(Score_element);
- Drul_array< Array<Column_rod> > minimal_dists_arr_drul_;
+ Drul_array<Array<Column_rod> > minimal_dists_arr_drul_;
void preprocess ();
/// set a minimum distance
Line_of_score *line_l_;
virtual Line_of_score *line_l () const;
- bool error_mark_b_;
- bool used_b_ ; // manual override..
-
/// which one (left =0)
int rank_i() const;
- /// does this column have items
- bool used_b() const;
bool breakpoint_b() const;
-
void add_item (Item *i);
Paper_column();
add support for multiple fontsizes
+
+
+
add support for other len->wid conversions.
Input_engraver should be in here.
+
+
+ Interesting variables:
+
+ /// The distance between lines
+ interline
+
*/
class Paper_def : public Music_output_def
{
Array<Interval> shape_int_a_;
Real get_realvar (SCM symbol) const;
Real get_var (String id) const;
+
+ SCM get_scm_var (SCM sym) const;
+
void reinit ();
Paper_def ();
void set_lookup (int, Lookup*);
/// The thickness of a beam
Real beam_thickness_f () const;
- /// The distance between lines
- Real interline_f () const;
- /// half the distance between lines
- Real internote_f () const;
-
/// thickness of the standard line
Real rule_thickness () const;
Performance ();
~Performance ();
- void add_column (Audio_column*);
- void add_staff (Audio_staff* l);
void add_element (Audio_element*p);
-
void output (Midi_stream& midi_stream_r);
void output_header_track (Midi_stream& midi_stream_r);
#include "lily-proto.hh"
#include "parray.hh"
-#include "plist.hh"
#include "performer.hh"
#include "translator-group.hh"
#define RHYTHMIC_HEAD_HH
#include "item.hh"
+#include "staff-symbol-referencer.hh"
-class Rhythmic_head : public Item
+class Rhythmic_head : public Item, public Staff_symbol_referencer
{
public:
#include "directed-graph.hh"
#include "graphical-element.hh"
#include "protected-scm.hh"
+#include "lily-guile.hh"
typedef void (Score_element::*Score_element_method_pointer) (void);
which are implemented in the Directed_graph_node class: all elements
form an acyclic graph.
- (elem) */
+ (elem)
+
+
+Element Properties:
+
+Boolean (true iff defined)
+
+ break_helper_only -- if defined try to junk this after calcing breakpoints.
+
+ transparent -- do not calc. output
+
+*/
class Score_element : public virtual Graphical_element {
Protected_scm element_property_alist_;
Link_array<Score_element> dependency_arr_;
-
+ Lookup * lookup_l_;
public:
- /// delete after linebreak calculation.
- bool break_helper_only_b_;
- Paper_score *pscore_l_;
+ Score_element *original_l_;
+
+ /**
+ Administration: Where are we?. This is mainly used by Super_element and
+ Score_element::calcalute_dependencies ()
+
+ 0 means ORPHAN,
+ -1 means deleted
+
+ */
+ int status_i_;
+
+ Paper_score *pscore_l_;
Molecule * output_p_;
Score_element ();
Score_element (Score_element const&);
virtual void print () const;
- SCM get_elt_property (SCM sym);
+ /*
+ properties
+ */
+ SCM get_elt_property (SCM sym) const;
void set_elt_property (SCM sym, SCM val);
-
- Paper_def *paper () const;
+ SCM remove_elt_property (SCM key);
+
+ /*
+ related classes.
+ */
+ Paper_def *paper_l () const;
Lookup const *lookup_l () const;
virtual ~Score_element ();
add a dependency. It may be the 0 pointer, in which case, it is ignored.
*/
void add_dependency (Score_element*);
-
virtual Line_of_score * line_l () const;
- virtual bool linked_b () const;
+ bool linked_b () const;
VIRTUAL_COPY_CONS(Score_element);
- /// do not print anything black
- bool transparent_b_;
-
// ugh: no protection. Denk na, Vrij Veilig
void calculate_dependencies (int final, int busy, Score_element_method_pointer funcptr);
-public:
- /**
- Administration: Where are we?. This is mainly used by Super_element and
- Score_element::calcalute_dependencies ()
-
- 0 means ORPHAN,
- -1 means deleted
-
- */
- int status_i_;
-
protected:
Score_element* dependency (int) const;
int dependency_size () const;
virtual void handle_prebroken_dependencies ();
virtual void handle_prebroken_dependents ();
virtual Link_array<Score_element> get_extra_dependencies () const;
+
+ static Interval dim_cache_callback (Dimension_cache*);
};
#include "engraver.hh"
/**
- Group a number of items across staffs
- */
+ Group a number of items across staffs:
+
+ Acknowledge items, put each priority in a separate column. Put all
+ columns in a horizontal align engraver. We manufacture two types of
+ elements: the alignment element and the columns. This is probably
+ more convenient, and I question the use having one without the
+ other.
+*/
class Score_priority_engraver : public Engraver
{
- Hash_table<int, Horizontal_group_item *> align_p_tab_;
+ Break_align_item * halign_p_;
+ Link_array<Item> column_p_arr_;
+
+ void add_horizontal_group (Item* , int p);
public:
VIRTUAL_COPY_CONS(Translator);
Score_priority_engraver ();
#include "array.hh"
#include "lily-proto.hh"
-#include "plist.hh"
#include "string.hh"
#include "input.hh"
#include "lily-proto.hh"
void set_default_dir();
public:
General_script_def *specs_p_;
- bool postbreak_only_b_;
-
+
static int compare (Script *const&, Script *const&) ;
Script();
~Script ();
Script (Script const&);
void set_stem (Stem*);
-
};
{
Link_array<Single_malt_grouping_item> spacing_unit_l_arr_;
public:
+ /**
+ extra space to add after postbreak. (FIXME).
+ */
+ Real padding_f_ ;
Separating_group_spanner ();
void add_spacing_unit (Single_malt_grouping_item*);
protected:
private:
Moment here_mom_;
- PCursor<Music*> *cursor_p_;
+ Cons<Music> *cursor_;
Music_iterator * iter_p_;
/*
Array<Breaking_information> broken_info_;
friend Axis_group_spanner; // UGH
- Spanner * unbroken_original_l_;
-
virtual void output_processing ();
virtual void do_space_processing ();
virtual void do_break_processing ();
--- /dev/null
+/*
+ staff-bar.hh -- declare Staff_bar
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef STAFF_BAR_HH
+#define STAFF_BAR_HH
+
+#include "bar.hh"
+#include "staff-symbol-referencer.hh"
+
+/**
+ A bar that is on a staff.
+ Ugh. Entita non multiplicandum ...
+ */
+class Staff_bar : public Bar , public Staff_symbol_referencer
+{
+public:
+ VIRTUAL_COPY_CONS(Score_element);
+ virtual Real get_bar_size () const;
+};
+
+#endif /* STAFF_BAR_HH */
+
#include "lily-proto.hh"
-/// struct to pass staff info along a Engraver hierarchy.
+/** struct to pass staff info along a Engraver hierarchy.
+
+ JUNKME.
+ */
struct Staff_info {
- Staff_symbol*staff_sym_l_;
-
Time_description const *time_C_;
Rhythmic_grouping const *rhythmic_C_;
Score_column *musical_l_;
Score_column *command_l_;
- Score * score_l_;
- Score *score_l();
Paper_column * command_pcol_l();
- Score_column* musical_l();
- Score_column *command_l();
Paper_column * musical_pcol_l();
Staff_info();
};
#include "score-element.hh"
#include "interval.hh"
#include "direction.hh"
+#include "staff-symbol-referencer.hh"
/**
staff).
*/
-class Staff_side : virtual Score_element
+class Staff_side : public Staff_symbol_referencer
{
public:
virtual void do_substitute_element_pointer (Score_element *, Score_element*);
virtual void do_pre_processing ();
virtual void do_post_processing ();
+ virtual void do_add_processing ();
Interval support_extent () const;
-
private:
void do_side_processing ();
Link_array<Score_element> support_l_arr_;
protected:
virtual ~Staff_symbol_engraver();
- virtual void fill_staff_info (Staff_info&);
+
+ virtual void acknowledge_element (Score_element_info);
virtual void do_removal_processing();
virtual void do_creation_processing();
+++ /dev/null
-/*
- staffsym.hh -- declare Staff_symbol
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef STAFFSYM_HH
-#define STAFFSYM_HH
-#include "spanner.hh"
-
-/**
- This spanner draws the lines of a pstaff.
- The bottom line is position 0.
- */
-class Staff_symbol : public Spanner
-{
-public:
- /// this many lines.
- int no_lines_i_;
- Real interline_f_;
-
-
- Staff_symbol ();
- Real inter_note_f() const;
- int steps_i() const;
-protected:
- VIRTUAL_COPY_CONS(Score_element);
- virtual Interval do_height () const;
- virtual Molecule* do_brew_molecule_p() const;
- virtual void do_print() const;
-};
-#endif // STAFFSYM_HH
--- /dev/null
+/*
+ staff-sym-referencer.hh -- declare Staff_sym_referencer
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef STAFF_SYM_REFERENCER_HH
+#define STAFF_SYM_REFERENCER_HH
+
+#include "score-element.hh"
+
+/**
+ A notation object that needs access to variables of the staff (no
+ lines, leading).
+
+ */
+class Staff_symbol_referencer : public virtual Score_element
+{
+protected:
+ Staff_symbol * staff_sym_l_;
+
+public:
+ Staff_symbol_referencer ();
+ void set_staff_symbol (Staff_symbol*);
+ Real staff_line_leading_f () const;
+ Staff_symbol * staff_symbol_l () const;
+ int lines_i () const;
+ virtual void do_substitute_element_pointer (Score_element*,Score_element*);
+};
+
+#endif /* STAFF_SYM_REFERENCER_HH */
+
--- /dev/null
+/*
+ staffsym.hh -- declare Staff_symbol
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef STAFFSYM_HH
+#define STAFFSYM_HH
+#include "spanner.hh"
+
+/**
+ This spanner draws the lines of a pstaff.
+ The bottom line is position 0.
+ */
+class Staff_symbol : public Spanner
+{
+public:
+ /// this many lines.
+ int no_lines_i_;
+ Real staff_line_leading_f_;
+
+ Staff_symbol ();
+ int steps_i() const;
+protected:
+ VIRTUAL_COPY_CONS(Score_element);
+ virtual Interval do_height () const;
+ virtual Molecule* do_brew_molecule_p() const;
+ virtual void do_print() const;
+};
+#endif // STAFFSYM_HH
#include "array.hh"
#include "moment.hh"
#include "molecule.hh"
-
+#include "staff-symbol-referencer.hh"
/**the rule attached to the ball.
takes care of:
Stem size depends on flag.
*/
-class Stem : public Item {
+class Stem : public Item, public Staff_symbol_referencer {
Drul_array<Real> yextent_drul_;
-
- /// needed for determining direction/length
- int staff_size_i_;
/**extent of the stem (positions).
fractional, since Beam has to adapt them.
*/
Beam* beam_l_;
- /// our slur (urg)
- Slur* slur_l_;
-
Drul_array<int> beams_i_drul_;
/// maximum number of beams
/// direction of the beam
Direction beam_dir_;
-
- /// what staff am i on?
- Staff_symbol* staff_sym_l_;
-
Stem ();
/// ensure that this Stem also encompasses the Notehead #n#
#include "text-def.hh"
/** a spanner which puts texts on top of other spanners. Use for
- triplets, volta, ottava, etc. */
+ triplets, volta, ottava, etc.
+
+ (does anyone use this? Junkme?)
+*/
class Text_spanner : public Spanner {
public:
Directional_spanner * support_span_l_;
Item::Item ()
{
- unbroken_original_l_ =0;
- break_priority_i_ = 0;
- breakable_b_ = false;
- break_status_dir_ = CENTER;
broken_to_drul_[LEFT] = broken_to_drul_[RIGHT]=0;
}
bool
Item::breakable_b () const
{
- return !unbroken_original_l_
- && dynamic_cast<Item*> (parent_l (X_AXIS))->breakable_b ();
+ if (original_l_ )
+ return false;
+
+ Item * i =dynamic_cast<Item*> (parent_l (X_AXIS));
+ return (i) ? i->breakable_b () : get_elt_property( breakable_scm_sym) != SCM_BOOL_F;
}
void
Item::do_print() const
{
-#ifndef NPRINT
- DOUT << "breakable_b_: " << breakable_b_ <<
- " break_status_dir_: " << break_status_dir_;
-#endif
}
return dynamic_cast<Score_element *> (g)-> line_l ();
}
-Direction
-Item::break_status_dir() const
-{
- return break_status_dir_;
-}
void
Item::copy_breakable_items()
{
Score_element * dolly = clone();
Item * item_p = dynamic_cast<Item*>(dolly);
- item_p->unbroken_original_l_ = this;
- item_p->break_status_dir_ = i;
pscore_l_->typeset_element (item_p);
new_copies[i] =item_p;
}
void
Item::try_visibility_lambda ()
{
- SCM vis = get_elt_property (ly_symbol ("visibility_lambda"));
+ SCM vis = remove_elt_property (visibility_lambda_scm_sym);
if (vis != SCM_BOOL_F)
{
- SCM args = scm_listify (gh_int2scm (break_status_dir_), SCM_UNDEFINED);
+ SCM args = scm_listify (gh_int2scm (break_status_dir ()), SCM_UNDEFINED);
SCM result = gh_apply ( SCM_CDR(vis), args);
int trans = gh_scm2bool (gh_car (result));
int empty = gh_scm2bool (gh_cdr (result));
if (empty)
set_empty (true);
if (trans)
- transparent_b_ = true;
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
}
}
void
Item::handle_prebroken_dependencies()
{
- if (breakable_b_)
+ if (original_l_)
Score_element::handle_prebroken_dependencies();
}
+bool
+Item::broken_original_b () const
+{
+ return broken_to_drul_[LEFT] || broken_to_drul_[RIGHT];
+}
+
int
Item::left_right_compare(Item const *l, Item const *r)
{
return p1->rank_i () - p2->rank_i ();
}
-
-bool
-Item::linked_b() const
-{
- return Score_element::linked_b() || attached_span_l_arr_.size();
-}
-
-
-
Paper_column *
Item::column_l () const
{
Item::Item (Item const &s)
: Score_element (s)
{
- unbroken_original_l_ = 0;
- /* do not copy attached_span_l_arr_ */
- breakable_b_ = s.breakable_b_;
broken_to_drul_[LEFT] = broken_to_drul_[RIGHT] =0;
- break_status_dir_ = s.break_status_dir_;
- break_priority_i_ = s.break_priority_i_;
}
Direction d = LEFT;
do
{
- broken_to_drul_[d]->dim_cache_[X_AXIS].parent_l_ =
- &parent->broken_to_drul_[d]->dim_cache_[X_AXIS];
- parent->broken_to_drul_[d]->add_dependency (broken_to_drul_[d]);
+ Item * broken_self = find_prebroken_piece (d);
+ Item * broken_parent = parent->find_prebroken_piece (d);
+
+ broken_self->dim_cache_[X_AXIS].parent_l_ =
+ &broken_parent->dim_cache_[X_AXIS];
}
while ((flip (&d))!=LEFT);
}
}
+Direction
+Item::break_status_dir () const
+{
+ if (original_l_)
+ {
+ Item * i = dynamic_cast<Item*> (original_l_);
+
+ return (i->broken_to_drul_[LEFT] == this) ? LEFT : RIGHT;
+ }
+ else
+ return CENTER;
+}
if (!kit_p_)
{
kit_p_ = new Key_item;
- kit_p_->break_priority_i_ = -1; // ugh
+ kit_p_->set_elt_property (break_priority_scm_sym, gh_int2scm(-1)); // ugh
kit_p_->multi_octave_b_ = key_.multi_octave_b_;
announce_element (Score_element_info (kit_p_,keyreq_l_));
Key_item::Key_item ()
{
multi_octave_b_ = false;
- breakable_b_ =true;
+ set_elt_property (breakable_scm_sym, SCM_BOOL_T);
default_b_ = false;
set_c_position (0);
}
Key_item::do_brew_molecule_p() const
{
Molecule*output = new Molecule;
- Real inter = paper()->internote_f ();
+ Real inter = staff_line_leading_f ()/2.0;
int j;
- if ((break_status_dir_ == LEFT || break_status_dir_ == CENTER)
+ if ((break_status_dir () == LEFT || break_status_dir () == CENTER)
|| old_pitch_arr_.size ())
{
for (int i =0; i < old_pitch_arr_.size(); i++)
if (pitch_arr_.size())
{
Molecule m (lookup_l ()->fill (Box (
- Interval (0, paper()->note_width ()),
+ Interval (0, paper_l ()->note_width ()),
Interval (0,0))));
output->add_at_edge (X_AXIS, RIGHT, m,0 );
{
if (default_b_)
{
- transparent_b_ = (break_status_dir() != RIGHT);
- set_empty (transparent_b_);
+ bool transparent = (break_status_dir() != RIGHT);
+ set_empty (transparent);
+
+ if (transparent)
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
}
}
(c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
#include "vertical-group-spanner.hh"
#include "command-request.hh"
#include "bar.hh"
#include "p-col.hh"
#include "p-score.hh"
-
Line_of_score::Line_of_score()
{
- error_mark_b_ = 0;
}
-
-
-
void
Line_of_score::add_element (Score_element*e)
{
Line_of_score::set_breaking (Array<Column_x_positions> const &breaking, int j) const
{
const Link_array<Paper_column> &curline (breaking[j].cols);
- const Link_array<Paper_column> &errors (breaking[j].error_col_l_arr_);
+
const Array<Real> &config (breaking[j].config);
- for (int i=0; i < errors.size(); i++)
- errors[i]->error_mark_b_ = true;
-
Line_of_score *line_l=0;
if (breaking.size() >1)
Local_key_item::do_brew_molecule_p() const
{
Molecule*output = new Molecule;
-
+ Real note_distance = staff_line_leading_f ()/2;
Molecule *octave_mol_p = 0;
int lastoct = -100;
+
for (int i = 0; i < accidental_arr_.size(); i++)
{
Musical_pitch p (accidental_arr_[i].pitch_);
{
if (octave_mol_p)
{
- Real dy =lastoct*7*paper()->internote_f ();
+ Real dy =lastoct*7* note_distance;
octave_mol_p->translate_axis (dy, Y_AXIS);
output->add_molecule (*octave_mol_p);
delete octave_mol_p;
lastoct = p.octave_i_;
Real dy =
(c0_position_i_ + p.notename_i_)
- * paper()->internote_f ();
+ * note_distance;
Molecule m (lookup_l ()->accidental (p.accidental_i_,
accidental_arr_[i].cautionary_b_));
if (octave_mol_p)
{
- Real dy =lastoct*7*paper()->internote_f ();
+ Real dy =lastoct*7*note_distance;
octave_mol_p->translate_axis (dy, Y_AXIS);
output->add_molecule (*octave_mol_p);
delete octave_mol_p;
if (accidental_arr_.size())
{
- Box b(Interval (0, paper()->internote_f ()), Interval (0,0));
+ Box b(Interval (0, note_distance), Interval (0,0));
Molecule m (lookup_l ()->fill (b));
output->add_at_edge (X_AXIS, RIGHT, m, 0);
}
if (cm.code () < 0)
return m;
- Atom at (gh_list (ly_symbol ("char"),
+ Atom at (gh_list (char_scm_sym,
gh_int2scm (cm.code ()),
SCM_UNDEFINED));
at.font_ = ly_symbol (font_name_.ch_C());
Molecule m;
Atom at
- (gh_list (ly_symbol ("beam"),
+ (gh_list (beam_scm_sym,
gh_double2scm (width),
gh_double2scm (slope),
gh_double2scm (thick),
Molecule
Lookup::rule_symbol (Real height, Real width) const
{
- Atom at (gh_list (ly_symbol ("rulesym"),
+ Atom at (gh_list (rulesym_scm_sym,
gh_double2scm (height),
gh_double2scm (width),
SCM_UNDEFINED));
{
Molecule m;
- Atom at (gh_list (ly_symbol ("filledbox"),
+ Atom at (gh_list (filledbox_scm_sym,
gh_double2scm (-b[X_AXIS][LEFT]),
gh_double2scm (b[X_AXIS][RIGHT]),
gh_double2scm (-b[Y_AXIS][DOWN]),
m.dim_.y () = ydims;
- Atom at (gh_list (ly_symbol ("text"),
+ Atom at (gh_list (text_scm_sym,
gh_str02scm (text.ch_C()),
SCM_UNDEFINED));
at.font_ = ly_symbol (style);
{
Molecule m;
- Atom at (gh_list (ly_symbol ("pianobrace"),
+ Atom at (gh_list (pianobrace_scm_sym,
gh_double2scm (y),
SCM_UNDEFINED
));
Lookup::plet (Real dy , Real dx, Direction dir) const
{
Molecule m;
- SCM thick = ly_symbol ("tuplet_thick");
+ SCM thick = tuplet_thick_scm_sym;
Real t = 0.1 PT;
if (paper_l_->scope_p_->elem_b (thick))
{
t = paper_l_->get_realvar (thick);
}
- Atom at (gh_list(ly_symbol ("tuplet"),
+ Atom at (gh_list(tuplet_scm_sym,
gh_double2scm (dx),
gh_double2scm (dy),
gh_double2scm (t),
Lookup::staff_bracket (Real y) const
{
Molecule m;
- Atom at ( gh_list (ly_symbol ("bracket"),
+ Atom at ( gh_list (bracket_scm_sym,
gh_double2scm (y),
SCM_UNDEFINED));
m.add_atom (&at);
Lookup::volta (Real w, bool last_b) const
{
Molecule m;
- SCM thick = ly_symbol ("volta_thick");
+ SCM thick = volta_thick_scm_sym;
Real t = 0.1 PT;
if (paper_l_->scope_p_->elem_b (thick))
{
t = paper_l_->get_realvar (thick);
}
- Atom at (gh_list (ly_symbol ("volta"),
+ Atom at (gh_list (volta_scm_sym,
gh_double2scm (w),
gh_double2scm (t),
gh_int2scm (last_b),
SCM_UNDEFINED));
- Real interline_f = paper_l_->interline_f ();
+ Real interline_f = paper_l_->get_realvar (interline_scm_sym);
m.dim_[Y_AXIS] = Interval (-interline_f, interline_f);
m.dim_[X_AXIS] = Interval (0, w);
--- /dev/null
+/*
+ ly-symbols.cc -- implement scheme symbols
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+#include "lily-guile.hh"
+
+/*
+ storage
+ */
+#undef LY_SYMBOLS_HH
+#define extern
+#include "ly-symbols.hh"
+
+#undef DECLARE_LY_SYMBOL
+#undef LY_SYMBOLS_HH
+#define DECLARE_LY_SYMBOL(a) a ## _scm_sym = ly_symbol (#a); scm_permanent_object(a ## _scm_sym)
+
+/*
+ initialisations.
+ */
+void
+init_symbols ()
+{
+#include "ly-symbols.hh"
+}
+
+
{1, "include", 'I'},
{0, "no-paper", 'M'},
{0, "dependencies", 'd'},
- {0, "no-timestamps", 'T'},
+ {0, "no-timestamps", 'T'}, // why do we have this option?
{0, "find-old-relative", 'Q'},
{0, "ignore-version", 'V'},
{1, "output-format", 'f'},
/*
need to do this first. Engravers use lily.scm contents.
*/
+ init_symbols ();
read_lily_scm_file ( "lily.scm");
cout << endl;
String str = to_str ((char)status_byte);
str += to_str ((char) (pitch_i () + c0_pitch_i_c_));
-#if 0
- // poor man's staff dynamics:
- str += to_str ((char) (dynamic_byte_ - 0x10 * channel_i_));
-#endif
-
+ str += to_str ((char)dynamic_byte_);
return str;
}
}
Midi_walker::Midi_walker (Audio_staff* audio_staff_l, Midi_track* track_l)
- : PCursor<Audio_item*>(audio_staff_l->audio_item_l_list_)
{
track_l_ = track_l;
+ index_= 0;
+ item_l_arr_l_ = &audio_staff_l->audio_item_l_arr_;
last_mom_ = 0;
}
void
Midi_walker::do_start_note (Midi_note* note_p)
{
- Moment stop_mom = note_p->length_mom () + ptr ()->audio_column_l_->at_mom ();
+ Audio_item* ptr = (*item_l_arr_l_)[index_];
+ Moment stop_mom = note_p->length_mom () + ptr->audio_column_l_->at_mom ();
for (int i=0; i < stop_note_queue.size(); i++)
{
if (stop_note_queue[i].val->pitch_i() == note_p->pitch_i ())
e.key = stop_mom;
stop_note_queue.insert (e);
- output_event (ptr()->audio_column_l_->at_mom (), note_p);
+ output_event (ptr->audio_column_l_->at_mom (), note_p);
}
/**
void
Midi_walker::process()
{
- do_stop_notes (ptr()->audio_column_l_->at_mom ());
+ Audio_item* ptr = (*item_l_arr_l_)[index_];
+ do_stop_notes (ptr->audio_column_l_->at_mom ());
- Midi_item* p = ptr()->midi_item_p ();
+ Midi_item* p = ptr->midi_item_p ();
if (!p)
return;
p->channel_i_ = track_l_->number_i_;
if (Midi_note *mi = dynamic_cast<Midi_note*>(p))
do_start_note (mi);
else
- output_event (ptr()->audio_column_l_->at_mom (), p);
+ output_event (ptr->audio_column_l_->at_mom (), p);
+}
+bool
+Midi_walker::ok () const
+{
+ return index_ <item_l_arr_l_->size ();
+}
+void
+Midi_walker::operator ++(int)
+{
+ assert (ok());
+ index_++;
}
-
rest_moments_[START] =
rest_moments_[STOP] =0;
multi_measure_req_l_ = 0;
+
+ lastrest_p_ =0;
mmrest_p_ = 0;
}
s = (lookup_l ()->rest (-4, 0));
}
mol_p->add_molecule (s);
- Real interline_f = paper ()->interline_f ();
+ Real interline_f = staff_line_leading_f ();
if (measures_i_ == 1)
{
mol_p->translate_axis (interline_f, Y_AXIS);
text.text_str_ = to_str (measures_i_);
text.style_str_ = "number";
text.align_dir_ = CENTER;
- Molecule s = text.get_molecule (paper (), UP);
+ Molecule s = text.get_molecule (paper_l (), UP);
s.translate_axis (3.0 * interline_f, Y_AXIS);
mol_p->add_molecule (s);
}
void
Multi_measure_rest::do_substitute_element_pointer (Score_element* o, Score_element* n)
{
+ Staff_symbol_referencer::do_substitute_element_pointer (o,n);
if (Item* c = dynamic_cast <Item*> (o))
column_arr_.substitute (c, dynamic_cast<Item*> (n));
}
Array<Rod> a;
Rod r;
r.item_l_drul_ = spanned_drul_;
- r.distance_f_ = paper ()->get_var ("mmrest_x_minimum");
+ r.distance_f_ = paper_l ()->get_var ("mmrest_x_minimum");
a.push (r);
return a;
}
#include "request.hh"
#include "musical-request.hh"
#include "main.hh"
+#include "killing-cons.tcc"
Moment
Simultaneous_music::length_mom () const
{
Moment dur = 0;
- for (iter (music_p_list_p_->top(), i); i.ok (); i++)
- dur = dur >? i->length_mom ();
+ for (Cons<Music> *i = music_p_list_p_->head_; i; i = i->next_)
+ dur = dur >? i->car_->length_mom ();
return dur;
}
void
Music_sequence::compress (Moment m)
{
- for (PCursor<Music*> i(music_p_list_p_->top()); i.ok (); i++)
- i->compress (m);
+
+ for (Cons<Music> *i = music_p_list_p_->head_; i; i = i->next_)
+ i->car_->compress (m);
}
Simultaneous_music::Simultaneous_music(Music_list *p)
Sequential_music::length_mom () const
{
Moment last=0;
- for (iter (music_p_list_p_->top(), i); i.ok (); i++)
+ for (Cons<Music> *i = music_p_list_p_->head_; i; i = i->next_)
{
- last += i->length_mom ();
+ last += i->car_->length_mom ();
}
return last;
}
{
Musical_pitch retval;
int count=0;
- for (PCursor<Music*> i (top ()); i.ok (); i++)
+ for (Cons<Music> *i = head_; i ; i = i->next_)
{
- last = i->to_relative_octave (last);
+ last = i->car_->to_relative_octave (last);
if (!count ++ )
retval = last;
}
- // hmmm
-#if 0
- if (!ret_first && find_old_relative_b)
- {
- PCursor<Music*> b (bottom ());
-
- if (b.ok ())
- {
- String w = _("\\relative mode changed here, old value: ");
- w += last.str ();
-
- b->warning (w);
- retval = last;
- }
- }
-
-#endif
if (!ret_first)
retval = last;
Music_list::Music_list (Music_list const &s)
- : Pointer_list<Music*> ()
+ : Cons_list<Music> (s)
{
- for (PCursor<Music*> i(s.top()); i.ok (); i++)
- add_music (i->clone());
+ init_list ();
+ clone_killing_cons_list (*this, s.head_);
}
+
void
Music_list::add_music (Music*m_p)
{
if (!m_p)
return;
- bottom().add (m_p);
+ append (new Killing_cons<Music> (m_p, 0));
}
-
-
-
-
Request_chord::Request_chord()
: Simultaneous_music (new Music_list)
{
Musical_pitch
Request_chord::to_relative_octave (Musical_pitch last)
{
- for (iter (music_p_list_p_->top(),i); i.ok (); i++)
+ for (Cons<Music> *i = music_p_list_p_->head_; i ; i = i->next_)
{
- if (Melodic_req *m= dynamic_cast <Melodic_req *> (i.ptr ()))
+ if (Melodic_req *m= dynamic_cast <Melodic_req *> (i->car_))
{
Musical_pitch &pit = m->pitch_;
pit.to_relative_octave (last);
Music_list::Music_list ()
- : Pointer_list<Music*> ()
{
}
Music_output_def::assign_translator (Translator*tp)
{
String s =tp->type_str_;
+ if (s.empty_b ())
+ {
+ tp->warning (_("Interpretation context with empty type"));
+ }
if (translator_p_dict_p_->elem_b (s))
delete translator_p_dict_p_->elem (s);
{
static SCM output_sym;
if (!output_sym)
- output_sym = scm_protect_object (ly_symbol ("output"));
+ output_sym = scm_protect_object (output_scm_sym);
if (safe_global_b || !scope_p_->elem_b (output_sym))
return "";
Identifier * id = scope_p_->elem (output_sym);
void
Music_sequence::transpose (Musical_pitch rq)
{
- for (iter (music_p_list_p_->top(),i); i.ok (); i++)
- i->transpose (rq);
+ for (Cons<Music> *i = music_p_list_p_->head_; i; i = i->next_)
+ i->car_->transpose (rq);
}
void
Music_sequence::do_print() const
{
#ifndef NPRINT
- for (iter (music_p_list_p_->top(),i); i.ok (); i++)
- i->print();
+ for (Cons<Music> *i = music_p_list_p_->head_; i; i = i->next_)
+ i->car_->print();
#endif
}
Note_column::Note_column()
{
stem_l_ = 0;
- h_shift_b_ = false;
dir_ =CENTER;
}
Note_head::Note_head ()
{
x_dir_ = CENTER;
- staff_size_i_= 8; // UGH
- steps_i_ = 0;
position_i_ = 0;
extremal_i_ = 0;
}
dots_l_->position_i_ = position_i_;
}
-
-
-
int
Note_head::compare (Note_head *const &a, Note_head * const &b)
{
Note_head::do_brew_molecule_p() const
{
Molecule*out = 0;
- Paper_def *p = paper();
- Real inter_f = p->internote_f ();
-
+ Paper_def *p = paper_l ();
+ Real inter_f = staff_line_leading_f ()/2;
+ int sz = lines_i ()-1;
// ugh
- int streepjes_i = abs (position_i_) < staff_size_i_/2
+ int streepjes_i = abs (position_i_) < sz
? 0
- : (abs(position_i_) - staff_size_i_/2) /2;
+ : (abs(position_i_) - sz) /2;
Molecule head;
DOUT << "post: ";
postbreak_l()->print();
}
- if (break_status_dir_)
+ if (break_status_dir ())
{
- DOUT << '\n' << ((break_status_dir_ == LEFT) ? "prebreak" : "postbreak");
+ DOUT << '\n' << ((break_status_dir () == LEFT) ? "prebreak" : "postbreak");
DOUT << '\n';
}
Paper_column*
Paper_column::prebreak_l() const
{
- return dynamic_cast<Paper_column*>(broken_to_drul_[LEFT]);
+ return dynamic_cast<Paper_column*>(find_prebroken_piece (LEFT));
}
Paper_column*
Paper_column::postbreak_l() const
{
- return dynamic_cast<Paper_column*>( broken_to_drul_[RIGHT]);
+ return dynamic_cast<Paper_column*>( find_prebroken_piece (RIGHT));
}
+
bool
Paper_column::breakpoint_b() const
{
Paper_column::Paper_column()
{
- used_b_ = false;
- error_mark_b_ = false;
line_l_=0;
rank_i_ = -1;
}
return line_l_;
}
-bool
-Paper_column::used_b() const
-{
- return linked_b();
-}
minimal_dists_arr_drul_[LEFT].sort (Column_rod::compare);
minimal_dists_arr_drul_[RIGHT].sort (Column_rod::compare);
}
-
-bool
-Paper_column::breakable_b () const
-{
- return breakable_b_;
-}
{
Link_array<Score_element> to_remove;
Link_array<Score_element> keep;
+ SCM help_sym = break_helper_only_scm_sym;
for (int i=0; i < elem_p_arr_.size (); i++)
{
Score_element*e = elem_p_arr_[i];
- if (e->break_helper_only_b_)
+ SCM p = e->get_elt_property (help_sym);
+ if (p != SCM_BOOL_F)
to_remove.push (e);
else
keep.push (e);
{
Spanner *s = span_p_arr_[i];
Score_element *e = s;
- if (e->break_helper_only_b_)
+ SCM p = e->get_elt_property (break_helper_only_scm_sym);
+ if (p != SCM_BOOL_F)
to_remove.push (e);
else
keeps.push (s);
while (start < stop)
{
Paper_column *c = col_l_arr_[start];
- if (c->breakable_b_ && !c->line_l_)
+ if (c->breakable_b () && !c->line_l_)
ret.push (c);
start++;
}
#include "paper-stream.hh"
-#define SCMVAR(s) { static SCM sym; \
- if (!sym)\
- sym = scm_protect_object (ly_symbol (#s));\
- return get_realvar (sym); }
-
-
Paper_def::Paper_def ()
{
lookup_p_tab_p_ = new Hash_table<int, Lookup*>;
}
}
+SCM
+Paper_def::get_scm_var (SCM s) const
+{
+ if (!scope_p_->elem_b (s))
+ return SCM_BOOL_F;
+
+ Identifier * id = scope_p_->elem (s);
+
+ SCM z;
+ SCM_NEWCELL (z);
+ SCM_SETCAR(z, s);
+
+ SCM val;
+
+ if (dynamic_cast<Real_identifier*> (id))
+ {
+ Real r = *id->access_content_Real (false);
+ val = gh_double2scm (r);
+ }
+ else
+ {
+ return SCM_BOOL_F;
+ }
+
+ SCM_SETCDR(z,val);
+ return z;
+}
+
Real
Paper_def::get_var (String s) const
{
Real
Paper_def::beam_thickness_f () const
{
-SCMVAR(beam_thickness);
+ return get_realvar (beam_thickness_scm_sym);
}
Real
Paper_def::linewidth_f () const
{
-SCMVAR(linewidth);
+ return get_realvar (linewidth_scm_sym);
}
Real
}
-Real
-Paper_def::interline_f () const
-{
- SCMVAR(interline)
-}
-
Real
Paper_def::rule_thickness () const
{
- SCMVAR(rulethickness);
+ return get_realvar (rulethickness_scm_sym);
}
Real
Paper_def::staffline_f () const
{
- SCMVAR(rulethickness)
-}
+ return get_realvar (rulethickness_scm_sym);
+ }
Real
Paper_def::staffheight_f () const
{
- SCMVAR(staffheight)
-}
+ return get_realvar (staffheight_scm_sym);
+ }
Real
Paper_def::interbeam_f (int multiplicity_i) const
{
if (multiplicity_i <= 3)
- SCMVAR(interbeam)
- else
- SCMVAR(interbeam4)
-}
-
-Real
-Paper_def::internote_f () const
-{
- return interline_f () /2.0 ;
-}
+ return get_realvar (interbeam_scm_sym);
+ else
+ return get_realvar (interbeam4_scm_sym);
+ }
Real
Paper_def::note_width () const
{
-SCMVAR(notewidth)
-}
+ return get_realvar (notewidth_scm_sym);
+ }
void
Paper_def::print () const
if (scope_p_)
p->output_scope (scope_p_, "mudelapaper");
-#if 0
- if (output_global_ch == String("tex"))
- {
- *p->outstream_l_ << *scope_p_->elem ("texsetting")->access_content_String (false);
- }
-#endif
*p->outstream_l_ << *scope_p_->elem (String (output_global_ch) + "setting")->access_content_String (false);
void
Paper_outputter::output_header ()
{
-#if 0
- int gobble = 10000;
- {// alloc big chunk of memory.
- SCM beg = SCM_EOL;
- String bigstr = String_convert::char_str (' ', 50);
- for (int i = gobble; i--; )
- {
- beg = gh_cons (gh_str02scm (bigstr.ch_C()), beg);
- }
- }
-#endif
-
if (safe_global_b)
{
ly_set_scm ("security-paranoia", SCM_BOOL_T);
}
#endif
- SCM scm = gh_cons (ly_symbol ("header"), args_scm);
+ SCM scm = gh_cons (header_scm_sym, args_scm);
output_scheme (scm);
}
}
SCM box_scm
- = gh_list (ly_symbol ("placebox"),
+ = gh_list (placebox_scm_sym,
gh_double2scm (a_off.x ()),
gh_double2scm (a_off.y ()),
SCM(i->func_),
id_str += ".";
else
id_str += String (", ") + version_str ();
- output_String_def ( "LilyIdString", id_str);
+
+ output_String_def ( "mudelatagline", id_str);
+ output_String_def ( "LilyPondVersion", version_str ());
}
void
translator_spec_block:
TRANSLATOR '{' translator_spec_body '}'
- { $$ = $3; }
+ {
+ $$ = $3;
+ }
;
translator_spec_body:
script_dir:
'_' { $$ = DOWN; }
- | '^' { $$ = CENTER; }
- | '-' { $$ = UP; }
+ | '^' { $$ = UP; }
+ | '-' { $$ = CENTER; }
;
pre_requests:
audio_elem_p_list_ = 0;
}
-void
-Performance::add_column (Audio_column* p)
-{
- p->performance_l_ = this;
- add_element (p);
-}
Performance::~Performance()
{
midi_stream << Midi_header (1, tracks_i, clocks_per_4_i);
output_header_track (midi_stream);
- int n = 1;
+ int channel = 1;
for (int i =0; i < audio_staff_l_arr_.size (); i++)
{
Audio_staff *s = audio_staff_l_arr_[i];
+
/*
Aargh, let's hear it for the MIDI standard.
MIDI players tend to ignore instrument settings on
channel 10, the percussion channel by default.
*/
- if (n == 10)
- n++;
- s->output (midi_stream, n++);
+ if (channel == 10)
+ channel++;
+ s->output (midi_stream, channel++);
}
}
midi_stream << midi_track;
}
-void
-Performance::add_staff (Audio_staff* l)
-{
- audio_staff_l_arr_.push (l);
-}
-
void
Performance::add_element (Audio_element *p)
{
+ if (Audio_staff*s=dynamic_cast<Audio_staff *> (p))
+ {
+ audio_staff_l_arr_.push (s);
+ }
+ else if (Audio_column *c = dynamic_cast<Audio_column*>(p))
+ {
+ c->performance_l_ = this;
+ }
audio_elem_p_list_ = new Killing_cons<Audio_element> (p, audio_elem_p_list_);
}
+++ /dev/null
-/*
- score-halign-reg.cc -- implement Priority_horizontal_align_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "bar.hh"
-#include "break-align-item.hh"
-#include "priority-halign-engraver.hh"
-#include "score-priority-engraver.hh"
-
-Priority_horizontal_align_engraver::Priority_horizontal_align_engraver()
-{
- halign_p_ =0;
-}
-
-void
-Priority_horizontal_align_engraver::do_pre_move_processing()
-{
- if (halign_p_)
- {
- typeset_element (halign_p_);
- halign_p_ =0;
- }
-}
-
-void
-Priority_horizontal_align_engraver::acknowledge_element (Score_element_info i)
-{
- Engraver* reg = i.origin_grav_l_arr_[0];
- if (dynamic_cast<Score_priority_engraver *> (reg))
- {
- if (!halign_p_)
- {
- halign_p_ = new Break_align_item;
- halign_p_->breakable_b_ = true;
- announce_element (Score_element_info (halign_p_,0));
- }
- Item * it = dynamic_cast <Item *> (i.elem_l_);
- if (it->break_priority_i_ == 0)
- halign_p_->center_l_ = it;
-
- halign_p_->add_item (it, it->break_priority_i_);
- }
-}
-
-
-ADD_THIS_TRANSLATOR(Priority_horizontal_align_engraver);
#include "note-column.hh"
#include "paper-def.hh"
+
ADD_THIS_TRANSLATOR (Repeat_engraver);
Repeat_engraver::Repeat_engraver ()
{
}
+/*
+ urg. Way too complicated. needs redesign.
+ */
bool
Repeat_engraver::do_try_music (Music* m)
{
Moment alt_mom = now_mom () + repeat_length_mom;
if (repeat_length_mom)
{
- for (PCursor<Music*> i (alt->music_p_list_p_->top ()); i.ok () && (i != alt->music_p_list_p_->bottom ()); i++)
+ for (Cons<Music> *i (alt->music_p_list_p_->head_); i && i->next_; i = i->next_)
{
- stop_mom += i->length_mom ();
+ stop_mom += i->car_->length_mom ();
if (dynamic_cast<Simultaneous_music *> (alt))
break;
}
Scalar prop = get_property ("voltaSpannerDuration", 0);
if (prop.length_i ())
span_mom = prop.to_rat ();
- int alt_i = r->repeats_i_ + 1 - alt->music_p_list_p_->size () >? 1;
- for (PCursor<Music*> i (alt->music_p_list_p_->top ()); i.ok (); i++)
+
+ int alt_i = r->repeats_i_ + 1 - cons_list_size_i (alt->music_p_list_p_->head_ ) >? 1;
+ for (Cons<Music> *i = alt->music_p_list_p_->head_; i ; i = i->next_)
{
- alternative_music_arr_.push (i.ptr ());
+ alternative_music_arr_.push (i->car_);
alternative_start_mom_arr_.push (alt_mom);
if (span_mom)
alternative_stop_mom_arr_.push (alt_mom + span_mom);
else
- alternative_stop_mom_arr_.push (alt_mom + i->length_mom ());
+ alternative_stop_mom_arr_.push (alt_mom + i->car_->length_mom ());
String str;
- if ((alt_i != 1) && (alt_i != r->repeats_i_) && (i == alt->music_p_list_p_->top ()))
+ if ((alt_i != 1) && (alt_i != r->repeats_i_) && (i == alt->music_p_list_p_->head_))
str = "1.-";
str += to_str (alt_i) + ".";
alt_i++;
alternative_str_arr_.push (str);
if (!dynamic_cast<Simultaneous_music *> (alt))
- alt_mom += i->length_mom ();
+ alt_mom += i->car_->length_mom ();
}
return true;
}
{
if (first_b_)
{
- for (PCursor<Music*> i (elt_l ()->music_p_list_p_->top ()); i.ok(); i++)
+ for (Cons<Music> *i = elt_l ()->music_p_list_p_->head_; i; i = i->next_)
{
- if (Request * req_l = dynamic_cast<Request*> (i.ptr()))
+ if (Request * req_l = dynamic_cast<Request*> (i->car_))
{
bool gotcha = report_to_l()->try_music (req_l);
if (!gotcha)
req_l->warning (_f ("junking request: `%s\'", classname( req_l)));
}
else
- i.ptr ()->warning (_f ("Huh? Not a Request: `%s\'",
- classname (i.ptr())));
+ i->car_->warning (_f ("Huh? Not a Request: `%s\'",
+ classname (i->car_)));
}
first_b_ = false;
}
// UGH Should get dims from table!
int size_i = 6;
- Real internote_f = paper ()->internote_f ();
+
+ // staff ref'd?
+ Real internote_f = paper_l ()->get_realvar (interline_scm_sym)/2.0;
int sep_i = 3 + size_i / 2;
for (int i = 0; i < ncol_l_arr_.size(); i++)
{
Rest_collision::Rest_collision()
{
- transparent_b_ = true;
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
set_empty (true);
}
Molecule *
Rest::do_brew_molecule_p () const
{
- int staff_size_i_ = 8;
- bool streepjes_b = abs(position_i_) > staff_size_i_ /2 &&
+ bool streepjes_b = abs(position_i_) > lines_i () / 2 &&
(balltype_i_ == 0 || balltype_i_ == 1);
Molecule s(lookup_l ()->rest (balltype_i_, streepjes_b));
Molecule * m = new Molecule ( Molecule (s));
- m->translate_axis (position_i_ * paper ()->internote_f (), Y_AXIS);
+ m->translate_axis (position_i_ * staff_line_leading_f ()/2.0, Y_AXIS);
return m;
}
{
if (ncol_p_)
{
- if (! ncol_p_->h_shift_b_)
- // egcs
- ncol_p_->h_shift_b_ = get_property ("hshift", 0).operator bool ();
+ // egcs
+ if (get_property ("hshift", 0).operator bool ())
+ {
+ ncol_p_->set_elt_property (horizontal_shift_scm_sym, SCM_BOOL_T);
+ }
+
if (! ncol_p_->dir_)
ncol_p_->dir_ =(Direction) int(get_property ("ydirection", 0));
#include "misc.hh"
#include "paper-outputter.hh"
+Interval
+Score_element::dim_cache_callback (Dimension_cache*c)
+{
+ Score_element * e =dynamic_cast<Score_element*>( c->element_l());
+ if(&e->dim_cache_[X_AXIS] == c)
+ return e->do_width ();
+ else
+ return e->do_height ();
+}
+
Score_element::Score_element()
{
output_p_ =0;
- break_helper_only_b_ = false;
- transparent_b_ = false;
+ dim_cache_[X_AXIS].set_callback (dim_cache_callback);
+ dim_cache_[Y_AXIS].set_callback (dim_cache_callback);
+ used_b_ = false;
pscore_l_=0;
+ lookup_l_ =0;
status_i_ = 0;
+ original_l_ = 0;
element_property_alist_ = SCM_EOL;
}
Score_element::Score_element (Score_element const&s)
- : Graphical_element (s)
+ : Graphical_element (s)
{
- /* called from derived ctor, so most info points to the same deps
- as (Directed_graph_node&)s. Nobody points to us, so don't copy
- dependents.
- */
-
-
- // deep copy ?
- element_property_alist_ = s.element_property_alist_;
+ used_b_ = true;
+ original_l_ =(Score_element*) &s;
+ element_property_alist_ = scm_list_copy (s.element_property_alist_);
dependency_arr_ = s.dependency_arr_;
output_p_ =0;
- break_helper_only_b_ = s.break_helper_only_b_;
- transparent_b_ = s.transparent_b_;
status_i_ = s.status_i_;
+ lookup_l_ = s.lookup_l_;
pscore_l_ = s.pscore_l_;
}
SCM
-Score_element::get_elt_property (SCM s)
+Score_element::get_elt_property (SCM sym) const
{
- return scm_assq(s, element_property_alist_);
+ SCM s = scm_assq(sym, element_property_alist_);
+ // is this a good idea?
+ if (s == SCM_BOOL_F && pscore_l_)
+ s = pscore_l_->paper_l_->get_scm_var (sym);
+
+ return s;
+}
+
+SCM
+Score_element::remove_elt_property (SCM key)
+{
+ SCM s = get_elt_property (key);
+ element_property_alist_ = scm_assq_remove_x (element_property_alist_, key);
+ return s;
}
+
void
Score_element::set_elt_property (SCM s, SCM v)
{
Paper_def*
-Score_element::paper() const
+Score_element::paper_l () const
{
- return pscore_l_->paper_l_;
+ return pscore_l_->paper_l_;
}
Lookup const *
Score_element::lookup_l () const
{
- SCM sz = scm_assq (ly_symbol ("fontsize"), element_property_alist_);
- if (sz != SCM_BOOL_F)
- return pscore_l_->paper_l_->lookup_l (gh_scm2int (SCM_CDR (sz)));
- else
- return pscore_l_->paper_l_->lookup_l (0);
+ if (!lookup_l_)
+ {
+ Score_element * me = (Score_element*)this;
+ SCM sz = me->remove_elt_property (fontsize_scm_sym);
+ int i = (sz != SCM_BOOL_F)
+ ? gh_scm2int (SCM_CDR (sz))
+ : 0;
+
+
+ me->lookup_l_ = pscore_l_->paper_l_->lookup_l (i);
+ }
+ return lookup_l_;
}
void
assert (status_i_!= busy);
status_i_= busy;
- for (int i=0; i < dependency_size(); i++)
- dependency (i)->calculate_dependencies (final, busy, funcptr);
+ for (int i=0; i < dependency_arr_.size(); i++)
+ dependency_arr_[i]->calculate_dependencies (final, busy, funcptr);
Link_array<Score_element> extra (get_extra_dependencies());
for (int i=0; i < extra.size(); i++)
void
Score_element::output_processing ()
{
- if (transparent_b_)
+ if (get_elt_property (transparent_scm_sym) != SCM_BOOL_F)
return;
+
if (output_p_)
delete output_p_;
classname(this));
}
+
/*
VIRTUAL STUBS
Score_element::add_dependency (Score_element*e)
{
if (e)
- dependency_arr_.push (e);
+ {
+ dependency_arr_.push (e);
+ e->used_b_ = true;
+ }
else
warning("Null dependency added");
Spanner * broken = sp->find_broken_piece (line);
substitute_dependency (sp, broken);
- add_dependency (broken);
+ if (broken)
+ add_dependency (broken);
}
else if (Item *original = dynamic_cast <Item *> (elt))
{
void
Score_element::handle_prebroken_dependencies()
{
+ /* dynamic_cast<Item*> (this) &&
+ if (!break_status_dir ())
+ return;
+ */
Link_array<Score_element> old_arr, new_arr;
for (int i=0; i < dependency_size(); i++)
{
Score_element * elt = dependency (i);
Item *it_l = dynamic_cast <Item *> (elt);
- if (it_l && it_l->breakable_b_)
+ if (it_l && it_l->broken_original_b ())
if (Item *me = dynamic_cast<Item*> (this) )
{
- Score_element *new_l = it_l->find_prebroken_piece (me->break_status_dir_);
+ Score_element *new_l = it_l->find_prebroken_piece (me->break_status_dir ());
if (new_l != elt)
{
new_arr.push (new_l);
}
else
{
- new_arr.push (it_l->broken_to_drul_[LEFT]);
- old_arr.push (0);
- old_arr.push (0);
- new_arr.push (it_l->broken_to_drul_[RIGHT]);
+ Direction d = LEFT;
+ do {
+ old_arr.push (0);
+ new_arr.push (it_l->find_prebroken_piece (d));
+ } while (flip(&d)!= LEFT);
}
}
bool
Score_element::linked_b() const
{
- return get_extra_dependencies().size() ||
- dependency_size();
+ return used_b_;
}
+
void
Score_element::do_print () const
{
Score_engraver::do_creation_processing()
{
scoreline_l_ = pscore_p_->line_l_;
- scoreline_l_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
- command_column_l_->breakable_b_ = true;
+ scoreline_l_->set_bounds(LEFT,command_column_l_);
+ command_column_l_->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
Engraver_group_engraver::do_creation_processing();
}
Score_engraver::do_removal_processing()
{
Engraver_group_engraver::do_removal_processing();
- scoreline_l_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
- command_column_l_->breakable_b_ = true;
+ scoreline_l_->set_bounds(RIGHT,command_column_l_);
+ command_column_l_->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
typeset_all ();
set_columns (0,0);
pscore_p_->typeset_element (item_p);
if (!item_p->parent_l (X_AXIS))
{
- if (item_p->breakable_b_)
+ bool br = (item_p->remove_elt_property (breakable_scm_sym) != SCM_BOOL_F);
+ if (br)
command_column_l_->add_element(item_p);
else
musical_column_l_->add_element(item_p);
{
if (break_penalty_i_ > Break_req::DISALLOW)
{
- get_staff_info().command_pcol_l ()-> breakable_b_ = true;
+ command_column_l_->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
breaks_i_ ++;
if (! (breaks_i_%8))
*mlog << "[" << breaks_i_ << "]" << flush;
{
audio_column_l_->add_audio_item (i);
}
- else if (Audio_staff*s=dynamic_cast<Audio_staff *> (p))
- {
- performance_p_->add_staff (s);
- }
performance_p_->add_element (p);
}
{
Global_translator::prepare (m);
audio_column_l_ = new Audio_column (m);
- performance_p_->add_column (audio_column_l_);
+ play (audio_column_l_);
post_move_processing ();
}
Score_priority_engraver::Score_priority_engraver()
{
- align_p_tab_.hash_func_ = int_hash;
+ halign_p_ = 0;
}
void
Score_priority_engraver::do_pre_move_processing()
{
- for (Hash_table_iter<int, Horizontal_group_item*> i(align_p_tab_);
- i.ok() ; i++)
+ for (int i=0; i < column_p_arr_.size ();i++)
+ typeset_element (column_p_arr_[i]);
+ column_p_arr_.clear ();
+
+ if (halign_p_)
{
- if (i.val ())
- {
- typeset_element (i.val ());
- i.val_ref () = 0;
- }
+ typeset_element (halign_p_);
+ halign_p_ =0;
}
- align_p_tab_.clear ();
+
+}
+
+void
+Score_priority_engraver::add_horizontal_group (Item* it, int priority)
+{
+ if (!halign_p_)
+ {
+ halign_p_ = new Break_align_item;
+ halign_p_->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
+ announce_element (Score_element_info (halign_p_,0));
+ }
+
+ if (priority == 0)
+ halign_p_->center_l_ = it;
+
+ halign_p_->add_item (it, priority);
+
+ column_p_arr_.push (it);
}
void
Score_priority_engraver::acknowledge_element (Score_element_info inf)
{
- Item * item_l = dynamic_cast <Item *> (inf.elem_l_);
- if (item_l && item_l->breakable_b_ && !item_l->empty_b ())
+ if (Item * item_l = dynamic_cast <Item *> (inf.elem_l_))
{
+ Dimension_cache * c = &item_l->dim_cache_[X_AXIS];
+ if (c->empty_b () || c->parent_l_)
+ return;
+
+ SCM pr = item_l->remove_elt_property (break_priority_scm_sym);
+
+ if (pr == SCM_BOOL_F)
+ return;
+
+ bool breakable = (item_l->remove_elt_property (breakable_scm_sym) != SCM_BOOL_F);
+ if (!breakable)
+ return ;
+
+ int priority = SCM_CDR (pr);
/*
Don't try to eat up our (probable) parent.
*/
return;
- int priority =item_l->break_priority_i_;
- Horizontal_group_item * hg =0;
- if (!align_p_tab_.elem_b(priority))
+ Score_element * column_l = 0;
+ if (halign_p_)
+ column_l = halign_p_->get_elt_by_priority (priority);
+ Horizontal_group_item * hg;
+ if (column_l)
{
- hg = new Horizontal_group_item;
- announce_element (Score_element_info (hg,0));
- align_p_tab_[priority] = hg;
- hg->break_priority_i_ = priority;
- hg->breakable_b_ = true;
+ hg = dynamic_cast<Horizontal_group_item*> (column_l);
}
else
- hg = align_p_tab_[priority];
-
- Score_element * unbound_elem = inf.elem_l_;
-
- /*
- ugh
- */
- while (unbound_elem->parent_l (X_AXIS))
{
- /* We might have added inf.elem_l_ earlier because we added one
- of its children. We don't want to add ourselves to ourself
- */
- Graphical_element * e = unbound_elem->parent_l (X_AXIS);
- if (e == hg)
- return;
- unbound_elem = dynamic_cast<Score_element*> (e);
+ hg = new Horizontal_group_item;
+ announce_element (Score_element_info (hg,0));
+ add_horizontal_group (hg, priority);
+ hg->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
}
+
- hg->add_element (unbound_elem);
+ hg->add_element (item_l);
}
}
-
ADD_THIS_TRANSLATOR(Score_priority_engraver);
#include "script.hh"
#include "musical-request.hh"
#include "stem.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
#include "general-script-def.hh"
#include "text-def.hh"
void
Script_engraver::do_pre_move_processing()
{
- Staff_symbol* s_l = get_staff_info().staff_sym_l_;
for (int i=0; i < script_p_arr_.size(); i++)
{
Script*script_p = script_p_arr_[i];
+
+ /*
+ UGH. inside_b () for scripts broken for now.
+
if (!script_p->specs_p_->inside_b())
script_p->add_support (s_l);
-
+ */
+
if (Text_def*td_l = dynamic_cast<Text_def *> (script_p->specs_p_)) // UGH
{
if (!td_l->style_str_.length_i ())
if (style.to_bool ())
td_l->style_str_= style;
}
+
// urg, what if this is already set? in-band signaling...
Scalar alignment = get_property ("textalignment", 0);
if (alignment.isnum_b())
axis_ = Y_AXIS;
specs_p_ = 0;
stem_l_ = 0;
- postbreak_only_b_ = true;
dir_ = CENTER;
}
Interval
Script::do_width () const
{
- return specs_p_->get_molecule (paper (), dir_).extent ().x ();
+ return specs_p_->get_molecule (paper_l (), dir_).extent ().x ();
}
void
Script::do_pre_processing ()
{
Staff_side::do_pre_processing ();
- if (breakable_b_ && postbreak_only_b_ && (break_status_dir () != RIGHT))
- {
- transparent_b_ = true;
- set_empty (true);
- }
-
if (axis_ == Y_AXIS && !dir_)
set_default_dir ();
}
Interval
Script::symbol_height () const
{
- return specs_p_->get_molecule (paper (), dir_).extent ().y ();
+ return specs_p_->get_molecule (paper_l (), dir_).extent ().y ();
}
{
Real dx =0.;
- Molecule*mol_p = new Molecule (specs_p_->get_molecule (paper (), dir_));
+ Molecule*mol_p = new Molecule (specs_p_->get_molecule (paper_l (), dir_));
/*
ugh, staccato dots are not centred between stafflines (how?)?
*/
Real correct =0.0;
if (axis_ == Y_AXIS){
- dx = paper ()->note_width ()/2;
- correct = - (Real)dir_ * 2.0 * paper ()->rule_thickness ();
+ dx = paper_l ()->note_width ()/2;
+ correct = - (Real)dir_ * 2.0 * paper_l ()->rule_thickness ();
mol_p->translate_axis (dx, X_AXIS); // FIXME! ugh
}
{
specs_p_ = s.specs_p_ ? s.specs_p_->clone (): 0;
stem_l_ =s.stem_l_;
- postbreak_only_b_ = s.postbreak_only_b_;
}
if (lb)
{
Rod rod(lb, r);
- rod.distance_f_ += paper ()->interline_f () *1.5;
+ rod.distance_f_ += padding_f_;
a.push (rod);
}
{
a.push (Rod (l, rb));
}
+
if (lb && rb)
{
Rod rod(lb, rb);
- rod.distance_f_ += paper ()->interline_f () *1.5;
+ rod.distance_f_ += padding_f_;
a.push (rod);
}
}
Separating_group_spanner::Separating_group_spanner()
{
- break_helper_only_b_ = true;
+ set_elt_property (break_helper_only_scm_sym, SCM_BOOL_T);
+ padding_f_ =0.0;
}
#include "separating-group-spanner.hh"
#include "single-malt-grouping-item.hh"
#include "p-col.hh"
+#include "paper-def.hh"
Separating_line_group_engraver::Separating_line_group_engraver ()
{
void
Separating_line_group_engraver::do_removal_processing ()
{
+ Scalar sz (get_property ("postBreakPadding", 0));
+ if (!sz.empty_b () && sz.isnum_b ())
+ {
+ sep_span_p_->padding_f_ = Real(sz);
+ }
+ else
+ {
+ sep_span_p_->padding_f_ = 1.5 * paper_l ()->get_realvar (interline_scm_sym);
+ }
+
sep_span_p_->set_bounds (RIGHT, get_staff_info ().command_pcol_l ());
typeset_element (sep_span_p_);
sep_span_p_ =0;
Item * it = dynamic_cast <Item *> (i.elem_l_);
if (it && !it->parent_l (X_AXIS))
{
- Single_malt_grouping_item *&p_ref_ (it->breakable_b_
- ? break_malt_p_ : nobreak_malt_p_);
+ bool ib =it->breakable_b ();
+ Single_malt_grouping_item *&p_ref_ (ib ? break_malt_p_
+ : nobreak_malt_p_);
if (!p_ref_)
{
p_ref_ = new Single_malt_grouping_item;
- p_ref_->breakable_b_ = it->breakable_b_;
+ if (ib)
+ p_ref_->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
announce_element (Score_element_info (p_ref_, 0));
}
p_ref_->add_item (it);
Sequential_music_iterator::Sequential_music_iterator ()
{
- cursor_p_ = 0;
+ cursor_ = 0;
here_mom_ = 0;
iter_p_ =0;
}
void
Sequential_music_iterator::construct_children()
{
- cursor_p_ = new PCursor<Music*> (dynamic_cast<Sequential_music const*> (music_l_)->music_p_list_p_->top ());
+ cursor_ = dynamic_cast<Sequential_music const*> (music_l_)->music_p_list_p_->head_;
- while (cursor_p_->ok())
+ while (cursor_)
{
start_next_element();
if (!iter_p_->ok())
{
delete iter_p_;
iter_p_ =0;
- Moment elt_time = cursor_p_->ptr()->length_mom ();
+ Moment elt_time = cursor_->car_->length_mom ();
here_mom_ += elt_time;
- cursor_p_->next();
+ cursor_ =cursor_->next_;
}
void
Sequential_music_iterator::start_next_element()
{
assert (!iter_p_);
- iter_p_ = get_iterator_p ( cursor_p_->ptr());
+ iter_p_ = get_iterator_p (cursor_->car_);
}
void
Sequential_music_iterator::~Sequential_music_iterator()
{
- delete cursor_p_;
assert (! iter_p_);
}
{
leave_element();
- if (cursor_p_->ok())
+ if (cursor_)
{
start_next_element();
set_Sequential_music_translator();
{
int j = 0;
Simultaneous_music const *sim = dynamic_cast<Simultaneous_music const*> (music_l_);
- for (PCursor<Music*> i (sim->music_p_list_p_->top());
- i.ok(); j++, i++)
+
+ for (Cons<Music> *i = sim->music_p_list_p_->head_; i; i = i->next_, j++)
{
- Music_iterator * mi = get_iterator_p (i.ptr());
+ Music_iterator * mi = get_iterator_p (i->car_);
if (mi->ok())
{
if (sim->translator_type_str_.empty_b ())
Single_malt_grouping_item ::Single_malt_grouping_item()
{
- break_helper_only_b_ = true;
- transparent_b_ = true;
+ set_elt_property (break_helper_only_scm_sym, SCM_BOOL_T);
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
+
+ // this is weird! , but needed!
set_empty (true);
}
if (!n->head_l_arr_.size ())
warning (_ ("Putting slur over rest."));
encompass_arr_.push (n);
- n->stem_l_->slur_l_ = this;
+ // n->stem_l_->slur_l_ = this;
add_dependency (n);
}
static bool
normal_edge_b (Slur*s, Drul_array<Note_column*>& extrema, Direction dir)
{
+ Note_column *n = extrema[dir];
return !broken_edge_b (s, extrema, dir)
- && extrema[dir]->stem_l_
- && !extrema[dir]->stem_l_->transparent_b_
- && extrema[dir]->head_l_arr_.size ();
+ && n->stem_l_
+ && n->stem_l_->get_elt_property (transparent_scm_sym) == SCM_BOOL_F
+ && n->head_l_arr_.size ();
}
void
if (!dir_)
set_default_dir ();
- Real interline_f = paper ()->interline_f ();
+ Real interline_f = paper_l ()->get_realvar (interline_scm_sym);
Real internote_f = interline_f / 2;
// URG
- Real notewidth_f = paper ()->note_width () * 0.8;
+ Real notewidth_f = paper_l ()->note_width () * 0.8;
/*
[OSU]: slur and tie placement
--> height <= 5 length ?? we use <= 3 length, now...
*/
- Real gap_f = paper ()->get_var ("slur_x_gap");
+ Real gap_f = paper_l ()->get_var ("slur_x_gap");
Drul_array<Note_column*> extrema;
extrema[LEFT] = encompass_arr_[0];
*/
if (sign (dy) != sign (note_dy))
{
- Real damp_f = paper ()->get_var ("slur_slope_follow_music_factor");
+ 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)
/*
Avoid too steep slurs.
*/
- Real damp_f = paper ()->get_var ("slur_slope_damping");
+ 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 ();
Array<Offset>
Slur::get_encompass_offset_arr () const
{
- Real notewidth = paper ()->note_width () * 0.8;
- Real gap = paper ()->get_var ("slur_x_gap");
- Real internote = paper ()->internote_f ();
+ Real notewidth = paper_l ()->note_width () * 0.8;
+ Real gap = paper_l ()->get_var ("slur_x_gap");
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>
for (int i = first; i < last; i++)
{
- Encompass_info info (encompass_arr_[i], dir_);
+ Encompass_info info (encompass_arr_[i], dir_, this);
notes.push (info.o_ - left);
}
- Encompass_info info (encompass_arr_.top (), dir_);
+ Encompass_info info (encompass_arr_.top (), dir_, this);
// [encompass_arr_.size () - 1]
// urg:
// prebreak
if (interstaff_f_ && (encompass_arr_.top () != spanned_drul_[RIGHT]))
{
- Encompass_info info (encompass_arr_[encompass_arr_.size () - 1], dir_);
+ Encompass_info info (encompass_arr_[encompass_arr_.size () - 1], dir_, this);
d[Y_AXIS] -= info.o_[Y_AXIS] - interstaff_f_;
}
Array<Rod> a;
Rod r;
r.item_l_drul_ = spanned_drul_;
- r.distance_f_ = paper ()->get_var ("slur_x_minimum");
+ r.distance_f_ = paper_l ()->get_var ("slur_x_minimum");
a.push (r);
return a;
{
if (spanning_l_arr_.size () < 1)
{
- transparent_b_ = true;
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
set_empty (true);
}
if (type_str_.empty_b ())
{
- transparent_b_=true;
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
set_empty (true);
}
else if (type_str_ == "|:")
if (Span_bar * b = dynamic_cast<Span_bar *> (i.elem_l_))
{
if (b->type_str_ == "{")
- b->extra_x_off_ -= paper ()->interline_f (); // ugh
+ b->extra_x_off_ -= paper_l ()->get_realvar (interline_scm_sym); // ugh
}
}
void
Spanner::set_bounds(Direction d, Item*i)
{
- if (spanned_drul_[d])
- spanned_drul_[d]->attached_span_l_arr_.substitute(this,0);
-
spanned_drul_[d] =i;
if (i)
- i->attached_span_l_arr_.push(this);
-
+ {
+ i->used_b_ = true;
+ }
+
if (spanned_drul_[Direction(-d)] == spanned_drul_[d]
&& i)
warning (_f ("Spanner `%s\' with equal left and right spanpoints", classname (this)));
Spanner::Spanner ()
{
- unbroken_original_l_ =0;
spanned_drul_[LEFT]=0;
spanned_drul_[RIGHT]=0;
}
:Score_element (s)
{
spanned_drul_[LEFT] = spanned_drul_[RIGHT] =0;
- unbroken_original_l_ = 0;
}
void
Spanner::output_processing ()
{
- if (transparent_b_)
- return ;
+ if (get_elt_property (transparent_scm_sym) != SCM_BOOL_F)
+ return;
+
output_p_ = do_brew_molecule_p ();
Offset left_off (spanned_drul_[LEFT]->absolute_coordinate(X_AXIS), 0);
Offset o = absolute_offset() + left_off;
if (!info.broken_spanner_l_)
{
Spanner *span_p = dynamic_cast<Spanner*>(clone ());
- span_p -> unbroken_original_l_ =(Spanner*)this;
span_p->set_bounds(LEFT,info.bounds_[LEFT]);
span_p->set_bounds(RIGHT,info.bounds_[RIGHT]);
pscore_l_->typeset_element (span_p);
for (int i=0; i < cols_.size(); i++)
{
+ Score_column * sc = scol_l(i);
Moment now = scol_l (i)->when();
Moment shortest_playing;
shortest_playing.set_infinite (1);
- if (scol_l (i)->breakable_b_)
+ if (!sc->musical_b ())
{
for (int ji=i; ji >= start_context_i; ji--)
context_shortest_arr[ji] = context_shortest;
start_context_i = i;
context_shortest.set_infinite (1);
}
- if (scol_l (i)->durations.size())
+ if (sc->durations.size())
{
- context_shortest = context_shortest <? scol_l(i)->durations[0];
+ context_shortest = context_shortest <? sc->durations[0];
}
// ji was j, but triggered ICE
Array<Moment> context_shortest_arr;
get_ruling_durations(shortest_playing_arr, context_shortest_arr);
- Real interline_f = paper_l ()->interline_f ();
-
+ Real interline_f = paper_l ()->get_realvar (interline_scm_sym);
Array<Real> ideal_arr;
Array<Real> hooke_arr;
/*
first musical column of bar
*/
- if (i && scol_l (i - 1)->breakable_b_)
+ if (i && !scol_l (i - 1)->musical_b ())
{
// one interline minimum at start of bar
/*
last musical column of bar
*/
- if (i + 1 < cols_.size () && scol_l(i+1)->breakable_b_)
+ if (i + 1 < cols_.size () && !scol_l(i+1)->musical_b ())
{
// two interline minimum ok for last column?
dist = dist >? 2 * interline_f;
--- /dev/null
+/*
+ staff-bar.cc -- implement Staff_bar
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "staff-bar.hh"
+
+Real
+Staff_bar::get_bar_size () const
+{
+ return 4 * staff_line_leading_f ();
+}
*/
#include "proto.hh"
-#include "plist.hh"
+
#include "staff-info.hh"
#include "score-column.hh"
-Score*
-Staff_info::score_l()
-{
- return score_l_;
-}
-
Staff_info::Staff_info()
{
- score_l_ =0;
time_C_ = 0;
rhythmic_C_ =0;
- staff_sym_l_=0;
}
-Score_column*
-Staff_info::musical_l()
-{
- return musical_l_;
-}
-
-Score_column*
-Staff_info::command_l()
-{
- return command_l_;
-}
Paper_column*
Staff_info::command_pcol_l()
{
- return command_l();
+ return command_l_;
}
Paper_column*
Staff_info::musical_pcol_l()
{
- return musical_l();
+ return musical_l_;
}
#include "interval.hh"
#include "paper-def.hh"
#include "staff-side.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
#include "debug.hh"
#include "dimensions.hh"
Real y = 0;
- Real inter_f = paper()-> internote_f ();
+ Real inter_f = staff_line_leading_f () /2;
Interval v = support_extent();
y = v[dir_] + 1 * dir_ * inter_f;
int coordinate_offset_f_i = (int)rint (y / inter_f);
- // ugh: 5 -> staff_lines
- if (axis_ == Y_AXIS && abs (coordinate_offset_f_i) < 5)
+ if (axis_ == Y_AXIS && abs (coordinate_offset_f_i) < lines_i ())
{
if (!(abs (coordinate_offset_f_i) % 2))
y += (Real)dir_ * inter_f;
void
Staff_side::do_substitute_element_pointer (Score_element*o, Score_element*n)
{
+ Staff_symbol_referencer::do_substitute_element_pointer (o,n);
support_l_arr_.unordered_substitute (o,n);
}
-
+void
+Staff_side::do_add_processing ()
+{
+ if (axis_ == Y_AXIS && staff_symbol_l ())
+ add_support (staff_symbol_l ());
+}
*/
#include "staff-sym-engraver.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
#include "score.hh"
#include "p-col.hh"
-
-
-void
-Staff_symbol_engraver::fill_staff_info (Staff_info&i)
-{
- i.staff_sym_l_ = span_p_;
-}
+#include "staff-symbol-referencer.hh"
+#include "paper-def.hh"
Staff_symbol_engraver::~Staff_symbol_engraver()
{
span_p_->no_lines_i_ = l;
}
+ Scalar sz (get_property ("staffLineLeading", 0));
+ if (!sz.empty_b () && sz.isnum_b ())
+ {
+ span_p_->staff_line_leading_f_ = Real(sz);
+ }
+ else
+ {
+ span_p_->staff_line_leading_f_ = paper_l ()->get_realvar (interline_scm_sym);
+ }
span_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
typeset_element (span_p_);
span_p_ =0;
}
-
+void
+Staff_symbol_engraver::acknowledge_element (Score_element_info s)
+{
+ if (Staff_symbol_referencer * st = dynamic_cast<Staff_symbol_referencer*> (s.elem_l_))
+ {
+ st->set_staff_symbol (span_p_);
+ }
+}
ADD_THIS_TRANSLATOR(Staff_symbol_engraver);
(c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
#include "lookup.hh"
#include "dimensions.hh"
#include "paper-def.hh"
Staff_symbol::Staff_symbol ()
{
no_lines_i_ = 5;
- interline_f_ = 0 PT;
+ staff_line_leading_f_ = 5.0 PT;
}
-
-
-
void
Staff_symbol::do_print() const
{
Interval
Staff_symbol::do_height() const
{
- int n = no_lines_i_ -1;
-// return 2* inter_note_f () * Interval (-n, n);
- return inter_note_f () * Interval (-n, n);
+ Interval i =Interval (0, staff_line_leading_f_ * (no_lines_i_-1));
+ i += - i.center ();
+ return i;
}
Molecule*
Staff_symbol::do_brew_molecule_p() const
{
Real w = extent (X_AXIS).length ();
- Paper_def * p = paper();
+ Paper_def * p = paper_l ();
Molecule rule = lookup_l ()->rule_symbol (p->get_var ("rulethickness"),
w);
- Real height = (no_lines_i_-1) * inter_note_f();
+ Real height = (no_lines_i_-1) * staff_line_leading_f_ /2;
Molecule * m = new Molecule;
for (int i=0; i < no_lines_i_; i++)
{
Molecule a (rule);
- a.translate_axis (height - i * inter_note_f()*2, Y_AXIS);
+ a.translate_axis (height - i * staff_line_leading_f_, Y_AXIS);
m->add_molecule (a);
}
return m;
}
-Real
-Staff_symbol::inter_note_f() const
-{
- if (interline_f_)
- return interline_f_/2;
-
- return paper()->internote_f ();
-}
int
Staff_symbol::steps_i() const
--- /dev/null
+/*
+ staff-symbol-referencer.cc -- implement Staff_symbol_referencer
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ */
+
+#include "staff-symbol-referencer.hh"
+#include "staff-symbol.hh"
+#include "paper-def.hh"
+
+Staff_symbol_referencer::Staff_symbol_referencer ()
+{
+ staff_sym_l_ =0;
+}
+
+void
+Staff_symbol_referencer::do_substitute_element_pointer (Score_element *o, Score_element*n)
+{
+ if (staff_sym_l_ == o)
+ {
+ staff_sym_l_ = dynamic_cast<Staff_symbol*> (n);
+ }
+}
+
+int
+Staff_symbol_referencer::lines_i () const
+{
+ return (staff_sym_l_) ? staff_sym_l_->no_lines_i_ : 5;
+}
+
+void
+Staff_symbol_referencer::set_staff_symbol (Staff_symbol*s)
+{
+ staff_sym_l_ =s;
+ add_dependency (s);
+}
+
+Staff_symbol*
+Staff_symbol_referencer::staff_symbol_l () const
+{
+ return staff_sym_l_;
+}
+
+Real
+Staff_symbol_referencer::staff_line_leading_f () const
+{
+ return (staff_sym_l_) ? staff_sym_l_->staff_line_leading_f_ : paper_l ()->get_realvar (interline_scm_sym);
+}
int durlog_i = r->duration_.durlog_i_;
stem_p_->flag_i_ = durlog_i;
- stem_p_->staff_sym_l_ = get_staff_info ().staff_sym_l_;
-
if (abbrev_req_l_)
{
/*
suggests typing of:
- c8:16 c: c: c:
+ c8:16 c: c: c:
hmm, which isn't so bad?
*/
int t = abbrev_req_l_->type_i_;
((Translator_group*)which)->set_property ("stemRightBeamCount", "");
}
-
typeset_element(stem_p_);
stem_p_ = 0;
}
#include "lookup.hh"
#include "stem-info.hh"
#include "beam.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
Stem_info::Stem_info ()
{
mult_i_ = stem_l_->mult_i_;
interstaff_f_ = 0;
- Paper_def* paper_l = stem_l_->paper ();
- Real internote_f = paper_l->internote_f ();
+ Paper_def* paper_l = stem_l_->paper_l ();
+ Real internote_f = stem_l_->staff_line_leading_f ()/2;
Real interbeam_f = paper_l->interbeam_f (mult_i_);
Real beam_f = paper_l->beam_thickness_f ();
// interstaff beam
Beam* beam_l_ = stem_l_->beam_l_;
if (beam_l_->sinfo_.size ()
- && stem_l_->staff_sym_l_ != beam_l_->sinfo_[0].stem_l_->staff_sym_l_)
+ && stem_l_->staff_symbol_l () != beam_l_->sinfo_[0].stem_l_->staff_symbol_l ())
{
-#if 0 // this is nonsense..., don't issue warning
- if (stem_l_->staff_sym_l_->dim_cache_[Y_AXIS].valid_b ())
- {
- interstaff_f_ = stem_l_->staff_sym_l_->absolute_coordinate (Y_AXIS)
- - beam_l_->sinfo_[0].stem_l_->staff_sym_l_->absolute_coordinate (Y_AXIS) / internote_f;
- }
- else
-#endif
{
// warning (_ ("invalid dimension cache: guessing staff position"));
if (beam_l_->vertical_align_drul_[MIN] !=
beam_dir_ = CENTER;
dir_forced_b_ = false;
stem_xdir_ = LEFT;
- staff_size_i_ = 8;
beam_gap_i_ = 0;
beam_l_ = 0;
Real
Stem::chord_start_f () const
{
- return head_positions()[dir_] * paper ()->internote_f ();
+ return head_positions()[dir_] * staff_line_leading_f ()/2.0;
}
Real
void
Stem::set_default_stemlen ()
{
- Real internote_f = paper ()->internote_f ();
- Real length_f = paper ()->get_var ("stem_length0") / internote_f;
- Real shorten_f = paper ()->get_var ("forced_stem_shorten0") / internote_f;
+ Real internote_f = staff_line_leading_f ()/2.0;
+ Real length_f = paper_l ()->get_var ("stem_length0") / internote_f;
+ Real shorten_f = paper_l ()->get_var ("forced_stem_shorten0") / internote_f;
if (!dir_)
set_default_dir ();
set_default_extents ();
set_noteheads ();
flag_i_ = flag_i_;
- transparent_b_ = invisible_b ();
+ if (invisible_b ())
+ {
+ set_elt_property (transparent_scm_sym, SCM_BOOL_T);
+ }
set_empty (invisible_b ());
}
{
Molecule *mol_p =new Molecule;
Drul_array<Real> stem_y = yextent_drul_;
- Real dy = paper ()->internote_f ();
+ Real dy = staff_line_leading_f ()/2.0;
Real head_wid = 0;
if (head_l_arr_.size ())
if (head_l_arr_.size())
{
Interval head_wid(0, head_l_arr_[0]->extent (X_AXIS).length ());
- Real rule_thick(paper ()->rule_thickness ());
+ Real rule_thick(paper_l ()->rule_thickness ());
Interval stem_wid(-rule_thick/2, rule_thick/2);
if (stem_xdir_ == CENTER)
r = head_wid.center ();
}
}
}
+ Staff_symbol_referencer::do_substitute_element_pointer (o,n);
+
}
+++ /dev/null
-#/*
- template7.cc -- instantiate Request_column
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "proto.hh"
-#include "cursor.tcc"
-#include "pcursor.tcc"
-#include "plist.hh"
-#include "plist.tcc"
-
-#include "music-list.hh"
-
-POINTERLIST_INSTANTIATE(Music);
-
#include "text-def.hh"
#include "note-head.hh"
#include "stem.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
class Text_engraver : public Engraver
{
G_text_item *text = new G_text_item;
G_staff_side_item *ss = new G_staff_side_item;
+
ss->set_victim (text);
ss->dir_ = r->dir_;
Scalar p (get_property ("textstyle", 0)); // textStyle?
ss->padding_f_ = Real(padding);
}
+ Scalar empty = get_property ("textEmptyDimension", 0);
+ if (empty.to_bool ())
+ {
+ text->dim_cache_[X_AXIS].set_empty (true);
+ }
+
announce_element (Score_element_info (text, r));
announce_element (Score_element_info (ss, r));
void
Text_engraver::do_pre_move_processing ()
{
- Staff_symbol* s_l = get_staff_info().staff_sym_l_;
for (int i=0; i < texts_.size (); i++)
{
- if (s_l != 0)
- {
- positionings_[i]->add_support (s_l);
- }
-
typeset_element (texts_[i]);
typeset_element (positionings_[i]);
}
support_span_l_ = 0;
}
-
-
-
void
Text_spanner::do_print() const
{
Text_spanner::do_post_processing()
{
text_off_ = support_span_l_->center() +
- Offset (0,support_span_l_->dir_ * paper()->internote_f () * 4); // todo
+ Offset (0,support_span_l_->dir_ * paper_l ()->get_realvar(interline_scm_sym)*2.0); // todo
}
Molecule*
Text_spanner::do_brew_molecule_p() const
{
- Molecule tsym (spec_p_->get_molecule (paper(),CENTER));
+ Molecule tsym (spec_p_->get_molecule (paper_l (),CENTER));
tsym.translate (text_off_);
Molecule*output = new Molecule;
assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]);
// URG
- Real notewidth = paper ()->note_width () * 0.8;
- Real interline_f = paper ()->interline_f ();
+ Real notewidth = paper_l ()->note_width () * 0.8;
+ Real interline_f = paper_l ()->get_realvar (interline_scm_sym);
/*
[OSU]: slur and tie placement
--> height <= 5 length ?? we use <= 3 length, now...
*/
- Real gap_f = paper ()->get_var ("slur_x_gap");
+ Real gap_f = paper_l ()->get_var ("slur_x_gap");
Direction d = LEFT;
do
Avoid too steep ties
* slur from notehead to stemend: c''()b''
*/
- Real damp_f = paper ()->get_var ("tie_slope_damping");
+ 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 ();
head_l_drul_[RIGHT] = new_l;
}
-#if 0
-Interval
-Tie::do_width () const
-{
- Real min_f =
- Interval width_int = Bow::do_width ();
- return width_int.length () < min_f ? Interval (0, min_f) : width_int;
-}
-#endif
Array<Rod>
Tie::get_rods () const
Array<Rod> a;
Rod r;
r.item_l_drul_ = spanned_drul_;
- r.distance_f_ = paper ()->get_var ("tie_x_minimum");
+ r.distance_f_ = paper_l ()->get_var ("tie_x_minimum");
a.push (r);
return a;
}
time_signature_p_ = new Time_signature ();
time_signature_p_->args_ = args;
- time_signature_p_->break_priority_i_ = 1; // ugh
+ time_signature_p_->set_elt_property (break_priority_scm_sym, gh_int2scm (1)); // 1
}
Time_signature::Time_signature ()
{
- breakable_b_ = true;
+ set_elt_property (breakable_scm_sym, SCM_BOOL_T);
}
Molecule*
}
}
+
+ Translator_group * tr=0;
+
+ Scalar barn = get_property ("currentBarNumber", &tr);
+ if (!barn.empty_b () && barn.isnum_b ())
+ {
+ time_.bars_i_ = int(barn);
+ tr->set_property ("currentBarNumber", "");
+ }
+
+
}
Timing_translator::do_post_move_processing()
{
time_.add (now_mom () - time_.when_);
+
+
}
void
if (column_arr_.size ()){
Real ncw = column_arr_.top ()->extent (X_AXIS).length ();
- Molecule num (tdef_p_->get_molecule (paper (), CENTER));
+ Molecule num (tdef_p_->get_molecule (paper_l (), CENTER));
if (beam_l_ && !bracket_visibility_b_)
{
if (!visible_b_)
return mol_p;
- Real internote_f = paper ()->internote_f ();
+ Real internote_f = paper_l ()->get_realvar (interline_scm_sym)/2.0;
+
Real dx = internote_f;
Real w = extent (X_AXIS).length () - dx;
Molecule volta (lookup_l ()->volta (w, last_b_));
Real h = volta.dim_.y ().length ();
- Molecule num (number_p_->get_molecule (paper (), LEFT));
+ Molecule num (number_p_->get_molecule (paper_l (), LEFT));
Real dy = column_arr_.top ()->extent (Y_AXIS) [UP] >
column_arr_[0]->extent (Y_AXIS) [UP];
dy += 2 * h;
Text_def two_text;
two_text.text_str_ = "2";
two_text.style_str_ = number_p_->style_str_;
- Molecule two (two_text.get_molecule (paper (), LEFT));
+ Molecule two (two_text.get_molecule (paper_l (), LEFT));
Real gap = two.dim_.x ().length () / 2;
Offset off (num.dim_.x ().length () + gap,
h / internote_f - gap);
}
-\translator {
+StaffGroupContext= \translator {
\type "Hara_kiri_line_group_engraver";
% \type "Line_group_engraver_group";
\consists "Span_bar_engraver";
\accepts "Lyrics";
\accepts "ChordNames";
-}
+};
+\translator { \StaffGroupContext }
\translator{
\type "Line_group_engraver_group";
\consists "Span_score_bar_engraver";
\consists "Score_priority_engraver";
- \consists "Priority_horizontal_align_engraver";
+% \consists "Priority_horizontal_align_engraver";
\consists "Vertical_align_engraver";
\consists "Mark_engraver";
\consists "Span_score_bar_engraver";
\consists "Score_priority_engraver";
- \consists "Priority_horizontal_align_engraver";
+
\consists "Vertical_align_engraver";
\accepts "ChoirStaff";
\translator {
\type "Staff_performer";
\accepts Voice;
+ \accepts VoiceOne; % ugh.
+ \accepts VoiceTwo;
+ \accepts VoiceThree;
+ \accepts VoiceFour;
+
\name Staff;
\consists "Key_performer";
\consists "Time_signature_performer";
\translator
{
\type "Performer_group_performer";
- \name Thread ;
\consists "Note_performer";
+ \name VoiceFour;
+}
+
+\translator
+{
+ \type "Performer_group_performer";
+ \consists "Note_performer";
+\name VoiceThree;
+}
+\translator
+{
+ \type "Performer_group_performer";
+ \consists "Note_performer";
+ \name VoiceOne;
}
\translator
{
\type "Performer_group_performer";
- \accepts Thread;
+ \consists "Note_performer";
\name Voice;
}
+\translator
+{
+ \type "Performer_group_performer";
+ \name VoiceTwo;\consists "Note_performer";
+
+}
+
\translator
{
\type "Performer_group_performer";
\accepts Staff;
+ \name GrandStaff;
+}
-\name GrandStaff;}
+\translator {\type "Performer_group_performer";
+ \accepts Staff; \name "PianoStaff";}
\translator {
\type "Performer_group_performer";
instrument = piano;
\accepts Staff;
\accepts GrandStaff;
+ \accepts PianoStaff;
\accepts Lyrics;
\accepts StaffGroup;
\accepts ChoirStaff;
Begin3
Titel: LilyPond
-Versie: 1.1.34
-Inschrijf datum: 10MAR99
+Versie: 1.1.35
+Inschrijf datum: 15MAR99
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.34.tar.gz
+ 770k lilypond-1.1.35.tar.gz
Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 770k lilypond-1.1.34.tar.gz
+ 770k lilypond-1.1.35.tar.gz
Copi-eer voorwaarden: GPL
End
Begin3
Title: LilyPond
-Version: 1.1.34
-Entered-date: 10MAR99
+Version: 1.1.35
+Entered-date: 15MAR99
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.34.tar.gz
+ 770k lilypond-1.1.35.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 770k lilypond-1.1.34.tar.gz
+ 770k lilypond-1.1.35.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.1.34
+Version: 1.1.35
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.34.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.35.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>
#
SCRIPTS = configure aclocal.m4
-README_FILES = BUGS DEDICATION ANNOUNCE-0.1 ANNOUNCEMENT \
+README_FILES = BUGS DEDICATION ANNOUNCE-0.1 ANNOUNCEMENT-1.0 \
COPYING NEWS-0.1 NEWS-1.0 NEWS-0.0 NEWS TODO
README_TXT_FILES = README.txt AUTHORS.txt INSTALL.txt PATCHES.txt
IN_FILES := $(wildcard *.in)
- - design macro for penstroke with rounded endings
- - timesig C: fat yet less curved. Check out relations.
- - design decent macro for bulbed endings
- - printer dependencies.
- - y-refpoint for rests should be the 4th staffline (gclef: b')
- - clean-up eight+ rests
- - versioning
- - lo-res fixes.
- - work out sizes of character fonts.
- - more symbols
- * piano pedals: Ped/*
- * maxima notehead
- * coda signs: Segno, O+
- * glissando, arpeggio
- * lengthened trill
- - 128th flags
- - include important spacing dims in fetalog
+
;; See documentation of Item::visibility_lambda_
(define (postbreak_only_visibility d) (if (= d 1) '(#f . #f) '(#t . #t)))
-(define (non_postbreak_visibility d) (if (= d -1) '(#t . #t) '(#f . #f)))
(define (spanbar_non_postbreak_visibility d) (if (= d -1) '(#t . #t) '(#f . #f)))
+(define (non_postbreak_visibility d) (if (= d 1) '(#t . #t) '(#f . #f)))
+
+
;; Score_span_bars are only visible at start of line
;; i.e. if break_dir == RIGHT == 1
-(define Span_score_bar_engraver_visibility postbreak_only_visibility)
(define Span_bar_engraver_visibility non_postbreak_visibility)
+
+(define Span_score_bar_engraver_visibility postbreak_only_visibility)
(define Piano_bar_engraver_visibility postbreak_only_visibility)
(define Staff_group_bar_engraver_visibility postbreak_only_visibility)
outfile = os.path.join(Props.get('output'), outfile )
this.write("""\
-\\vfill\\hfill{\\LilyIdString}
+\\vfill\\hfill{\\mudelatagline}
\\end{document}
""")
this.__fd.close()
\ifundefined{mudelacopyright}
\def\mudelacopyright{\copyright\ \number\year}
\fi
-\ifundefined{LilyIdString}
- \def\LilyIdString{Lily was here}
+\ifundefined{mudelatagline}
+ \def\mudelatagline{Lily was here}
\fi
\ifundefined{documentclass}
\input lilypond-plaintex