Removing the stem engraver?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Removing the stem engraver?

Don Blaheta
When I run the following code, I get no syntax errors, but it doesn't
work; it gets as far as "Calculated line breaks..." and then lilypond
exits abnormally with exit code 246.  If I remove any one of the lines
marked with a "%---", it runs just fine.  So it appears to be some sort
of interaction between making new pseudo-"nested" Voice contexts,
stacking them, and removing the stems.

  \version "2.7.33"
 
  \score {
    \new Voice { <<
      \new Voice  %---
        { c'' }   %---
      { g }   %---
    >> }
    \layout {
      \context {
        \Voice
        \remove "Stem_engraver"    %---
      }
    }
  }

It may be related to the following curious behaviour: when you remove
the Stem_engraver, every note that interacts with a slur (including just
being underneath it) gives a "programming error: no stem for note
column; continuing, cross fingers".  For example, with the following
code:

  \version "2.7.33"
  \score {
    \new Voice \relative c' {
      d e( f) g
    }
    \layout {
      \context {
        \Voice
        \remove "Stem_engraver"
      }
    }
  }

In these cases, though, the program finishes and actually renders a .ps
file with serviceable if not optimal slurs.  All of this is in 2.7.33-1
on OS X.

--
-=-Don Blaheta-=-=-[hidden email]-=-=-=-<http://www.blahedo.org/>-=-
The one good thing about repeating your mistakes is that you know when
to cringe.


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing the stem engraver?

Mats Bengtsson-4
Have you considered just making the stems invisible, as a workaround?
\override Stem #'transparent = ##t

    /Mats

Quoting Don Blaheta <[hidden email]>:

> When I run the following code, I get no syntax errors, but it doesn't
> work; it gets as far as "Calculated line breaks..." and then lilypond
> exits abnormally with exit code 246.  If I remove any one of the lines
> marked with a "%---", it runs just fine.  So it appears to be some sort
> of interaction between making new pseudo-"nested" Voice contexts,
> stacking them, and removing the stems.
>
>  \version "2.7.33"
>
>  \score {
>    \new Voice { <<
>      \new Voice  %---
> { c'' }   %---
>      { g }   %---
>    >> }
>    \layout {
>      \context {
>        \Voice
>        \remove "Stem_engraver"    %---
>      }
>    }
>  }
>
> It may be related to the following curious behaviour: when you remove
> the Stem_engraver, every note that interacts with a slur (including just
> being underneath it) gives a "programming error: no stem for note
> column; continuing, cross fingers".  For example, with the following
> code:
>
>  \version "2.7.33"
>  \score {
>    \new Voice \relative c' {
>      d e( f) g
>    }
>    \layout {
>      \context {
>        \Voice
>        \remove "Stem_engraver"
>      }
>    }
>  }
>
> In these cases, though, the program finishes and actually renders a .ps
> file with serviceable if not optimal slurs.  All of this is in 2.7.33-1
> on OS X.
>
> --
> -=-Don Blaheta-=-=-[hidden email]-=-=-=-<http://www.blahedo.org/>-=-
> The one good thing about repeating your mistakes is that you know when
> to cringe.
>
>
> _______________________________________________
> lilypond-devel mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/lilypond-devel
>





_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing the stem engraver?

Don Blaheta
Quoth Mats Bengtsson:
> Have you considered just making the stems invisible, as a workaround?
> \override Stem #'transparent = ##t

That's exactly how I work around it, but the results aren't exactly the
same---slurs are rendered as if the stems were there.  (This in turn can
be worked around with judicious use of \stemDown and \stemUp, but the
whole think is getting very crufty. ;)

Which reminds me, I also tried

  \override Stem #'print-function = ##f

which I thought was supposed to have approximately the same effect as
removing the engraver, but afaict it does nothing at all.

--
-=-Don Blaheta-=-=-[hidden email]-=-=-=-<http://www.blahedo.org/>-=-
"True, the Founding Fathers had provided for a specific right to bear
arms, but the only reason they'd nothing to say to about the right to
plant seeds (was)... because it never would have occurred to them that
any state might care to abridge that right. After all, they were writing
on hemp paper." --Will Fulton


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing the stem engraver?

Mats Bengtsson-4
Quoting Don Blaheta <[hidden email]>:

> Quoth Mats Bengtsson:
>> Have you considered just making the stems invisible, as a workaround?
>> \override Stem #'transparent = ##t
>
> That's exactly how I work around it, but the results aren't exactly the
> same---slurs are rendered as if the stems were there.  (This in turn can
> be worked around with judicious use of \stemDown and \stemUp, but the
> whole think is getting very crufty. ;)

How about setting the stem length to zero?

> Which reminds me, I also tried
>
>  \override Stem #'print-function = ##f
>
> which I thought was supposed to have approximately the same effect as
> removing the engraver, but afaict it does nothing at all.

I don't remember which LilyPond version you use. This property has
been renamed in the latest 2.7.x versions.

    /Mats



_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing the stem engraver?

Dunstan Vavasour
In reply to this post by Don Blaheta
In an earlier thread elsewhere someone suggested setting the stem length to 0

\override Stem #'length = #0

 - apparently it worked fine for crotchets and minims, but not for quavers.

Dunstan

On 15/02/06, Don Blaheta <[hidden email]> wrote:

> Quoth Mats Bengtsson:
> > Have you considered just making the stems invisible, as a workaround?
> > \override Stem #'transparent = ##t
>
> That's exactly how I work around it, but the results aren't exactly the
> same---slurs are rendered as if the stems were there.  (This in turn can
> be worked around with judicious use of \stemDown and \stemUp, but the
> whole think is getting very crufty. ;)
>
> Which reminds me, I also tried
>
>   \override Stem #'print-function = ##f
>
> which I thought was supposed to have approximately the same effect as
> removing the engraver, but afaict it does nothing at all.


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing the stem engraver?

Dunstan Vavasour
In reply to this post by Don Blaheta
In an earlier thread elsewhere someone suggested setting the stem length to 0

\override Stem #'length = #0

 - apparently it worked fine for crotchets and minims, but not for quavers.

Dunstan

On 15/02/06, Don Blaheta <[hidden email]> wrote:

> Quoth Mats Bengtsson:
> > Have you considered just making the stems invisible, as a workaround?
> > \override Stem #'transparent = ##t
>
> That's exactly how I work around it, but the results aren't exactly the
> same---slurs are rendered as if the stems were there.  (This in turn can
> be worked around with judicious use of \stemDown and \stemUp, but the
> whole think is getting very crufty. ;)
>
> Which reminds me, I also tried
>
>   \override Stem #'print-function = ##f
>
> which I thought was supposed to have approximately the same effect as
> removing the engraver, but afaict it does nothing at all.


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing the stem engraver?

Mats Bengtsson-4
In reply to this post by Dunstan Vavasour
Quoting Dunstan Vavasour <[hidden email]>:

> In an earlier thread elsewhere someone suggested setting the stem length to 0
>
> \override Stem #'length = #0
>
> - apparently it worked fine for crotchets and minims, but not for quavers.

You probably mean that it works for notes that don't have any beams,
but not for beamed notes. See
http://lilypond.org/doc/v2.6/Documentation/user/lilypond-internals/Stem.html#Stem
for documentation of the property called beamed-lengths, that is used
to set the length of beamed stems.

  /Mats

>
> Dunstan




_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing the stem engraver?

Don Blaheta
In reply to this post by Mats Bengtsson-4
Quoth Mats Bengtsson:

> Quoting Don Blaheta <[hidden email]>:
> > Quoth Mats Bengtsson:
> >> Have you considered just making the stems invisible, as a workaround?
> >> \override Stem #'transparent = ##t
> > That's exactly how I work around it, but the results aren't exactly the
> > same---slurs are rendered as if the stems were there.  (This in turn can
> > be worked around with judicious use of \stemDown and \stemUp, but the
> > whole think is getting very crufty. ;)
>
> How about setting the stem length to zero?

Ah!  Clever.

> > Which reminds me, I also tried
> >
> >  \override Stem #'print-function = ##f
> >
> > which I thought was supposed to have approximately the same effect as
> > removing the engraver, but afaict it does nothing at all.
>
> I don't remember which LilyPond version you use. This property has
> been renamed in the latest 2.7.x versions.

Sho 'nuff.  I'm using 2.7.33, but my initial exploration in the
print-function direction was when I was in some 2.6 version.  What's the
new name, though?  I'm not finding it right now.

--
-=-Don Blaheta-=-=-[hidden email]-=-=-=-<http://www.blahedo.org/>-=-
 #define QUESTION ((bb) || !(bb)) //--Shakespeare


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing the stem engraver?

Juergen Reuter
In reply to this post by Mats Bengtsson-4

Hi, all!

As I remarked a couple of months ago, I had similar problems with ancient
notation.  Typographically, to my experience, you will get by far the best
results by

(1) providing duration-independent notehead selection by patching
scm/output-lib.scm as follows:

Index: scm/output-lib.scm
===================================================================
RCS file: /cvsroot/lilypond/lilypond/scm/output-lib.scm,v
retrieving revision 1.97
diff -u -r1.97 output-lib.scm
--- scm/output-lib.scm 10 Feb 2006 12:03:58 -0000 1.97
+++ scm/output-lib.scm 16 Feb 2006 11:14:02 -0000
@@ -146,6 +146,10 @@
         (if (< log -1)
    (string-append (number->string log) "neomensural")
    (number->string log)))
+      ((default-1) "-1")
+      ((default0) "0")
+      ((default1) "1")
+      ((default2) "2")
        (else
         (if (string-match "vaticana*|hufnagel*|medicaea*" (symbol->string
style))
    (symbol->string style)


     (This patch provides the default noteheads only (e.g. "\override
     NoteHead #'style = default2"); maybe a generalized version of this
     patch should accept any glyph independent of the notehead duration,
     such that you can do maybe something like:
     "\override NoteHead #'style = always-<glyphname>").

(2) with the above patch, setting the style property of NoteHead to the
     desired head (here, as an example, the quarter note head):

     \override Staff.NoteHead #'style = #'default2

(3) assuming that timing is not used, using durations that do not produce
     stems, i.e. typically whole notes, e.g.:

     \set Score.timing = ##f
     f1 g( a) f( d) f( g f1.)

I do recognize that this approach is not much less dirty than the
other workarounds that have been suggested so far (e.g., as a side effect,
midi timing may not necessarily be what you would like to get), but for
meterless music, it gives you at least typographically exactly what you
want, afaics.  And you do not have at all to fight / do tricks with the
stem engraver, beams, etc. -> your .ly file remains human-readable!

Greetings,
Juergen

On Wed, 15 Feb 2006, Mats Bengtsson wrote:

> Quoting Dunstan Vavasour <[hidden email]>:
>
>> In an earlier thread elsewhere someone suggested setting the stem length to
>> 0
>>
>> \override Stem #'length = #0
>>
>> - apparently it worked fine for crotchets and minims, but not for quavers.
>
> You probably mean that it works for notes that don't have any beams, but not
> for beamed notes. See
> http://lilypond.org/doc/v2.6/Documentation/user/lilypond-internals/Stem.html#Stem
> for documentation of the property called beamed-lengths, that is used
> to set the length of beamed stems.
>
> /Mats
>
>>
>> Dunstan
>
>
>
>
> _______________________________________________
> lilypond-devel mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/lilypond-devel
>


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing the stem engraver?

Mats Bengtsson-4
In reply to this post by Don Blaheta


Don Blaheta wrote:

> ...
>
>Sho 'nuff.  I'm using 2.7.33, but my initial exploration in the
>print-function direction was when I was in some 2.6 version.  What's the
>new name, though?  I'm not finding it right now.
>  
>

Run an example for version 2.6 through convert-ly, to find out. ;-)

   /Mats


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing the stem engraver?

Don Blaheta
In reply to this post by Mats Bengtsson-4
Quoth Mats Bengtsson:

> Quoting Don Blaheta <[hidden email]>:
> > Quoth Mats Bengtsson:
> >> Have you considered just making the stems invisible, as a workaround?
> >> \override Stem #'transparent = ##t
> >
> > That's exactly how I work around it, but the results aren't exactly the
> > same---slurs are rendered as if the stems were there.  (This in turn can
> > be worked around with judicious use of \stemDown and \stemUp, but the
> > whole think is getting very crufty. ;)
>
> How about setting the stem length to zero?

There's a bug there, too, I think.  The following example draws all
stems to the middle line of the staff rather than not drawing them:

  \version "2.7.35"
  \score {
    \new Voice \relative g' {
      \override Staff.Stem #'length = #0
      e4 g( a) a a( g) a( b c d a) g( a) a2
    }
  }

--
-=-Don Blaheta-=-=-[hidden email]-=-=-=-<http://www.blahedo.org/>-=-
The goal of science is to build better mousetraps.  The goal of nature
is to build better mice.


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Removing the stem engraver?

Dunstan Vavasour
You're right.

I think that wants registering as a bug.

Dunstan.

On 21/02/06, Don Blaheta <[hidden email]> wrote:

> Quoth Mats Bengtsson:
> > Quoting Don Blaheta <[hidden email]>:
> > > Quoth Mats Bengtsson:
> > >> Have you considered just making the stems invisible, as a workaround?
> > >> \override Stem #'transparent = ##t
> > >
> > > That's exactly how I work around it, but the results aren't exactly the
> > > same---slurs are rendered as if the stems were there.  (This in turn can
> > > be worked around with judicious use of \stemDown and \stemUp, but the
> > > whole think is getting very crufty. ;)
> >
> > How about setting the stem length to zero?
>
> There's a bug there, too, I think.  The following example draws all
> stems to the middle line of the staff rather than not drawing them:
>
>   \version "2.7.35"
>   \score {
>     \new Voice \relative g' {
>       \override Staff.Stem #'length = #0
>       e4 g( a) a a( g) a( b c d a) g( a) a2
>     }
>   }
>
> --
> -=-Don Blaheta-=-=-[hidden email]-=-=-=-<http://www.blahedo.org/>-=-
> The goal of science is to build better mousetraps.  The goal of nature
> is to build better mice.


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel