* python/lilylib.py (setup_temp): temporary directories are mode 700.
[lilypond.git] / lily / pitch-squash-engraver.cc
blob98607e15bb05b264a2c4c4bbd83dc6acd53beddc
1 /*
2 pitch-squash-grav.cc -- implement Pitch_squash_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
9 #include "staff-symbol-referencer.hh"
10 #include "note-head.hh"
11 #include "rhythmic-head.hh"
12 #include "engraver.hh"
14 class Pitch_squash_engraver : public Engraver {
15 public:
16 TRANSLATOR_DECLARATIONS(Pitch_squash_engraver);
17 virtual void acknowledge_grob (Grob_info);
21 void
22 Pitch_squash_engraver::acknowledge_grob (Grob_info i)
24 SCM newpos = get_property ("squashedPosition");
25 if (Note_head::has_interface (i.grob_))
27 i.grob_->set_grob_property ("staff-position", newpos);
33 Pitch_squash_engraver::Pitch_squash_engraver()
37 ENTER_DESCRIPTION(Pitch_squash_engraver,
38 /* descr */ "Treat all pitches as middle C. Note that the notes move, but "
39 "the locations of accidentals stay the same. "
40 "Set the position field of all note heads to zero. This useful for "
41 "making a single line staff that demonstrates the rhythm of a melody.",
42 /* creats*/ "",
43 /* accepts */ "",
44 /* acks */ "note-head-interface",
45 /* reads */ "squashedPosition",
46 /* write */ "");