Sprechgesang

2020-10-31 Thread Massimiliano Viel
Hello everybody,
I would like to use Schoenberg’s original symbol for sprechgesang… 
Specifically, the x on the stem you find in the score of Pierrot Lunaire.
I found a snippet in the forum, which is:

sp = { \override Voice.Stem #'stencil = 
 #(lambda (grob) 
   (ly:stencil-combine-at-edge 
 (ly:stem::print grob) 1 (ly:grob-property grob 'direction) 
 (ly:text-interface::print grob) -3 0)) 
   \override Voice.Stem #'text = \markup { 
 \hspace #-1.075 \teeny \musicglyph #"noteheads.s2cross" 
} 
}  

But…it doesn’t seem to work. 
I receive the following message of error:

Wrong number of arguments to ly:stencil-combine-at-edge


Why is that? As far as I can understand the number of arguments is fine! But I 
am still a noob in Lilypond, so…

Thank you for all the help!

Massimiliano

Re: Sprechgesang

2020-10-31 Thread Massimiliano Viel
Thank you for the answer.
Now it works fine… 

still, to be perfect, I should to find a way to extend the stem so that the x 
can find its comfortable place on it.

And another possibly outrageous question… when I invoke \sp, it works from the 
first following note on to the last note, rests included (!).
How do I stop it?

Thank you again for the help!

massimiliano

> On 31 Oct 2020, at 21:31, Robin Bannister  wrote:
> 
> Massimiliano Viel wrote:
>> I receive the following message of error:
>> Wrong number of arguments to ly:stencil-combine-at-edge
>> Why is that? As far as I can understand the number of arguments is fine! 
> 
> 
> The last parameter was dropped quite some time ago.
> You should have run it through convert-ly.
> 
> But deleting the zero after the -3 will do it.
> 
> 
> Cheers,
> Robin



Re: Sprechgesang

2020-11-01 Thread Massimiliano Viel
Hi,
yes the code was pretty old, about 2007.

So it is good to have updated this topic in the forum.
Thank you to you and everybody!

unofortunately I use Lilypond only once in a while, so I don’t use it enough to 
develop a deep knowledge as I would like.
first one who writes a book/tutorial on Lilypond… kudos!

 best to everybody

massimiliano


> On 1 Nov 2020, at 10:08, Lukas-Fabian Moser  wrote:
> 
> Hi Massimiliano,
> 
> the code you provided is _very_ old. I modified it a bit in order to work 
> with both possible stem directions and respect rests. Also, there was a 
> hard-coded offset for the cross that can more succinctly be replaced by a 
> \center-align.
> 
> I also lenghened the stems a bit. Note that this does not work together with 
> beams - I suspect it's got to do with unpure-pure-containers, which I don't 
> understand :-).
> 
> Best
> Lukas
> \version "2.21.6"
> 
> sp =
> {
>   \override Stem.stencil =
>   #(lambda (grob)
>  (let ((dir (ly:grob-property grob 'direction))
>(length (ly:grob-property grob 'length))
>(actual-stem (ly:stem::print grob)))
>(if (ly:stencil? actual-stem) ; do not add anything if we don't have a 
> stem (e.g. rests)
>(ly:stencil-combine-at-edge actual-stem
>1
>dir
>(ly:text-interface::print grob)
>(+ (* length -0.5) 0.75)) ; 0.75 is 
> the distance from cross to start of notehead
>empty-stencil)))
>   \override Voice.Stem.text = \markup \center-align \teeny \musicglyph 
> #"noteheads.s2cross"
>   \override Voice.Stem.length = #(lambda (grob) (+ 0.5 (ly:stem::calc-length 
> grob)))
> }
> 
> \relative {
>   \sp c'4 d e8[ f g a] b4 r c4 d e
>   \undo \sp e d c b a
>   \once \sp g f e
> }
> Am 31.10.20 um 23:03 schrieb Massimiliano Viel:
>> And another possibly outrageous question… when I invoke \sp, it works from 
>> the first following note on to the last note, rests included (!).
>> How do I stop it?
> I showed both \undo\sp and \once\sp in my example.
> 
> Enjoy LilyPond - it's amazing what you can achieve with it!
> 
> Lukas
> 



Re: Sprechgesang

2020-11-01 Thread Massimiliano Viel
Thank you,
I was in fact interested in the notation of Pierrot Lunaire’ “Den Wein", which 
Schoenberg abandoned later to adopt the “Humperdinck” one.
Thank you for the material, I’ll try to study it and understand how it works.

Best

Massimiliano



> On 1 Nov 2020, at 21:43, Thomas Morley  wrote:
> 
> Hi,
> 
> I found
> https://www.mu-sig.de/Theorie/Notation/grafik/Notation8/28-1.gif
> in the net and tried to code it in LilyPond.
> 
> Code and image attached.
> I'm aware there are some edges where the current output could be
> tweaked to match the .gif even more.
> Though, I limited myself to demonstrate the current coding, it's
> varios settings and configuration possibilities.
> 
> Cheers,
>  Harm
> 




Stockhausens tremolo

2019-10-29 Thread Massimiliano Viel
Hi everybody,
I wrote my first score with Lilypond and still a newbie.
I think the most efficient way to write a tremolo is the one adopted by 
Stockhausen. I send an example as attachment.
The value is indicated only on the first note, while the second one is just a 
back unstemmed note.
Is there a way to realize it with Lilypond? Any suggestions?
Thank you a lot!!

Massimiliano



Frescobaldi 3.1.1 doesn't even start

2020-03-07 Thread Massimiliano Viel
Hi everybody,
I checked today the last version of Frescobaldi for macOS on an iMac mid-2011 
with 16 GB Ram and macOS 10.13.6.
After a few second after double-clicking the icon it just crashes without 
comments.

Any hint?

Thank you!

massimiliano


Re: Frescobaldi 3.1.1 doesn't even start

2020-03-07 Thread Massimiliano Viel
Dear Davide,
it is exactly that problem.
I’ll check the link you provided hoping that somebody will find soon a solution!
I’ll also check with my macbook to see if it works there at least.
Thank you and all the best.

Massimiliano

> On 7 Mar 2020, at 18:02, Davide Liessi  wrote:
> 
> Dear Massimiliano,
> 
> Il giorno sab 7 mar 2020 alle ore 17:08 Massimiliano Viel
>  ha scritto:
>> I checked today the last version of Frescobaldi for macOS on an iMac 
>> mid-2011 with 16 GB Ram and macOS 10.13.6.
>> After a few second after double-clicking the icon it just crashes without 
>> comments.
> 
> most probably this is https://github.com/frescobaldi/frescobaldi/issues/1244.
> I commented in the issue you opened
> (https://github.com/frescobaldi/frescobaldi/issues/1267) with a test
> to confirm that it is the same problem.
> 
> Unfortunately I haven't yet found a workaround.
> I asked for help at PyQt's mailing list but still with no answers after 10 
> days.
> A couple of days ago I wrote also to MacPorts' mailing list.
> The issue https://github.com/frescobaldi/frescobaldi/issues/1244
> contains all the details.
> 
> Best wishes.
> Davide




problems in spacing

2018-10-23 Thread Massimiliano Viel
Hello everyone!
I’m a composer that after having spent a lot of years with Finale decided to 
move to a better sw for music writing and wanted to embrace Lilypond.
Which is beautiful… but!
I’m really spending more time banging my head on the wall and trying to getting 
a sense of the manual (which is complete and well written but… very hard to 
parse if you go just a little in detail), than composing music. 
And of course I cannot allow myself to do it, because it’s my work.

Sorry for the surge, but I want to still give a chance to Lilypond before using 
a graphic sw to fix it or worse getting sadly back to Finale…

This is my problem, as you see in the image:
1) how can I separate more my name from the music?
2) how can I separate the notes from the bar?
And why the b is not in the middle between the c and the a?!

It is frustrating because, while in Finale it is very elementary to fix these, 
in Lilypond I couldn’t find a way that didn’t assume I know the manual by heart.

Moreover it seems that I cannot do a proper layout of the score because with 
system-system-spacing #'basic-distance  it seems I cannot choose an appropriate 
distance between systems: changing the value only makes the score to change 
from occupying one page and a half to occupying three pages, without no middle 
layout (I want to put the score in two pages).

Thank you, thank you, thank you! for any support and please excuse the surge!

Massimiliano

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: problems in spacing

2018-10-24 Thread Massimiliano Viel
Thank you for your suggestions!

Here below is the code.

With system-system-spacing #'basic-distance = #22 I have  2 pages and one 
system in the 3rd.
With system-system-spacing #'basic-distance = #21 I have less than 2 full pages
How can I have 2 complete pages?! What do I do wrong?

Moreover Frescobaldi signals to me #(set-global-staff-size 16) with the red 
color. Why is that? The code renders without errore, but that color seems to 
point me to some misuse. Is it true?

Thank you again!!!

massimiliano

global = {
  \time 5/4
  \key c \major
  \tempo 4=120
 #(set-global-staff-size 16)
}

ripeti  = {c16 c c c  c c c c  c c c c  c c c c   c c c c }

sopra = \relative c'' {
  \clef treble
  \key c \major
  \time 5/4
  \ripeti | \ripeti | \break \ripeti | \ripeti | \break \ripeti | \ripeti | 
\break \ripeti | \ripeti | \break  
  \ripeti | \ripeti | \break \ripeti | \ripeti | \break \ripeti | \ripeti | 
\break \ripeti | \ripeti | \break
  \ripeti | \ripeti | \break \ripeti | \ripeti | \break \ripeti | \ripeti | 
\break \ripeti | \ripeti | \break
  \ripeti | 
}

sotto = \relative c {
  \clef bass
  \key c \major
  \time 5/4
  \ripeti | \ripeti | \break \ripeti | \ripeti | \break \ripeti | \ripeti | 
\break \ripeti | \ripeti | \break  
  \ripeti | \ripeti | \break \ripeti | \ripeti | \break \ripeti | \ripeti | 
\break \ripeti | \ripeti | \break
  \ripeti | \ripeti | \break \ripeti | \ripeti | \break \ripeti | \ripeti | 
\break \ripeti | \ripeti | \break
  \ripeti  \bar "|."
}

\book {

\version "2.18.2"

\header {
  title = \markup { "Title" \vspace #0 }
  subtitle =  \markup { "" \vspace #1 }
  composer = \markup \center-column { "Massimiliano Viel" \vspace #1 }
  tagline = ""
}

\paper {
  #(set-paper-size "a4")
  top-margin = 20
  left-margin = 25
  right-margin = 17
  bottom-margin = 25
  system-system-spacing #'basic-distance = #21
  
}

\score {
  
  \layout {
 #(layout-set-staff-size 16)
 \context {
\PianoStaff
\override StaffGrouper.staff-staff-spacing.padding = #3
  }
}

  
  \new PianoStaff \with {
} <<
\set PianoStaff.instrumentName = #"Piano  "
\new Staff  = "upper" \sopra
\new Staff = "lower" \sotto
  >>
  \midi { }
}
}

> On 23 Oct 2018, at 18:32, lilypond-user-requ...@gnu.org wrote:
> 
> Send lilypond-user mailing list submissions to
>   lilypond-user@gnu.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://lists.gnu.org/mailman/listinfo/lilypond-user
> or, via email, send a message with subject or body 'help' to
>   lilypond-user-requ...@gnu.org
> 
> You can reach the person managing the list at
>   lilypond-user-ow...@gnu.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of lilypond-user digest..."
> 
> 
> Today's Topics:
> 
>   1. Re:problems in spacing (Ben)
> 
> 
> --
> 
> Message: 1
> Date: Tue, 23 Oct 2018 12:32:32 -0400
> From: Ben 
> To: lilypond-user@gnu.org
> Subject: Re: problems in spacing
> Message-ID: 
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
> 
> On 10/23/2018 12:06 PM, Massimiliano Viel wrote:
>> Hello everyone!
>> I?m a composer that after having spent a lot of years with Finale 
>> decided to move to a better sw for music writing and wanted to embrace 
>> Lilypond.
>> Which is beautiful? but!
>> I?m really spending more time banging my head on the wall and trying 
>> to getting a sense of the manual (which is complete and well written 
>> but? very hard to parse if you go just a little in detail), than 
>> composing music.
>> And of course I cannot allow myself to do it, because it?s my work.
>> 
>> Sorry for the surge, but I want to still give a chance to Lilypond 
>> before using a graphic sw to fix it or worse getting sadly back to Finale?
>> 
>> This is my problem, as you see in the image:
>> 1) how can I separate more my name from the music?
>> 2) how can I separate the notes from the bar?
> You have a few options for that sort of situation, one of which could be 
> as simple as just moving the notehead... i.e.
> 
> \once \override NoteHead.extra-spacing-width = #'(-4 . 0)
> 
> Sorry for the separate emails, I hit send by accident earlier.
> 
> 
>> And why the b is not in the middle between the c and the a?!
> 
> Can you share your code with us, it really would help us better see.
> Spacing can be resolved by several approaches (fix the note, the staff, 
> system, page, etc), so it depends.
> 
>> 
>> It is frustrating because, w

Re:problems in spacing

2018-10-25 Thread Massimiliano Viel
Dear Davide,
thank you for the answer. that was exactly the problem… I just missed to get 
myself the solution which is nevertheless very explicit in the manual. It is 
easy for a newbie to get lost in the complications of Lilypond even in simple 
matters. 

And sorry for being a total newbie also in asking for help :-D I’ll do better 
in the next time!

Again thank you and best wishes

Massimiliano


> Dear Massimiliano,
> a recommendation before addressing your questions.
> 
> When you write to the list, please always state which LilyPond version
> you are using, because there can be differences in syntax and
> behaviour, although in this case the differences are not related to
> your problems.
> I assume you are using 2.18.x or some early 2.19.x due to the syntax
> for "system-system-spacing #'basic-distance", which more recently
> became "system-system-spacing.basic-distance".
> It is good practice to include a \version statement in your files,
> recording the LilyPond version the file was written for (see
> http://lilypond.org/doc/v2.18/Documentation/learning/working-on-input-files).
> 
> Il giorno mer 24 ott 2018 alle ore 15:58 Massimiliano Viel
>  ha scritto:
>> With system-system-spacing #'basic-distance = #22 I have  2 pages and one 
>> system in the 3rd.
>> With system-system-spacing #'basic-distance = #21 I have less than 2 full 
>> pages
>> How can I have 2 complete pages?! What do I do wrong?
> 
> You can put
> ragged-last-bottom = ##f
> in the \paper block, and then you can get rid of the
> system-system-spacing setting as well (see
> http://lilypond.org/doc/v2.18/Documentation/notation/fixed-vertical-spacing-paper-variables).
> 
>> Moreover Frescobaldi signals to me #(set-global-staff-size 16) with the red 
>> color. Why is that? The code renders without errore, but that color seems to 
>> point me to some misuse. Is it true?
> 
> That instruction can be used only outside any variable, either in a
> \book block or outside any block (see
> http://lilypond.org/doc/v2.18/Documentation/notation/setting-the-staff-size).
> 
> Best wishes.
> Davide

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Emmentaler & friends

2019-01-09 Thread Massimiliano Viel
Hello everyone!
Just a hopefully simple question: I tried to open the pdf generated by 
Lilypond/Frescobaldi with Illustrator and Affinity Design for  fine tuning.
Of course I met the problem that some fonts were missing (almost everyone with 
Designer!).
Therefore I’m in search of the proper fonts to install so that they are 
available to the DTP programs I use.
Can anybody please point me to the font repository or tell me if I’m not doing 
it properly?

Thank you for any help!

Massimiliano
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Emmentaler & friends

2019-01-14 Thread Massimiliano Viel
Sorry for answering so late. That’s the sign of my situation… using lilypond 
not everyday and when I do always with some urgency.
In fact, my needs of fine tuning lilypond come from using a complex notation (I 
wrote last scores directly with Illustrator!) while having a poor knowledge of 
the environment. I’m sure that when I’ll master scheme I’ll be able to do 
whatever I want, but I often don’t have the time to master what I need before I 
need it. :-)

For example…a few days ago I needed to put a slur between the notes of 
different voices in the same staves.
Of course putting it by some fine tuning with Illustrator or Designer is the 
fastest way to do it, when you are in a hurry.
What is the alternative proper way?

Thank you, I’ll check Inkscape.
In the meanwhile I asked the same question to the Affinity developer team and I 
hope they’ll be able to answer it.

Massimiliano

> On 9 Jan 2019, at 23:11, Stan Sanderson  wrote:
> 
> Massimiliano-
> 
> Answering indirectly- I rarely fine tune Lilypond output files, but I have 
> found that setting the typeset file to SVG allows me to easily move things 
> around using Inkscape. I use a Mac and built the latest version of Inkscape 
> with the help of MacPorts. 
> 
> Stan
> 
>> On Jan 9, 2019, at 3:18 PM, Massimiliano Viel  wrote:
>> 
>> Hello everyone!
>> Just a hopefully simple question: I tried to open the pdf generated by 
>> Lilypond/Frescobaldi with Illustrator and Affinity Design for  fine tuning.
>> Of course I met the problem that some fonts were missing (almost everyone 
>> with Designer!).
>> Therefore I’m in search of the proper fonts to install so that they are 
>> available to the DTP programs I use.
>> Can anybody please point me to the font repository or tell me if I’m not 
>> doing it properly?
>> 
>> Thank you for any help!
>> 
>> Massimiliano
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Emmentaler & friends

2019-01-14 Thread Massimiliano Viel
Thank you for your answer.
I’ll do my best to learn Lilypond and Scheme properly, but I’ll have to do it 
step by step. Slowly.
But I’ll do it. I like Lilypond and I love the possibility to script it through 
some external language.

I have several scores to re-edit form previous versions (sometimes manuscript) 
to Lilypond… I’ll use it to learn the environment by dealing with problems as 
soon as they the appear in the scores.
Thank you again!

Massimiliano

> On 15 Jan 2019, at 00:41, Andrew Bernard  wrote:
> 
> Hi Massimilano,
> 
> Lilypond has few restrictions, but one is that it does not currently support 
> slurs across voices. Refer to the Notation Reference manual Snippets sections 
> for the topic 'Creating slurs across voices'. It shows how to use invisible 
> notes to do this.
> 
> I am compelled to say that lilypond can be made to do almost anything 
> imaginable in scores, but it is not a tool for a person in a hurry. That's 
> not the nature of it. It's a precision tool of great subtlety and power. I 
> engrave very complex scores for a colleague of the New Complexity School 
> (although he would deny this appellation).  Perhaps my scores are similar to 
> yours. They are quite some distance from the Common Era tradition which 
> lilypond is mostly based on. I found it is really worth the investment of 
> time and effort to learn Scheme and how to extend lilypond. This then gives 
> you a great deal of freedom to make quite complex constructs. And if you need 
> complex graphical work, you can always use Postscript in lilypond as well.
> 
> I'd recommend doing as much in lilypond as possible, without going outside to 
> Inkscape, because then you can make edits and changes easily - a difficult 
> workflow if using an external graphical editor. I used to use Inkscape 
> post-engraving, but abandoned it when I realised you just have to sit down 
> and learn Scheme in lilypond.
> 
> I am aware that you may be time poor, but if you are committed to lilypond 
> it's worth spending the time, step by step, learning Scheme. It will repay 
> you over and over. The best thing is that there are many very learned 
> colleagues here on the list who are always willing to answer technical 
> questions. There are no stupid questions! Once you build a library of code 
> for your special work, then you will be able to go back to being in a hurry!
> 
> 
> Andrew
> 
> 
> On Tue, 15 Jan 2019 at 09:53, Massimiliano Viel  <mailto:i...@maxviel.it>> wrote:
> Sorry for answering so late. That’s the sign of my situation… using lilypond 
> not everyday and when I do always with some urgency.
> In fact, my needs of fine tuning lilypond come from using a complex notation 
> (I wrote last scores directly with Illustrator!) while having a poor 
> knowledge of the environment. I’m sure that when I’ll master scheme I’ll be 
> able to do whatever I want, but I often don’t have the time to master what I 
> need before I need it. :-)
> 

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


list of stencils

2017-12-04 Thread Massimiliano Viel
Hi everybody,
I’m a newbie but already with a, at least for me, not elementary problem.
I want to realise a note head with the original note glyph plus a slash on hte 
note.
I’ve seen a couple of way to do it: one by overriding the note head stencil 
with a lambda function and another one by using a combine with a markup.
But, in both cases I need to modify the examples…
and here is the question:  in the first solution, which appears to me the most 
suitable one, I should modify the stencil… but where do I find a list of all 
the available stencils (such as the diagonal line)?

Thank you for all the help

Massimiliano





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: list of stencils

2017-12-04 Thread Massimiliano Viel
Hi,
at the moment I solved the problem with postscript as I couldn’t properly deal 
with the vertical lining of the note-glyph and the line of the markup (it seems 
to me difficult to move a markup over a staff).
Here is what I did:

dblacknote = {
  \once \override NoteHead.stencil = #ly:text-interface::print
  \once \override NoteHead.text = \markup {
\combine
\musicglyph #"noteheads.s2"
\postscript #"
newpath
0.13 setlinewidth
-0.3 -0.6 moveto
1.6 0.6 lineto
stroke"
  }
}

dwhitenote = {
  \once \override NoteHead.stencil = #ly:text-interface::print
  \once \override NoteHead.text = \markup {
\combine
\musicglyph #"noteheads.s1"
\postscript #"
newpath
0.13 setlinewidth
-0.3 -0.6 moveto
1.7 0.7 lineto
stroke"
  }
}

The snippet I was referring to was:
circle =
\once \override NoteHead.stencil = #(lambda (grob)
(let* ((note (ly:note-head::print grob))
   (combo-stencil (ly:stencil-add
note

   (circle-stencil note 0.1 0.8
  (ly:make-stencil (ly:stencil-expr combo-stencil)
(ly:stencil-extent note X)
(ly:stencil-extent note Y 
{ \circle c' } 

So I wanted to substitute the circle-stencil with some dash-stencil…
only… where should I look for a complete list of stencils?
Is it even a proper question?

Thank you for all the help.

massimiliano

> On 4 Dec 2017, at 18:33, Edward Neeman  wrote:
> 
> Hi Massimiliano, can you include some examples of your lilypond code? 
> 
> The list of symbols in lilypond
> http://lilypond.org/doc/v2.18/Documentation/notation/the-feta-font.en.html
> 
> Normally I would create a line as a graphic:
> \markup { \draw-line #'(2 . 1)} 
> 
> See this page
> http://lilypond.org/doc/v2.18/Documentation/notation/graphic.en.html
> 
> Best
> Edward 
> 
> --
> 
> 
> Dr. Edward Neeman
> Adjunct Instructor, South Georgia State College
> Collaborative Pianist, Valdosta State University, Georgia
> Artist Faculty, ELMS Conservatory, Jakarta
> edward.nee...@gmail.com
> www.neemanpianoduo.com
> 
>
> 
> On Dec 4, 2017 10:42 AM, "Massimiliano Viel"  wrote:
> Hi everybody,
> I’m a newbie but already with a, at least for me, not elementary problem.
> I want to realise a note head with the original note glyph plus a slash on 
> hte note.
> I’ve seen a couple of way to do it: one by overriding the note head stencil 
> with a lambda function and another one by using a combine with a markup.
> But, in both cases I need to modify the examples…
> and here is the question:  in the first solution, which appears to me the 
> most suitable one, I should modify the stencil… but where do I find a list of 
> all the available stencils (such as the diagonal line)?
> 
> Thank you for all the help
> 
> Massimiliano
> 
> 
> 
> 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: list of stencils

2017-12-04 Thread Massimiliano Viel
Thank you very much!
With time I’ll be able to get the details of it. In the meanwhile I can use it… 
and go on studying!

Best!

massimiliano

> On 4 Dec 2017, at 19:21, Edward Neeman  wrote:
> 
> Thanks for clarifying!
> 
> You'll want to look over here:
> https://github.com/lilypond/lilypond/blob/master/scm/stencil.scm
> 
> That is not the most user-friendly place to search out stencils,
> admittedly! You can also try the \displayMusic and \displayScheme
> functions to see how lilypond is processing your file.
> 
> Try starting with this:
> 
> slashedNoteHead =
> \once \override NoteHead.stencil = #(lambda (grob)
>(let* ((note (ly:note-head::print grob))
>   (combo-stencil (ly:stencil-add
> note
> 
>   (make-line-stencil 0.08 -1 -0.5 2.5 1
>  (ly:make-stencil (ly:stencil-expr combo-stencil)
>(ly:stencil-extent note X)
>(ly:stencil-extent note Y
> 
> 
> 
> Here's the relevant section in stencils.scm:
> 
> (define-public (make-line-stencil width startx starty endx endy)
> "Make a line stencil of given linewidth and set its extents accordingly."
> (let ((xext (cons (min startx endx) (max startx endx)))
> (yext (cons (min starty endy) (max starty endy
> (ly:make-stencil
> (list 'draw-line width startx starty endx endy)
> ;; Since the line has rounded edges, we have to / can safely add half the
> ;; width to all coordinates!
> (interval-widen xext (/ width 2))
> (interval-widen yext (/ width 2)
> 
> Best,
> Edward
> --
> 
> Dr. Edward Neeman
> Adjunct Instructor, South Georgia State College
> Collaborative Pianist, Valdosta State University, Georgia
> Artist Faculty, ELMS Conservatory, Jakarta
> edward.nee...@gmail.com
> www.neemanpianoduo.com
> 
> 
> On Mon, Dec 4, 2017 at 12:54 PM, Massimiliano Viel  wrote:
>> Hi,
>> at the moment I solved the problem with postscript as I couldn’t properly
>> deal with the vertical lining of the note-glyph and the line of the markup
>> (it seems to me difficult to move a markup over a staff).
>> Here is what I did:
>> 
>> dblacknote = {
>>  \once \override NoteHead.stencil = #ly:text-interface::print
>>  \once \override NoteHead.text = \markup {
>>\combine
>>\musicglyph #"noteheads.s2"
>>\postscript #"
>>newpath
>>0.13 setlinewidth
>>-0.3 -0.6 moveto
>>1.6 0.6 lineto
>>stroke"
>>  }
>> }
>> 
>> dwhitenote = {
>>  \once \override NoteHead.stencil = #ly:text-interface::print
>>  \once \override NoteHead.text = \markup {
>>\combine
>>\musicglyph #"noteheads.s1"
>>\postscript #"
>>newpath
>>0.13 setlinewidth
>>-0.3 -0.6 moveto
>>1.7 0.7 lineto
>>stroke"
>>  }
>> }
>> 
>> The snippet I was referring to was:
>> 
>> circle =
>> \once \override NoteHead.stencil = #(lambda (grob)
>> 
>>(let* ((note (ly:note-head::print grob))
>>   (combo-stencil (ly:stencil-add
>> 
>> note
>> 
>>   (circle-stencil note 0.1 0.8
>>  (ly:make-stencil (ly:stencil-expr combo-stencil)
>> 
>>(ly:stencil-extent note X)
>>(ly:stencil-extent note Y
>> 
>> { \circle c' }
>> 
>> So I wanted to substitute the circle-stencil with some dash-stencil…
>> only… where should I look for a complete list of stencils?
>> Is it even a proper question?
>> 
>> Thank you for all the help.
>> 
>> massimiliano
>> 
>> On 4 Dec 2017, at 18:33, Edward Neeman  wrote:
>> 
>> Hi Massimiliano, can you include some examples of your lilypond code?
>> 
>> The list of symbols in lilypond
>> http://lilypond.org/doc/v2.18/Documentation/notation/the-feta-font.en.html
>> 
>> Normally I would create a line as a graphic:
>> \markup { \draw-line #'(2 . 1)}
>> 
>> See this page
>> http://lilypond.org/doc/v2.18/Documentation/notation/graphic.en.html
>> 
>> Best
>> Edward
>> 
>> --
>> 
>> 
>> Dr. Edward Neeman
>> Adjunct Instructor, South Georgia State College
>> Collaborative Pianist, Valdosta State University, Georgia
>> Artist Faculty, ELMS Conservatory, Jakarta
>> edward.nee...@gmail.com
>> www.neemanpianoduo.com
>> 
>> 
>> 
>> On Dec 4, 2017 10:42 AM, "Massimiliano Viel"  wrote:
>> Hi everybody,
>> I’m a n

Re: list of stencils

2017-12-05 Thread Massimiliano Viel
Thank you very much for the help and for sharing!
I didn’t know the repository on github.
I’ll take a deep look on the whole library.

Again thank you!

Massimiliano


> On 5 Dec 2017, at 00:21, Andrew Bernard  wrote:
> 
> HI Massimiliano,
> 
> I have written a very nice slash function that covers many cases and placed 
> it in the openlilylib repository. Do take a look at it. No point re-inventing 
> that wheel!
> 
> Openlilylib is a project for things that probably should be in the baseline 
> lilypond but for various reasons are not as yet (it's complicated!).
> 
> The openlilylib code is on github:
> 
> https://github.com/openlilylib/snippets 
> <https://github.com/openlilylib/snippets>
> 
> https://github.com/openlilylib/snippets/tree/master/notation-snippets/slash-stem
>  
> <https://github.com/openlilylib/snippets/tree/master/notation-snippets/slash-stem>
> 
> It's a good idea to pull the snippets using git instead of just cutting and 
> pasting into your code. That way you can keep up to date with changes and 
> improvements.
> 
> I also have there a very nice beam slash function too.
> 
> https://github.com/openlilylib/snippets/tree/master/notation-snippets/slash-beam
>  
> <https://github.com/openlilylib/snippets/tree/master/notation-snippets/slash-beam>
> 
> I think these are quite flexible, and they have been extensively debugged.
> 
> Andrew
> 
> 
> On 5 December 2017 at 01:58, Massimiliano Viel  <mailto:i...@maxviel.it>> wrote:
> 
> I want to realise a note head with the original note glyph plus a slash on 
> hte note.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user