Flaming Hakama by Elaine | 2 May 23:08 2016
Gravatar

Re: writing text on the staff & using numbers in music functions

> > But I could not get it to move down onto the staff.  As described in
> > "Vertical alignment is a bit more complex. As stated above, markup objects
> > can be moved as a whole; however, it is also possible to move specific elements 
> > inside a markup block."
> >
> > It took me a while to realize this meant that the techniques using
> > raise, lower, translate, general-align and translate-scaled
> > will NOT affect the "markup object moved as a whole",
> > but rather affect the relative position of objects within the markup object.
...
> Well, it's not true, see:
...
> Printing text in Staff depends of the settings for TextScript
> {
>   \override TextScript.outside-staff-priority = #'()
>   \override TextScript.staff-padding = #'()
>   s1^\markup {
>         \line { \circle "."  "This is the anchor" }
>         \translate #'(-25 . 0) \with-dimensions #empty-interval
> #empty-interval "xy"
>       }
> }

 
That's great, thanks for demonstrating that.
Just curious, but how did you ever learn this?

It seems doubtful that one would have arrived at this insight using the manuals.


Trying to find this info in the docs, the formatting-text page http://lilypond.org/doc/v2.19/Documentation/learning/moving-objects
starts out with a link to the LM about moving objects.

But neither that page, nor the NR section about text alignment 
mentions the outside-staff-priority.


Searching for this property, it can be found in 
Tweaking Output > Placement of Objects > Outside-staff objects http://lilypond.org/doc/v2.19/Documentation/learning/outside_002dstaff-objects

But even here, there is no mention of how to get outside-staff objects placed in the staff.  

Of course, based on the naming convention "outside-staff objects", it seems unlikely that you could place an outside-staff object within the staff.  So, maybe this is a silly discussion to begin with.  However, since it is possible, I wonder if it should be mentioned?


"Objects with the lower value of the outside-staff-priority property are placed nearer to the staff, and other outside-staff objects are then raised as far as necessary to avoid collisions. The outside-staff-priority is defined in the grob-interface and so is a property of all layout objects. By default it is set to #f for all within-staff objects, and to a numerical value appropriate to each outside-staff object when the object is created."

If anything, one might guess that in order to get an outside staff object placed in the staff, you would specify it's outside-staff-priority as "#f", since the above quoted passase says that's the default for within-staff objects.

Yet, the example you provide sets TextScript.outside-staff-priority to an empty list.  Is an empty list equivalent to "#f"?


Then there is the matter of staff-padding.  The LM section on grob sizing mentions it with respect to vertical alignment of dynamics and refers to the section on Collisions of objects http://lilypond.org/doc/v2.19/Documentation/learning/collisions-of-objects

Within there, it is described in the section on Moving Objects  http://lilypond.org/doc/v2.19/Documentation/learning/moving-objects

"staff-padding applies only to those objects which are always set outside the staff – it controls the minimum distance from the staff to the outside-staff object."

This also seems to imply that an outside-staff object cannot be set within the staff.  

If you read this literally--but keeping in mind that you've demonstrated that it is possible to set text within the staff--it is saying that staff-padding does not apply to text markup (since text markup is not always set outside the staff.)

This would be more consistent if it said, "staff-padding applies only to outside-staff objects – it controls the minimum distance from the staff to the outside-staff object."  In which case the discrepancy is only in the naming convention, since an outside-staff object is not necessarily always set outside the staff.


And in the section specifically on the staff-padding property: 

"staff-padding can be used to align objects such as dynamics along a baseline at a fixed distance from the staff, when no other notation forces them further from the staff."" 

Which is to say, it is unclear why and how this relates to setting text within the staff.


So, it is not very clear where one would learn that both of these are necessary:

  \override TextScript.outside-staff-priority = #'()
  \override TextScript.staff-padding = #'()


In any case, thanks for your help.  What would I do without this list?



David Elaine Alt
415 . 341 .4954                                           "Confusion is highly underrated"
elaine <at> flaminghakama.com
self-immolation.info
skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Urs Liska | 2 May 11:27 2016
Gravatar

Scheme book (p)review

Hi all,

preparing a course I'm going to give in June and July turned into a
substantial task: I'm ending up writing the book that *I* would have
needed some years ago. Basically what I'm trying to do is give readers a
chance to properly understand how Scheme can basically be used in
LilyPond. It's the same objective as the Scheme tutorials started a
while ago on Scores of Beauty, but heading for some kind of
comprehensiveness.

The book is far from complete and from a state where I'd publicly share
the link but if anyone is interested in (p)reviewing i I'll do so
privately. Basically I'm interested in three kinds of critical looks
from different kinds of readers:

- pointing to issues that are not explained clearly or thoroughly enough
  (i.e for example where I'm still relying on knowledge the reader
doesn't have yet)
- comments on missing topics
- spotting factual errors

Best
Urs
Malte Meyn | 2 May 10:20 2016
Picon

tie from grace to second in chord

Hi list,

the tie from the f' in the following code goes too far right as if the 
f' wasn’t shifted because of the g' (see attachment). Is this a bug? Any 
ideas for a workaround?

%%%%%%%%%%%
\version "2.19.40" % 2.18.2 and earlier
\language "deutsch"

\relative {
   \set tieWaitForNote = ##t
   \grace { h8~ f'~ g~ }
   <h, f' g h'>1
}
%%%%%%%%%%%

Malte
_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Michiel Sikma | 2 May 05:46 2016
Gravatar

Changing pedal symbol

Hi there,

I've been looking at what's contained in the font, and found a simplified pedal symbol (pedal.P, as seen here). I wanted to see how it looks in my score, so I constructed a small snippet to try and figure out how to replace the regular pedal symbol.

I've tried a few things unsuccessfully. My latest attempt is:
\override SustainPedal.stencil = #(lambda (grob) #:musicglyph "pedal.P")
However, it doesn't actually change anything. I've found a few snippets that deal with changing stencils but nothing appears to work for me or do exactly what I want.

Here's an example snippet: http://lilybin.com/jq3pqx/1

Would anyone know how to accomplish this?

Regards,
_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Joseph Chrestien | 1 May 22:48 2016

implicitly running a lilypond script through a python script before compilation

Hi all,

I know this is going to sound strange: is it possible (or even imaginable) to run a Python code snippet from
"within" Lilypond code at compile time? 

This is my situation: I am currently using a custom extension of the "Column markup" Frescobaldi snippet,
to print verses below a staff. So far, so good (just discovered these snippets - very nice indeed!), but I am
compiling quite a large library I am afraid I might want to change some details in the snippet as time goes
by. Currently, that would mean highlight-clicking every single ly file. 

I am interested if anybody has a clue in how I can tweak Lily configs (if possible) so that my input script (A)
would be automatically submitted to (say) a Python script called `verse-markup` located in the right
folder and would be *implicitly* transformed into script (B). [See below]

I had a vague idea I could change the Frescobaldi execute path so that the script (invisibly) first goes to
Python before being submitted to Lilypond in the "script B" form - does that seem any good? Has anyone
already done it, who could give me a tip?

Thanks!
Joseph

PS. or maybe a magic "\include pysnippets.ly" command ? that would be absolute dream :)

------------------------------------------
Script A: what I want in my script window
------------------------------------------
\score { \relative c'' { c2 g4 e c1 } }

%!%!%!snippet:verse-markup%!%!%!
This is my first verse
La la la la la

This is my second verse
Lo lo lo lo lo
%!%!%!end-snippet%!%!%!

------------------------------------------
Script B: what I want Lilypond to read at compile time and change to PDF
------------------------------------------
\score { \relative c'' { c2 g4 e c1 } }

\markup{
    \line { This is my first verse }
    \line { La la la la la }
    \line { This is my second verse }
    \line { Lo lo lo lo lo } 
    % I know this markup doesn't work but it made it simple ;-)
}

------------------------------------------
Snippet: something like this should be saved in a nearby folder
------------------------------------------
text = '\n'.join(r'\line { %s }' % l for l in text.splitlines())
if state[-1] != 'markup':
    text = '\\markup {\n%s\n}' % text
Nik Repka | 1 May 22:51 2016
Picon

subdivide beams (the correct way)?

I am having trouble getting Lilypond to subdivide beams correctly.  The
default in 2/4 is to beam 32nd notes in groups of 8 (quarter notes).  I can
set subdivide beams to true and change the baseMoment to 1/8 to get the
correct subdivision of 32nd notes (4+4 under one beam).  But then the 16ths
are also subdivided, which is not standard notation practice.  

Basically my question is: "Is there a way to subdivide beams only on note
values smaller than 16th?"

Thanks!
David Sumbler | 1 May 21:40 2016
Picon

Installing lilypond-mode in emacs

I have just installed Ubuntu 16.04 to replace my previous 12.04 system,
and installed LilyPond v.2.19.40.

In my ~/.emacs file I already had

(autoload 'LilyPond-mode "lilypond-mode")
(setq auto-mode-alist (cons '("\\.ily$" . LilyPond-mode) auto-mode-alist))
(add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock)))

This gave me lilypond-mode in emacs under Ubuntu 12.04, but it doesn't
work now.

I have looked at the instructions in section 4.2 of the Usage manual
and also in the lilypond-init.el file.  I commented out the above 3
lines and added

(setq load-path (append (list (expand-file-name
"/usr/local/lilypond/usr/share/emacs/site-lisp")) load-path))

but I still don't get lilypond-mode in Emacs (v.24.5.1).

What have I done wrong?

David

_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
ming | 1 May 21:33 2016

Displaying Japanese & Chinese characters.

James,

 

In your editor select UTF-8 and lily support UTF-code. This will display Chinese character.  I have been using this since lilypond v2.12.

 

Immanuel,

Ming

 

Sent from Mail for Windows 10

 

_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Henry Law | 1 May 17:29 2016

Scoring song with multiple sections

(Lilypond v2.18.2 under Linux.)

I'm scoring a song which has the form A A B C C.  Two verses go to 
section A, then there are words for a bridge, then two more verses to 
the music of section C.  Or to put it graphically

Chords to section A
Notes of section A
  Verse 1 words
  Verse 2 words

Chords to bridge
Notes of bridge
  Words to bridge

Chords to section C
Notes of section C
  Verse 3 words
  Verse 4 words

I can do section A but I'm struggling with how to make the bridge and 
its words appear on the same staff in subsequent bars.  It seems to me 
that all the stuff to "A A" is simultaneous stuff and should appear in 
<< >>, and then the stuff for the bridge is different simultaneous 
stuff, and should have its own << >>, and therefore coded this:

\score {
   <<
     \new ChordNames \chordsVerseOneTwo
     \new Staff { \melodyVerseOneTwo }
     \addlyrics { \verseOne }
     \addlyrics { \verseTwo }
   >>
   <<
     { \bridge }
     \addlyrics { \bridgeWords }
   >>
   \layout { ... etc

But on the second appearance of "<<" Lily barfs with "syntax error, 
unexpected <<".

Of course it's an schoolboy error (that's the kind of mistake I'm making 
right now) but I've reviewed the learning manual, especially "Music 
expressions explained" and also the snippets without finding the answer. 
  Can someone help me please?
--

-- 

Henry Law            Manchester, England
James Sa | 1 May 15:51 2016
Picon
Gravatar

Displaying Japanese & Chinese characters.

I bump into a problem that I cannot render CJVK characters correctly.

=== Here's the tiny sample ===
\version "2.19.40"

\header {
  title = "標題" % Use only English is fine. CJVK seems broken.
}

\score {
  \new Staff {
  }
}

=== Here's the output ===
%{ 
Starting lilypond 2.19.40 [FontIssue.ly]...
Processing `/Users/james/Desktop/LilyPond/FontIssue.ly'
Parsing...
Interpreting music...
warning: no music found in score
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `/var/folders/q5/v_dc7mwn4jxf9t_tw60r3lfc0000gn/T//lilypond-H4xHPg'...
Converting to `FontIssue.pdf'...
warning: `(gs -q -dSAFER -dDEVICEWIDTHPOINTS=595.28 -dDEVICEHEIGHTPOINTS=841.89 -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite -sOutputFile=FontIssue.pdf -c.setpdfwrite -f/var/folders/q5/v_dc7mwn4jxf9t_tw60r3lfc0000gn/T//lilypond-H4xHPg)' failed (256)

fatal  error: failed files: "/Users/james/Desktop/LilyPond/FontIssue.ly"
%}

And my full lilypond -dshow-available-fonts is here. https://gist.github.com/jamessa/1d8ab3e999b75d36e762f7b3f9626e8c

head of my PS file.
head /var/folders/q5/v_dc7mwn4jxf9t_tw60r3lfc0000gn/T//lilypond-G3vKM7
%!PS-Adobe-3.0
%%Creator: LilyPond 2.19.40
%%Pages: 1
%%PageOrder: Ascend
%%Orientation: Portrait
%%DocumentMedia: a4 595.28 841.89 80 () ()
%%DocumentSuppliedResources: font HiraKakuStdN-W7
%%DocumentSuppliedResources: font TeXGyreSchola-Regular
%%EndComments
%%BeginProlog

I have no idea where does the "HiraKakuStdN-W7" comes from. Can someone point me a way to do this. I also tried to install latest gs using homebrew. Still no luck. 

best regards,
james sa
--
james
send from Inbox.
--
james
send from Inbox.
_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Mark Stephen Mrotek | 1 May 13:54 2016
Picon

RE: Replying to posts

Werner,

My Titanium Internet Security blocks this site as a "Dangerous Page."

Mark

-----Original Message-----
From: lilypond-user
[mailto:lilypond-user-bounces+carsonmark=ca.rr.com <at> gnu.org] On Behalf Of
Werner LEMBERG
Sent: Thursday, April 28, 2016 10:27 PM
To: andrew.bernard <at> gmail.com
Cc: lilypond-user <at> gnu.org
Subject: Re: Replying to posts

From: Werner LEMBERG <wl <at> gnu.org>
Subject: Re: Replying to posts
Date: Fri, 29 Apr 2016 07:19:48 +0200 (CEST)

> 
>>> What about this?
>>>
>>>   http://home.in.tum.de/~jain/software/outlook-quotefix/
>>>
>>> I'm not an outlook user, but this looks quite promising (and is 
>>> actively maintained)!
>>
>> Really? Runs on NT4 up to XP. Support up to Outlook 2003. That's 
>> moribund by any standard, surely?
> 
> Oops!  I've misread 2006 for 2016 :-)  Sorry.

What about this, then.

  http://www.grzegorz.net/oe/oept.php

It claims to work up to Windows 7.

    Werner

_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Gmane