Re: Does the layer property not work across systems?

2018-09-11 Thread caagr98 caagr98
That does indeed look a lot prettier, but it gives me an error saying
unexpected \etc. Can \etc deal with markup like that?

So there's no way to get elements from the first system to draw over the
second. Then I guess another option is to modify the volta's stencil to
exclude those parts. Is there any way (either through Lilypond or
postscript or similar) to subtract and/or intersect two stencils/paths?


On Tue, Sep 11, 2018, 17:22 David Kastrup  wrote:

> caagr98 caagr98  writes:
>
> > I have a couple of scores with limited space. For readability, I
> > sometimes draw white outlines around overlapping elements (to cut out
> > parts of volta brackets or similar). This works fine within the same
> > system, but in some cases, the overlapping elements (an articulation
> > and a volta bracket) are in different systems. No matter what I do,
> > the volta in the second bracket draws above the articulation in the
> > first. Is there a) some way to draw things over subsequent systems,
> > and/or b) some better way to solve such overlaps without significantly
> > affecting the overall layout?
> >
> > Here's a small example of what I'm trying to do (the real version uses
> > edition engraver):
>
> I've used \etc for rewording the definition:
>
>
> Well no: systems are drawn sequentially; layering only works within a
> single system.
>
> --
> David Kastrup
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Does the layer property not work across systems?

2018-09-11 Thread caagr98 caagr98
I have a couple of scores with limited space. For readability, I
sometimes draw white outlines around overlapping elements (to cut out
parts of volta brackets or similar). This works fine within the same
system, but in some cases, the overlapping elements (an articulation
and a volta bracket) are in different systems. No matter what I do,
the volta in the second bracket draws above the articulation in the
first. Is there a) some way to draw things over subsequent systems,
and/or b) some better way to solve such overlaps without significantly
affecting the overall layout?

Here's a small example of what I'm trying to do (the real version uses
edition engraver):

```
\version "2.19.82"

whiteout =
#(define-event-function (shape) (list?)
   #{
 \tweak layer #0
 \tweak Y-offset #0
 \tweak outside-staff-priority ##f
 -\markup {
   \with-color #red % Of course, this should be white, but this is
more visible.
   \override #'(filled . #t)
   \path #0 #shape
 }
   #})

\paper {
  #(set-paper-size "a8")
  system-system-spacing.padding = #-1000 % Makes vertical spacing more
even, but encourages overlap
}

{
  \repeat volta 2 {
e1-^ -\whiteout #'(
  (moveto 0.3 -6.2)
  (rcurveto .8 -1.75 .6 -1.75 1.4 0)
  (closepath))
\break
  }
  \alternative { {
\once \override Score.VoltaBracket.layer = #-100
\once \override Score.VoltaBracket.color = #blue
R1
  } }
}
```

An image of the result is attached. As you can see, the volta bracket
(blue) is drawn over the note and outline (black + red), despite the
volta being layer #-100 and the outline #0.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: disabling \break

2018-05-09 Thread Caagr98
If you want a more lightweight way to do it, this function should also work:
⋘
removeBreaks =
  #(define-music-function (mus) (ly:music?)
 (music-filter
   (lambda (v) (not (music-is-of-type? v 'break-event)))
   mus))
⋙


On 05/08/18 14:17, Jan-Peter Voigt wrote:
> Hi Herbie,
> 
> this is *the* use case for the edition-engraver:
> https://github.com/openlilylib/edition-engraver/
> or the page-layout package
> https://github.com/openlilylib/page-layout
> (which is using the edition-engraver for the conditional breaks)
> 
> If you install openLilyLib (https://github.com/openlilylib/oll-core), you can 
> make use of these packages quite easily. That way you can separate breaks and 
> page-layout from the music-content.
> 
> So the short answer is: Yes, it is possible to add a command that avoids 
> certain breaks for certain commands.
> 
> If you want to know more about these tools don't hesitate to ask!
> 
> HTH
> Jan-Peter
> 
> 
> 
> Am 08.05.2018 um 07:50 schrieb Herbert Liechti:
>> Hello
>>
>> I searched a long time in the forum an internet and could not find an answer 
>> for my issue.
>>
>> I write all my music with lilypond and at the end I have two output targets. 
>> One is the paper form and one
>> is a page layout for the tablet. The latter layout is optimized so that the 
>> screen of the table is used with small
>> margins. I use two book sections for this
>>
>> I often do a line break at the end of each part (i.E. part A, part B, part 
>> C). For the paper output this is useful for
>> the tablet it is wasting place.
>>
>> Is it possible to add a command that skips/disables/avoids the manual breaks 
>> when creating the tablet version?
>>
>> Thanks & best regards
>> Herbie
>>
>>
>>
>> ___
>> 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

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


Book with bookpart stored in variable: expecting real number

2018-04-18 Thread Caagr98
This code:

⋘
\version "2.19.81"
bk = \book{\bookpart{\score{a}}}
\bk
⋙

gives a strange error:

⋘
GNU LilyPond 2.19.81
Processing `bpart.ly'
Parsing.../usr/share/lilypond/2.19.81/scm/lily-library.scm:243:5: In procedure 
ly:book-process in expression (process-procedure book paper ...):
/usr/share/lilypond/2.19.81/scm/lily-library.scm:243:5: Wrong type (expecting 
real number): #
⋙.

Inserting the \book{...} directly without a variable works as it should.
Replacing the \bk with $bk acts exactly the same.
#bk gives no error, but is instead silently ignored.
$((lambda () bk)) and #((lambda () bk)) act the same as their respective #bk or 
$bk variants.
The #(print-book-with-defaults) function works, but is quite clunky.

Does anyone know why all these methods fail, and what is the proper way to 
store a book in a variable?

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


Re: Is lilypond suitable for big composition projects?

2018-03-22 Thread Caagr98
In my opinion, Lilypond is excellent for writing sheet music, but not very good 
for composing. I usually use MuseScore or Qtractor for composing, then 
(manually) convert it to Lilypond to make sheet music.

On 03/22/18 16:35, Jonas Daverio wrote:
> That may seem like a stupid question, but I've been using LilyPond with 
> Frescobaldi for a year and a half, but I start to ask myself if it is as 
> efficient as if I had used another tool like Musescore.
> 
> I explain: I don't have at all a powerful computer, and I think that an 
> essential feature that I have to have to compose efficiently is to see what 
> I've written in real-time. There is such a feature in Frescobaldi name 
> "continuous engraving" (or something like that, my version is not in 
> English), but on my slow computer and with a big project such as a 20-pages 
> quartet or symphony, it takes at least 40 to 50 seconds to render.
> 
> In addition, it would be great to hear the music out of the midi file by 
> clicking on the preview (like on almost every WYSIWYG music software) but 
> Frescobaldi's midi player is pretty useless for that.
> 
> I'm not saying that LilyPond and Frescobaldi are bad, it's probably just me 
> who don't know the right tools or the right way to use them. I'm asking to 
> find a way to make my workflow more convenient to compose.
> 
> Do you have any suggestions?
> 
> Thanks!
> 
> 
> ___
> 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: Having trouble understanding optional and variable amount of arguments

2018-02-28 Thread Caagr98
I think \tempo (and a few other commands such as \repeat\alternative, \set, and 
\override) are hardcoded in the Lilypond compiler using methods not accessible 
through Scheme, so you can't make that kind of functions yourself. You can make 
functions with optional arguments, though. I think the syntax is something like 
(define-music-function (optional-int-defaults-to-4 music) ((int? 4) ly:music?) 
...).

On 02/28/18 23:54, Stefano Troncaro wrote:
> Hello everyone,
> 
> I need a little help again. I'm struggling to understand how one would make a 
> music function like \tempo, that accepts a variable number of arguments. I 
> couldn't find its definition so I couldn't look for myself.
> 
> So far I know about making lambdas that take additional arguments and store 
> the extras in a list, but this does not work in a music function (or if it 
> works I don't know how to do it). And while I could make a lambda that then 
> passes the arguments to a music function, then I can't use it with Lilypond 
> syntax, so I'm forced to put the lambda and all it's arguments between 
> parenthesis.
> 
> But \tempo doesn't require parenthesis, and the parser still understands what 
> is part of the function and what not. How would one go about writing a 
> function that behaves like this?
> 
> Thank you in advance for your help!
> Stéfano
> 
> 
> ___
> 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: scheme function returning two scores

2018-02-25 Thread Caagr98


On 02/25/18 22:24, Gianmaria Lari wrote:
> 
> 
> On 25 February 2018 at 15:05, Caagr98 <caag...@gmail.com 
> <mailto:caag...@gmail.com>> wrote:
> 
> 
> 
> On 02/25/18 14:50, David Kastrup wrote:
> > In the mean time, you could define a void function and let it just call
> > toplevel-score-handler on your scores.  Of course, this would no longer
> > allow you to place those scores in a book or bookpart.
> 
> Why not call add-score (defined in scm/lily-library.scm) instead? It 
> seems to add the score to the current book/bookpart.
> 
> 
> Dear Caagr98, if would be great if you can refer an example.
> 
> Thanks a lot!
> Ciao, Gianmaria

⋘
\version "2.19.81"
addScore = #(define-void-function (score) (ly:score?) (add-score score))

myScore = #(define-void-function (music) (ly:music?) #{
  \addScore \score { $music \layout{} }
  \addScore \score { \unfoldRepeats $music \midi{}}
#} )

\bookpart {
  \myScore {\repeat percent 2 {c' d' e' f'}}
}
\bookpart {
  \myScore {\repeat percent 2 {g c' c' c'}}
}
⋙

The (add-score) function (and the \addScore function I defined up there for 
easier syntax) adds the given score to the closest enclosing \book or \bookpart.

Keep in mind, though, that you can't do anything like this:
⋘
foo = \myScore c1
\book {
  \foo
}
⋙
That'll add the sheet and midi to the toplevel book and leave the second one 
empty.

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


Re: scheme function returning two scores

2018-02-25 Thread Caagr98


On 02/25/18 14:50, David Kastrup wrote:
> In the mean time, you could define a void function and let it just call
> toplevel-score-handler on your scores.  Of course, this would no longer
> allow you to place those scores in a book or bookpart.

Why not call add-score (defined in scm/lily-library.scm) instead? It seems to 
add the score to the current book/bookpart.

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


Re: Why do lyric extenders require an associated voice?

2018-02-16 Thread Caagr98
Okay, that makes some amount of sense (but not much). But why doesn't it give a 
warning or anything? And I still don't know why extenders need an associated 
voice in the first place.

On 02/16/18 10:49, Torsten Hämmerle wrote:
> Hi,
> 
> As soon as associatedVoice has been set to /anything/, LilyPond will pick
> the next best voice it can find.
> 
> The actual value assigned to associatedVoice is only important if there are
> multiple voices present to choose from.
> Let me illustrate that with an amended example taken from the documentation:
> 
> ~~~
> \version "2.18.2"
> 
> \score {
>   <<
> \new Staff <<
>   \new Voice = "melodyOne" {
> \relative {
>   \voiceOne
>   a'4 a a a
>   \repeat volta 2 { b4 b b b( | c b a b) }
> }
>   }
>   \new Voice = "melodyTwo" {
> \relative {
>   \voiceTwo
>   a'4 a a a
>   \repeat volta 2 { b4 b b b( | c b2.) }
> }
>   }
> >>
> \new Lyrics \lyricsto "melodyOne" {
>   Not re -- peat -- ed.
>   <<
>   { The first time words. __ }
>   \new Lyrics {
> \set associatedVoice = "bogus"
> Sec -- ond time words.  __
>   }
>   \new Lyrics {
> \set associatedVoice = "melodyTwo"
> The third time words.  __
>   }
>   >>
> }
>   >>
> }
> 
> As you can see, the "Second time words" align with melodyOne (the first to
> come in case of bogus assignment), but "The third time words" align with
> melodyTwo.
> 
> HTH,
> Torsten
> 
> 
> 
> 
> --
> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
> 
> ___
> 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


Why do lyric extenders require an associated voice?

2018-02-16 Thread Caagr98
It doesn't seem that voice is actually used for anything; setting 
assocatedVoice to "" lets extenders be used without any other apparent effects. 
So why is there such a difference between having no associated voice and having 
a nonexistent one?

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


Re: MIDI dynamics

2018-02-04 Thread Caagr98
I'd suggest either moving the DynamicsPerformer to the Staff context or 
replacing the \upper with << \upper \dynamics >> (and the same for \lower). 
Normally, dynamics only affect the voice they are in, which in your example is 
a different voice from the ones the notes are in.

On 02/04/18 01:55, Hilary Snaden wrote:
> I have been trying to get LilyPond to generate MIDI versions of some piano 
> music. The music script renders nicely, and there are no errors or warnings, 
> but the MIDI file plays with no dynamics at all. What am I doing wrong? 
> (LilyPond 2.18.2.)
> 
> \score {
>   \unfoldRepeats
>   \new Staff
>   <<
>     { \tempo 4=86 }
>     \new Voice = "v1" {
>   \set Staff.midiInstrument = "Acoustic grand"
>   \set Staff.midiMinimumVolume = #0.2
>   \set Staff.midiMaximumVolume = #0.8
>   \upper
>     }
>     \new Voice = "v2" {
>   \set Staff.midiInstrument = "Acoustic grand"
>   \set Staff.midiMinimumVolume = #0.2
>   \set Staff.midiMaximumVolume = #0.8
>   \lower
>     }
>     \new Dynamics \pianodynamics
>   >>
>   \midi { }
> }
> 
> 
> ___
> 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: Bug with tuples with rest?

2018-02-02 Thread Caagr98
1) Lilypond won't place lyrics on rests, and not on tied or slurred notes 
(except the first). Since everything in the tuplet is disqualified by one of 
those criteria, the lyric must go on the e.
2) \relative only affects the next music expression; in this case the tuplet. 
Thus, the e isn't inside the \relative, so it's absolute.

P.S. How would a slur starting on a rest be played? I've never seen that.


On 02/02/18 18:16, Markus Grunwald wrote:
> Hello,
> 
> might be that I have found a bug:
> 
> \version "2.18.2"
> 
> { { \relative c'' \tuplet 3/2 { r8( c8 d8) } e8 }
>   \addlyrics{ Bug? }
> }
> 
> 1) The text goes to the e while it should go to the tuplet
> 2) The e is not an e''
> 
> 
> 
> ___
> 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: Function or command to omit only certain accidentals of a chord?

2018-02-02 Thread Caagr98
I'm not sure if EE supports ApplyOutputEvents, but you could try something like 
this:

⋘
  \applyOutput Voice.Accidental
#(let ((n 1))
   (lambda (grob ctx1 ctx2)
 (if (= n 0)
   (ly:grob-set-property! grob 'stencil #f))
 (set! n (1- n
   % Will omit the N-th accidental (defined above; in this case 1-th, 
on the cis)
⋙

That could probably be abstracted away to a music function, but I'm uncertain 
of how grob paths work.

On 02/02/18 03:55, Stefano Troncaro wrote:
> @Jan-Peter
> 
> /this is a feature I long to implement for quite some time. This means it 
> is not possible with the EE right now.
> The following ideas came up to provide a solution: 1. add IDs to certain 
> elements and allow addressing elements b ID. 2. Add tweaks with a predicate, 
> e.g. at moment x, if NoteEvent has pitch cis'' add tweak./
> 
> 
> That is going to be a huge improvement!
> 
> 
> @David
> 
> /I have seen no comment whatsoever about what you find wrong with using/
> /\single \omit Accidental in the way I showed in the code example I gave./
> 
> 
> I'm sorry, Caagr98 proposed that solution in his/her first message, to which 
> I already replied. But I should have addressed that part of your reply 
> instead of leaving it uncommented. I apologize.
> 
> The short explanation is that I need a solution that works with Openlilylib's 
> Edition Engraver and \single \omit Accidental doesn't. This is because the 
> Edition Engraver can't yet insert a tweak inside a chord.
> 
> 
> @Thomas
> I was not aware that it was possible to write a function inside of a 
> parameter of a grob, and that before-line-breaking and after-line-breaking 
> served this purpose. The documentation describes them as booleans and "dummy 
> properties" so I never payed them mind. I'm truly surprised. When I said that 
> I didn't believe an override would do it I wasn't considering an 
> "intelligent" override. Something like this could actually work!
> 
> After looking a bit through the documentation, I found here 
> <http://lilypond.org/doc/v2.19/Documentation/internals/note_002dcolumn_002dinterface>
>  that the the note-column-interface has a note-heads property, which provides 
> an array of all the note-head grobs of the NoteColumn. I wanted to go through 
> that list and modify the grobs according to their position on the list, but I 
> am unable to get the list in the first place:
> 
> \version "2.19.80" \language "english" command = { \once \override 
> NoteColumn.before-line-breaking =
> #(lambda (this-column)
> (display (ly:grob-property this-column 'note-heads "couldn't find 
> it")))
> } \score { \new Staff { \new Voice \relative c'' { \key b \minor 
> \accidentalStyle modern \partial 4  |
>\command
> } } }
> 
> Do you think this is possible?
> 
> 
> 2018-02-01 18:49 GMT-03:00 Thomas Morley <thomasmorle...@gmail.com 
> <mailto:thomasmorle...@gmail.com>>:
> 
> 2018-02-01 16:59 GMT+01:00 Stefano Troncaro <stefanotronc...@gmail.com 
> <mailto:stefanotronc...@gmail.com>>:
> 
> > Ideally, I wanted a function
> > that I could use with the edition-engraver to tweak target elements 
> inside
> > chords. I framed the question around accidentals in the post above, but
> > ultimately I hoped to be able to use the same function (or a very 
> similar
> > one) to tweak ties of specific notes instead of being forced to use one
> > override for the whole chord, or to tweak other properties of specific 
> notes
> > should the need arise.
> 
> Well, we have
> (1) override.
> Aplied to a chord it will work on all relevant grobs found.
> One could define some selection, ofcourse.
> Like:
> command =
> \override NoteHead.before-line-breaking =
>   #(lambda (grob)
>     (let* ((cause (ly:grob-property grob 'cause))
>            (pitch (ly:prob-property cause 'pitch))
>            (alteration (ly:pitch-alteration pitch))
>            (accidental (ly:grob-object grob 'accidental-grob)))
>     (if (and (ly:grob? accidental) (eqv? alteration 1/2))
>         (ly:grob-set-property! accidental 'stencil #f
> 
> But you wrote you would prefer to address specific notes, not the whole 
> chord.
> Therefore we have:
> 
> (2) tweak
> But you didn't like the already proposed
> \single \omit Accidental
> which _is_ a tweak
> 
> (3) context-properties
> basically accidentalStayle sets context-properties.
> But ofcourse can't change other note-head-properties as 

Re: Tying chords

2018-01-31 Thread Caagr98
If you attach the tilde to the individual notes rather than the entire chord, 
that should work. That is, ` ` rather than `~ `.


On 02/01/18 00:30, Rohan Srinivasan wrote:
> Hi all,
> 
> I am tying two chords together. Is it possible to have the top tie be above 
> the note and the bottom tie to be below? 
> 
> i.e. When I use _~ the tie is below both notes and vice versa for ^~
> 
> Thanks in advance
> 
> 
> ___
> 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: Function or command to omit only certain accidentals of a chord?

2018-01-31 Thread Caagr98
In that case, you could use something like this:

⋘
\version "2.19.80"

nth =
#(define-music-function
  (n tweak mus) (integer? ly:music? ly:music?)
  (single tweak (list-ref (ly:music-property mus 'elements) n))
  mus)

{
  
  \nth 1 \omit Accidental  % Remember, zero-indexed
}
⋙

If you could be a bit more specific about your goal (hiding all sharps? Hiding 
accidentals on even-indexed notes? Hiding accidentals specifically on cis?), 
that would make it possible to make a more specific function for your goals.

(Note that this function can only be used inline, so it won't work with 
edition-engraver or similar.)


On 01/31/18 21:56, Stefano Troncaro wrote:
> I just tried it, but unfortunately it appears to only work when used inside 
> the chord, and I need to find a way to do it from outside.//
> 
> 2018-01-31 17:39 GMT-03:00 Caagr98 <caag...@gmail.com 
> <mailto:caag...@gmail.com>>:
> 
> You could try \single instead of \once, as in  cs,>.
> 
> On 01/31/18 21:27, Stefano Troncaro wrote:
> > Hello again everyone!
> >
> > Suppose I have the following example:
> >
> > \version "2.19.80" \language "english" command = { %What should go here 
> to omit the sharp while keeping the natural? } \score { \new Staff { \new 
> Voice \relative c'' { \key b \minor \accidentalStyle modern \partial 4  c,> |
> >        \command   
> >     } } }
> >
> > If for whatever reason I wanted to omit the sharp while keeping the 
> natural sign of the , obviously \once \omit Accidental won't work. I'm 
> at a loss as to how to tackle this problem, and looking through the 
> documentation hasn't helped.
> >
> > Does anyone have an idea?
> > Stéfano
> >
> >
> > ___
> > lilypond-user mailing list
> > lilypond-user@gnu.org <mailto:lilypond-user@gnu.org>
> > https://lists.gnu.org/mailman/listinfo/lilypond-user 
> <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: Function or command to omit only certain accidentals of a chord?

2018-01-31 Thread Caagr98
You could try \single instead of \once, as in .

On 01/31/18 21:27, Stefano Troncaro wrote:
> Hello again everyone!
> 
> Suppose I have the following example:
> 
> \version "2.19.80" \language "english" command = { %What should go here to 
> omit the sharp while keeping the natural? } \score { \new Staff { \new Voice 
> \relative c'' { \key b \minor \accidentalStyle modern \partial 4  |
>\command
> } } }
> 
> If for whatever reason I wanted to omit the sharp while keeping the natural 
> sign of the , obviously \once \omit Accidental won't work. I'm at a 
> loss as to how to tackle this problem, and looking through the documentation 
> hasn't helped.
> 
> Does anyone have an idea?
> Stéfano
> 
> 
> ___
> 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: Holes in spanners for tall notes

2018-01-04 Thread Caagr98
Okay, thanks for the heads-up. I guess I'll rename it to `hole` instead.

On 01/04/18 19:05, Kieren MacMillan wrote:
>> I checked with `lilypond scheme-sandbox` to see that it didn't exist...?
> 
> Lilypond contains both a function
> 
> http://lilypond.org/doc/v2.18/Documentation/snippets/editorial-annotations#editorial-annotations-blanking-staff-lines-using-the-_005cwhiteout-command
> 
> and an interface property
> 
> http://lilypond.org/doc/v2.19/Documentation/internals/grob_002dinterface
> 
> with the name 'whiteout'.
> 
> Cheers,
> Kieren.
> 
> 
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: i...@kierenmacmillan.info
> 

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


Re: Holes in spanners for tall notes

2018-01-04 Thread Caagr98
I checked with `lilypond scheme-sandbox` to see that it didn't exist...?

On 01/04/18 18:56, Kieren MacMillan wrote:
> Hi "Caagr98",
> 
>> I also made this function to add holes in the bracket (requires setting the 
>> bracket's layer to -1):
>> whiteout =
> ...
> 
> I'm not sure that redefining that particular function is your best long-term 
> plan…
> Maybe rename it to something that doesn't conflict with existing function(s)?
> Just a thought.
> 
> Best,
> Kieren.
> 
> 
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: i...@kierenmacmillan.info
> 

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


Re: Name of the command

2018-01-01 Thread Caagr98
Dammit. I did look it up in the source code, but then I wrote it wrong here.

On 01/02/18 00:19, David Kastrup wrote:
> Caagr98 <caag...@gmail.com> writes:
> 
>>> On 01/02/18 00:07, Mark Stephen Mrotek wrote:
>>>> Hello,
>>>>
>>>>  
>>>>
>>>> A command exists that allows the notes of a grace to be tied to the
>>>> following chord, e.g.,
>>>>
>>>> \grace {c8~ e~ g~} 2.
>>>>
>>>>  
>>>>
>>>> I thought it was
>>>>
>>>> \tie WaitforChord, yet that is not correct. Tried searching the manual.
>>>>
>>>>  
>>>>
>>>> Any direction appreciated.
>>
>> Are you thinking of `\set tieWaitForChord = ##t \grace {blah} blah
>> \unset tieWaitForChord`?
> 
> The very first "selected snippet" in the Ties entry in the manual is
> "Using ties with arpeggios".
> 
> It shows the correct name of the property to use.
> 

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


Re: Name of the command

2018-01-01 Thread Caagr98
Are you thinking of `\set tieWaitForChord = ##t \grace {blah} blah \unset 
tieWaitForChord`?

On 01/02/18 00:07, Mark Stephen Mrotek wrote:
> Hello,
> 
>  
> 
> A command exists that allows the notes of a grace to be tied to the following 
> chord, e.g.,
> 
> \grace {c8~ e~ g~} 2.
> 
>  
> 
> I thought it was
> 
> \tie WaitforChord, yet that is not correct. Tried searching the manual.
> 
>  
> 
> Any direction appreciated.
> 
>  
> 
> Mark
> 
> 
> 
> ___
> 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: Holes in spanners for tall notes

2018-01-01 Thread Caagr98
That works great, thanks! I need to manually override Y-offset, but that's fine.

I also made this function to add holes in the bracket (requires setting the 
bracket's layer to -1):

whiteout =
#(define-event-function (x y) (number-pair? number-pair?)
   #{
 \tweak layer #0
 \tweak Y-offset #0
 \tweak outside-staff-priority ##f
 -\markup {
   \with-dimensions #'(0 . 0) #'(0 . 0)
   \with-color #white
   \filled-box #x #y #0
 }
   #})


On 01/01/18 19:36, Trevor wrote:
> 
> 
> "Caagr98" <caag...@gmail.com> wrote 01/01/2018 18:17:37
> 
>> \repeat volta 2 {R1}
>> \alternative {
>>  {a4 a a a a a a a}
>>  {R1}
>> }
>>
>> In this example, the volta is moved very far up because of that one note. 
>> This is very ugly IMO. Is there any way to insert a hole in the line and 
>> have the note stick up over the volta?
> Yes; this override prevents the spanner from taking part in the
> outside staff ordering:
> 
> \version "2.19.80"
> {
>   \override Score.VoltaBracketSpanner.outside-staff-priority=##f
>   \repeat volta 2 {R1}
>   \alternative {
>     {a4 a a a a a a a}
>     {R1}
>   }
> }
> 
> Trevor
> 

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


Holes in spanners for tall notes

2018-01-01 Thread Caagr98
\repeat volta 2 {R1}
\alternative {
  {a4 a a a a a a a}
  {R1}
}

In this example, the volta is moved very far up because of that one note. This 
is very ugly IMO. Is there any way to insert a hole in the line and have the 
note stick up over the volta?

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


Re: include puzzlement

2017-12-29 Thread Caagr98
On 12/29/17 20:26, Carl Sorensen wrote:
> Variables can only be defined at the top level.  See the Notation Reference 
> 3.1.4

That's not entirely true. You can define variables in \paper, \layout, and 
\midi blocks too.

Also, you could use the (ly:parser-define! k v) function inside a bookpart, 
though I don't think that would provide any kind of scoping.

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


Re: Function to add articulation to all notes

2017-12-28 Thread Caagr98
I think this is as specific as I can make it:

\addArticulation \staccato {
a  % a-.   %% Plain notes should be articulated
  % -.   %% Chords should be articulated once
<> % <>%% Empty chords probably shouldn't be articulated
\foo a % a %% Some way to exclude one or more notes would be 
appreciated

a-.% a-.   %% No duplicates
a\f% a\f-. %% Non-ArticulationEvents shouldn't be affected
a-!% a-!   %% If there already is an articulation, keep it (see 
below)
a\coda % a\coda-.  %% Some articulations do make sense with others, 
though
}

I can't think of any situation where, for example, a---. would make sense (just 
write a-_), so it's probably better to turn { a b c-- d } into { a-. b-. c-- 
d-. }.
However, a->-. and a\upbow-. seem valid to me (I don't play any string 
instruments, though, so I don't know for sure).
I can think of two ways to implement this:
* Have a list of names in an external variable (like afterGraceFraction)
* Add a property to default-script-alist
Whichever way is chosen, if both the articulation to be placed and any that 
already exist match that predicate, don't add it.
The most obvious mutually exclusive articulations are '(staccato staccatissimo 
tenuto portato marcato), but there are probably others.

I don't know how ties should work - probably another default-script-alist 
property to determine whether it should be placed at the start or end of the 
tie.

I feel kinda bad for requesting this without having anything to contribute in 
return :(

On 12/28/17 21:42, David Nalesnik wrote:
> Hi,
> 
> On Thu, Dec 28, 2017 at 1:37 PM, Caagr98 <caag...@gmail.com> wrote:
>> That function seems rather destructive: removes all properties on existing 
>> articulations (including tweaks, direction, and midi stuff), and doesn't 
>> seem to handle anything other than ArticulationEvents at all. Dynamics, 
>> slurs, ties, etc are removed. Also, this version has no way to exclude a 
>> note from being articulated, unlike the earlier versions (where you can set 
>> 'articulations to an empty list to exclude it).
>>
> 
> OK, this will preserve what's already there:
> addArticulation =
> #(define-music-function (scripts music) (list? ly:music?)
>(define (add mus)
>  (let* ((art (ly:music-property mus 'articulations))
> (types (map (lambda (a) (ly:music-property a 'articulation-type))
>  art)))
>(for-each
> (lambda (x)
>   (if (not (member x types))
>   (ly:music-set-property! mus 'articulations
>(append! (ly:music-property mus 'articulations)
>  (list (make-articulation x))
> scripts)))
>(for-some-music
> (lambda (mus)
>   (cond
>((music-is-of-type? mus 'event-chord) (add mus))
>((music-is-of-type? mus 'note-event) (add mus))
>(else #f)))
> music)
>music)
> 
> {
>   \addArticulation #'("staccato" "accent") { c~ c ->\f d d' c'^! }
> }
> 
> You'll note the wrong behavior at ties.  This could be fixed with a
> bunch more code.  I should note in this connection that the original
> definition of addArticulation which you inherited is flawed in regard
> to ties::
> 
> {
>   \addArticulation \accent { c~ c } % use original definition from top of 
> thread
>   \addArticulation \staccato { c~ c }
> }
> 
> It would be helpful if you would provide a test example so we could
> get an idea of what you want to work.
> 
> Thanks,
> David
> 

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


Re: Function to add articulation to all notes

2017-12-28 Thread Caagr98
That function seems rather destructive: removes all properties on existing 
articulations (including tweaks, direction, and midi stuff), and doesn't seem 
to handle anything other than ArticulationEvents at all. Dynamics, slurs, ties, 
etc are removed. Also, this version has no way to exclude a note from being 
articulated, unlike the earlier versions (where you can set 'articulations to 
an empty list to exclude it).

On 12/28/17 19:33, David Nalesnik wrote:
> Replying to the list with removal of some redundant code:
> 
> \version "2.19.65"
> 
> addArticulation =
> #(define-music-function (scripts music) (list? ly:music?)
>(define (add mus)
>  (let* ((art (ly:music-property mus 'articulations))
> (types (map (lambda (a) (ly:music-property a 'articulation-type))
>  art))
> (types (lset-union string=? types scripts)))
>(ly:music-set-property!
> mus 'articulations (map make-articulation types
>(for-some-music
> (lambda (mus)
>   (cond
>((music-is-of-type? mus 'event-chord) (add mus))
>((music-is-of-type? mus 'note-event) (add mus))
>(else #f)))
> music)
>music)
> 
> {
>   \addArticulation #'("staccato" "accent") { c -> d c'-! }
> }
> 
> HTH,
> David
> 
> ___
> 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


Function to add articulation to all notes

2017-12-28 Thread Caagr98
Sometimes when having a long section of staccato, it's a bit tedious to add -. 
to all notes, so then it's useful to have a function which automatically adds 
an articulation to all notes. I have one such function here:

addArticulation =
#(define-music-function (event music) (ly:event? ly:music?)
   (music-map
(lambda (mus)
 (if (music-is-of-type? mus 'note-event)
  (if (not (memq 'articulations ; Don't add staccato if there already exist 
an articulation
 (map car (ly:music-mutable-properties mus
(ly:music-set-property! mus 'articulations (list event
 mus)
music))

However, this function adds the articulation to all notes in chords (leading to 
multiple staccato dots), which is not what I want. Is there any better way to 
do this?

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


Re: Auto-beaming

2017-12-14 Thread Caagr98
That gives exactly the same output as the baseMoment version.

On 12/15/17 04:26, Vaughan McAlley wrote:
> On 15 December 2017 at 12:58, Caagr98 <caag...@gmail.com 
> <mailto:caag...@gmail.com>> wrote:
> 
> I tried that at first, but it made *everything* beam together, including 
> rest+three eights or stuff containing sixteenths.
> 
> On 12/15/17 02:54, Ben wrote:
> > On 12/14/2017 8:21 PM, Caagr98 wrote:
> >> I'm currently writing some sheet music in 2/4. I'd like measures 
> containing four eights to be all beamed together, but everything except that 
> should use Lilypond's default rules. How can I achieve this?
> >>
> >> ___
> >> lilypond-user mailing list
> >> lilypond-user@gnu.org <mailto:lilypond-user@gnu.org>
> >> https://lists.gnu.org/mailman/listinfo/lilypond-user 
> <https://lists.gnu.org/mailman/listinfo/lilypond-user>
> >
> > I am not 100% sure about this, but just did a quick mock up by memory
> > (I don't do a lot of beaming like this but...hopefully it's a start)
> >
> > Does this work?
> >
> > \version "2.19.80"
> >
> > \relative {
> >   \time 2/4
> >   a'8^"default" a a a a a a a
> >   \set Timing.beamExceptions = #'()
> >   \set Timing.baseMoment = #(ly:make-moment 1/2)
> >  
> >   a8^"changed" a a a a a a a
> >  
> > }
> >
> > (see attached)
> >
> >
> >
> >
> > ___
> > lilypond-user mailing list
> > lilypond-user@gnu.org <mailto:lilypond-user@gnu.org>
> > https://lists.gnu.org/mailman/listinfo/lilypond-user 
> <https://lists.gnu.org/mailman/listinfo/lilypond-user>
> >
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org <mailto:lilypond-user@gnu.org>
> https://lists.gnu.org/mailman/listinfo/lilypond-user 
> <https://lists.gnu.org/mailman/listinfo/lilypond-user>
> 
> \set Timing.beamExceptions =
> \beamExceptions { 8 [ 8 8 8 ] }
> 
> …should do what you want.
> 
> Vaughan
> 
> 
> 
> 
> ___
> 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: Auto-beaming

2017-12-14 Thread Caagr98
I tried that at first, but it made *everything* beam together, including 
rest+three eights or stuff containing sixteenths.

On 12/15/17 02:54, Ben wrote:
> On 12/14/2017 8:21 PM, Caagr98 wrote:
>> I'm currently writing some sheet music in 2/4. I'd like measures containing 
>> four eights to be all beamed together, but everything except that should use 
>> Lilypond's default rules. How can I achieve this?
>>
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> I am not 100% sure about this, but just did a quick mock up by memory
> (I don't do a lot of beaming like this but...hopefully it's a start)
> 
> Does this work?
> 
> \version "2.19.80"
> 
> \relative {
>   \time 2/4
>   a'8^"default" a a a a a a a
>   \set Timing.beamExceptions = #'()
>   \set Timing.baseMoment = #(ly:make-moment 1/2)
>  
>   a8^"changed" a a a a a a a
>  
> }
> 
> (see attached)
> 
> 
> 
> 
> ___
> 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


Auto-beaming

2017-12-14 Thread Caagr98
I'm currently writing some sheet music in 2/4. I'd like measures containing 
four eights to be all beamed together, but everything except that should use 
Lilypond's default rules. How can I achieve this?

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


Re: Font for headers

2017-12-13 Thread Caagr98
This should work:

\paper {
  bookTitleMarkup = \markup \sans \bookTitleMarkup
}

You might also want to modify `scoreTitleMarkup`, `oddHeaderMarkup`, and 
`evenHeaderMarkup` the same way.


On 12/13/17 16:58, Edward Neeman wrote:
> I apologize if this is an obvious question: is there a way to set a font for 
> headers only? One that applies to all header elements but not the score. 
> 
> Thanks, 
> 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 
> 
>    
> 
> 
> ___
> 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: DrumVoice vs non-existent RhythmicVoice

2017-12-13 Thread Caagr98
A DrumVoice has different musical content than a Voice (uses the `drum-type` 
NoteEvent property rather than `pitch`, generating different midi output, etc). 
However, a RhythmicStaff only changes how the staff looks, not the actual 
musical content. Thus, there's no need for a separate RhythmicVoice context for 
it.


On 12/13/17 10:04, Menu Jacques wrote:
> Hello Folks,
> 
> There exists DrumStaff and RythmicStaff and DrumVoice, but no RhythmicVoice.
> 
> In the example below from musicxml2ly, '\context Voice’ is used in the 
> RhythmicStaff.
> 
> Any reason for this asymmetry?
> 
> JM
> 
> —
> 
> \version "2.19.58"
> % automatically converted by musicxml2ly from 73a-Percussion.xml_inter.xml
> 
> 
> \header {
> texidoc =
> "Three types of percussion staves: 
>   A five-line staff with bass clef for Timpani, a five-line staff 
> with 
>   percussion clef, and a one-line percussion staff with only 
> unpitched 
>   notes."
> }
> 
> \layout {
> \context { \Score
> autoBeaming = ##f
> }
> }
> PartPOneVoiceOne =  \relative e {
> \clef "bass" \key c \major \numericTimeSignature\time 4/4 | % 1
> e1 ~ | % 2
> e2 a,2 \bar "|."
> }
> 
> PartPTwoVoiceOne =  \relative e'' {
> \clef "percussion" \key c \major \numericTimeSignature\time 4/4 | % 1
> e2. c4 | % 2
> d1 \bar "|."
> }
> 
> PartPThreeVoiceOne =  \relative f' {
> \clef "percussion" \stopStaff \override Staff.StaffSymbol.line-count
> = #1 \startStaff \numericTimeSignature\time 4/4 | % 1
> f2. f4 | % 2
> e1 \bar "|."
> }
> 
> 
> % The score definition
> \score {
> <<
> 
> \new Staff
> <<
> \set Staff.instrumentName = "Timpani"
> \set Staff.shortInstrumentName = "Timp."
> 
> \context Staff <<
> \mergeDifferentlyDottedOn\mergeDifferentlyHeadedOn
> \context Voice = "PartPOneVoiceOne" {  \PartPOneVoiceOne }
> >>
> >>
> \new StaffGroup
> <<
> \new DrumStaff
> <<
> \set DrumStaff.instrumentName = "Cymbals"
> \set DrumStaff.shortInstrumentName = "Cym."
> 
> \context DrumStaff <<
> \mergeDifferentlyDottedOn\mergeDifferentlyHeadedOn
> \context DrumVoice = "PartPTwoVoiceOne" {  
> \PartPTwoVoiceOne }
> >>
> >>
> \new RhythmicStaff
> <<
> \set RhythmicStaff.instrumentName = "Triangle"
> \set RhythmicStaff.shortInstrumentName = "Tri."
> 
> \context RhythmicStaff <<
> \mergeDifferentlyDottedOn\mergeDifferentlyHeadedOn
> \context Voice = "PartPThreeVoiceOne" {  
> \PartPThreeVoiceOne }
> >>
> >>
> 
> >>
> 
> >>
> \layout {}
> % To create MIDI output, uncomment the following line:
> %  \midi {\tempo 4 = 100 }
> }
> 
> 
> 
> ___
> 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: DrumStaff vs Staff for instrument name

2017-12-13 Thread Caagr98
In `engraver-init.ly` (line 111 on my version), there is a line saying `\alias 
"Staff"`. That line makes the DrumStaff context listen to `\set Staff.*` as 
well as `\set DrumStaff.*`. (DrumVoice is similarly aliased to Voice.)

They're both equal, so I'd recommend using `Staff.*` for consistency. If there 
happen to be some properties that only exist in DrumStaff/Voice (such as 
drumStyleTable), I'd use them explicitly, but generally, I prefer the plain 
versions.

On 12/13/17 09:55, Menu Jacques wrote:
> Hello folks,
> 
> In the example below, using Staff.instrumentName makes no difference compared 
> to DrumStaff.instrumentName.
> 
> Are both equivalent, or should DrumStaff.instrumentName clearly be preferred?
> 
> Thanks for your help!
> 
> JM
> 
> —
> 
> \version "2.19"
> 
> 
> P_PTwo_Staff_One_Voice_One = \relative {
>   \key c \major
>   \numericTimeSignature \time 4/4
>   \clef "percussion"
>   \once \override NoteHead #'style = #'cross 2. \once \override NoteHead 
> #'style = #'cross 4 | % 2
>   \once \override NoteHead #'style = #'cross 1 \bar "|." |
> }
> 
> \score {
>   <<
> \new DrumStaff = "P_PTwo_Staff_One" <<
>   \set Staff.instrumentName = "Cymbals"
>   \context DrumVoice = "P_PTwo_Staff_One_Voice_One" <<
> \P_PTwo_Staff_One_Voice_One
>   >>
> >>
> 
> \new DrumStaff = "P_PTwo_Staff_One" <<
>   \set DrumStaff.instrumentName = "Cymbals"
>   \context DrumVoice = "P_PTwo_Staff_One_Voice_One" <<
> \P_PTwo_Staff_One_Voice_One
>   >>
> >>
>   >>
> 
>   \layout {
>   }
> 
> }
> 
> 
> 
> ___
> 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: Japanese text with furigana

2017-12-06 Thread Caagr98
That works for that particular example, yes. Doesn't work for anything other 
than exactly two kana per kanji, though.

On 12/06/17 23:50, Carl Sorensen wrote:
> 
> 
> On 12/6/17, 2:00 PM, "Caagr98" <caag...@gmail.com> wrote:
> 
> I'm trying to insert a bit of Japanese text in some markup. Putting the 
> text itself works fine, but as soon as I try adding furigana (small kana 
> above the kanji), it looks terrible. Is there anything I can do about that?
> 
> 
> Since the kanji should be perfectly aligned in a row, I did this.
> 
> \version "2.19.80"
> 
> #(define-markup-command (furi layout props kanji kana) (markup? markup?)
>(interpret-markup layout props
>  (markup
>   (#:override '(baseline-skip . 0)
> #:center-column
>  (#:magnify 1/2 kana
>   kanji)
> 
> \markup {
>   \box 一番 % Works fine
> }
> 
> \markup {
>   \box \concat { % Terribly misaligned
> \furi 一 "いち"
> \furi 番 "ばん"
>   }
> }
> 
> \markup {
>   \box \concat { % Seems OK to me
> \furi "一番" "いちばん"
>   }
> }
> 
> 
> Hope this helps,
> 
> Carl
> 
> 
> 

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


Japanese text with furigana

2017-12-06 Thread Caagr98
I'm trying to insert a bit of Japanese text in some markup. Putting the text 
itself works fine, but as soon as I try adding furigana (small kana above the 
kanji), it looks terrible. Is there anything I can do about that?

——

\version "2.19.80"

#(define-markup-command (furi layout props kanji kana) (markup? markup?)
   (interpret-markup layout props
 (markup
  (#:override '(baseline-skip . 0)
#:center-column
 (#:magnify 1/2 kana
  kanji)

\markup {
  \box 一番 % Works fine
}

\markup {
  \box \concat { % Terribly misaligned
\furi 一 "いち"
\furi 番 "ばん"
  }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: sesqui-flat spelling

2017-11-22 Thread Caagr98
You can add your own language which contains those two aliases:

#(define a (assoc-ref language-pitch-names 'nederlands))
#(set! a (acons 'aseh (ly:make-pitch -1 5 THREE-Q-FLAT) a))
#(set! a (acons 'eseh (ly:make-pitch -1 2 THREE-Q-FLAT) a))
#(set! language-pitch-names (acons 'nederlands2 a language-pitch-names))
#(note-names-language "nederlands2")

{a aeseh aseh e eeseh eseh}

On 11/22/17 04:37, Edward Neeman wrote:
> Hello all,
> 
> I've gotten quite used to the fact that "as" is A flat and "es" is E
> flat in Lilypond. Is there a reason why sesqui-flats need to be
> spelled aeseh and eeseh (instead of the abbreviated "aseh" or "eseh")?
> 
> This is not a huge issue, though it is annoying that Frescobaldi isn't
> aware that these abbreviations aren't accepted. So if I convert
> relative to absolute pitch in Frescobaldi, it changes my aeseh's to
> aseh's, and I need to search and replace to be able to compile again.
> 
> Thanks!
> 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
> 
> ___
> 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: How to make multiple synced lassez-vibres?

2017-11-21 Thread Caagr98
This seems to work, thanks!

\version "2.19.80"
{
  \clef F
  \key bes \major
  \time 3/4
  \set tieWaitForNote=##t
  f,8_~[ c_~ g_~ bes_~ es'_~ g'^~]|
  \grace { \once \hideNotes <f, c g bes es' g'>8 } R2.|
}

On 11/21/17 14:54, David Kastrup wrote:
> Caagr98 <caag...@gmail.com> writes:
> 
>> Yeah, I realize I can change the length, but they still won't go under
>> each other. Lily instead places them sequentially, which just wastes a
>> lot of space without doing anything good.
>>
>> If there is some way to make ties not require the connected note to be
>> directly after, I think it would be fairly easy to replicate this
>> using some invisible grace notes. Do you know if there is any such
> 
> Look at the tieWaitForNote context property.  It would still be nice not
> to have to use (omitted) notes as anchor but something that has, say, a
> tie-ending interface.  Would likely be easier to get to position nicely.
> 
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How to make multiple synced lassez-vibres?

2017-11-21 Thread Caagr98
Yeah, I realize I can change the length, but they still won't go under each 
other. Lily instead places them sequentially, which just wastes a lot of space 
without doing anything good.

If there is some way to make ties not require the connected note to be directly 
after, I think it would be fairly easy to replicate this using some invisible 
grace notes. Do you know if there is any such function?

On 11/21/17 14:43, Ben wrote:
> 
> On 11/21/2017 8:40 AM, Caagr98 wrote:
>> It's better, but they still don't extend to the end of the bar.
>>
>> Also, I prefer creating new variants of commands rather than modifying 
>> existing ones when possible:
>>
>> lv = \tweak stencil #enlarged-extent-laissez-vibrer::print \laissezVibrer
>>
>>
>>
> 
> Hi,
> 
> You can rename it or use a variable and re-assign it how you wish. I just 
> copied the code from where I saved it.
> The thread can be found here.
> http://lilypond.1069038.n5.nabble.com/Default-length-of-laissezvibrer-ties-td10440.html
> 
> 
> Also, you can tweak the factor to change the length. It's a very handy 
> function. You can make it as long as you want, really.
> 
> 
> 
> 
> ___
> 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: How to make multiple synced lassez-vibres?

2017-11-21 Thread Caagr98
It's better, but they still don't extend to the end of the bar.

Also, I prefer creating new variants of commands rather than modifying existing 
ones when possible:

lv = \tweak stencil #enlarged-extent-laissez-vibrer::print \laissezVibrer


On 11/21/17 14:34, Ben wrote:
> On 11/21/2017 8:28 AM, Caagr98 wrote:
>> In the attached image, it looks like several LVs streched to the barline. 
>> However, if I simply try to write the notes with LVs, the arc is 
>> ridiculously short (see second image). How can I make that look proper?
>>
>> I could replace it with a pedal, but I want to replicate it as faitfully as 
>> possible.
>>
> 
> I don't need to do this often, but this code I saved from a while ago on the 
> mailing list - how does this look?
> (see attached)
> 
> 
> #(define factor 2)
> 
> #(define (enlarged-extent-laissez-vibrer::print grob)
>   (let* ((stil (laissez-vibrer::print grob))
>  (stil-ext (ly:stencil-extent stil X))
>  (stil-length (interval-length stil-ext))
>  (new-stil-length (* stil-length factor))
>  (scale-factor (/ new-stil-length stil-length))
>  (new-stil (ly:stencil-scale stil scale-factor 1))
>  (new-stil-ext (ly:stencil-extent new-stil X))
>  (x-corr (- (car stil-ext) (car new-stil-ext
>   (ly:stencil-translate-axis
>  new-stil
>  x-corr
>  X)))
> 
> #(assoc-set! (assoc-ref all-grob-descriptions 'LaissezVibrerTie)
> 'stencil enlarged-extent-laissez-vibrer::print)
> 
> \relative c' {
>     \laissezVibrer
> }
> 
> 
> ___
> 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


How to make multiple synced lassez-vibres?

2017-11-21 Thread Caagr98
In the attached image, it looks like several LVs streched to the barline. 
However, if I simply try to write the notes with LVs, the arc is ridiculously 
short (see second image). How can I make that look proper?

I could replace it with a pedal, but I want to replicate it as faitfully as 
possible.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Tidying Score

2017-11-17 Thread Caagr98
That looks like you're creating a new score for the third line. It has 
indentation, no measure number, a new clef without a courtesy clef, etc.. It 
looks like you intended to place both staves in parallel inside a PianoStaff, 
but you've somehow put them in different \score blocks instead.

On 11/17/17 20:01, Vivyan wrote:
> I'm just starting writing music using lilypond. Im getting this problem where
> my staves arn't lining up how can I fix this?
> 
>  
> 
> 
> 
> --
> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
> 
> ___
> 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: midi volume single note

2017-11-14 Thread Caagr98
You could also generate it dynamically at runtime, with something like this 
(please note that I haven't tested it):

gradual = #(define-music-function (f mus) (procedure? ly:music?)
  (make-simulaneous-music
(list mus (make-sequential-music
(let ((len (lambda (l) (ly:music-length (make-sequential-music 
l
  (l '()))
  (do () ((ly:moment On 14 November 2017 at 11:30, David Kastrup <d...@gnu.org 
> <mailto:d...@gnu.org>> wrote:
> 
> Gianmaria Lari <gianmarial...@gmail.com <mailto:gianmarial...@gmail.com>> 
> writes:
> 
>     > On 13 November 2017 at 13:31, Caagr98 <caag...@gmail.com 
> <mailto:caag...@gmail.com>> wrote:
> >
> >> I was thinking of something like this:
> >>
> >> <<
> >>   { c'1 }
> >>   { s8 \set Voice.midiExpression=#0.5 s2.. Voice.midiExpression=#1 }
> >> >> c'1
> >>
> >> That is, simultaneously: a) play a note, b) wait a short while, reduce
> >> volume, wait until rest of the note is finished (2.. is 7/8 of a 
> measure),
> >> then reset to normal.
> >>
> >
> > Thank you, perfect
> >
> > In case other people need it, here it is a complete example where c1 
> note
> > is played reducing volume from maximum to minimum in step of 1/32.
> >
> > \version "2.19.80"
> > right = \fixed c'' { c1 }
> >
> > dynamics = {
> > s32 \set Voice.midiExpression=#1
> > s32 \set Voice.midiExpression=#0.96774
> > s32 \set Voice.midiExpression=#0.93548
> > s32 \set Voice.midiExpression=#0.90323
> [...]
> > }
> >
> > \score {
> >   \new Staff \with { midiInstrument = "accordion"}
> >   \new Voice <<\right \dynamics>>
> >   \midi {}
> >   \layout {}
> > }
> 
> Well, that calls for something programmatic I think.
> 
> 
> Well, I was hoping that a nice guy pop up with your nice lily/scheme code:)  
> Thanks !!!
> 
> P.S.
> I didn't wrote the long list of "s32 \set Voice.midiExpression=#x" by 
> hand; I wrote some lines of code to generate them programmatically (much less 
> practical then your code but better than write them by hand). Here it is the 
> function I used:
> 
>         public string setVolume(float duration, int resolution, float 
> volumeStart, float volumeEnd)
>         {
>             int steps = (int)((1 / duration) / (1 / (float)resolution));
>             float val = (volumeStart - volumeEnd) / (steps - 1);
>             string s = "";
>             for (int i = 1; i <= steps; i++)
>             {
>                 s += "s" + resolution.ToString()+ " " + "\\set 
> Voice.midiExpression=#";
>                 s += Math.Round(volumeStart, 5).ToString() + "\n";
>                 volumeStart -= val;
>             }
>             return s;
>         }
> 

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


Re: macro variable doesn't behave same as original?

2017-11-14 Thread Caagr98
In the first version, you're applying the \fermata post-event to the c2, which 
is perfectly valid. In the second one, you're applying it to the {...}, which 
doesn't make sense. I'm afraid I don't know any good solution, though.

On 11/14/17 13:21, Patrick Smith wrote:
> This works:
> 
> \version "2.18.2"
> \relative c' {
>   \time 2/4
>   c4 c( d) d( e) e( f) f( g) g( a) a( b) b( c) c( b) b( a) a( g) g( f) f( e) 
> e( d) d( c2)~ c2 \fermata  \bar "|."
>   layout{}
> }
> 
> This doesn't work:
> 
> \version "2.18.2"
> macrovariable = {c4 c( d) d( e) e( f) f( g) g( a) a( b) b( c) c( b) b( a) a( 
> g) g( f) f( e) e( d) d( c2)~ c2 }
> \relative c' {
>   \time 2/4
>   \macrovariable \fermata  \bar "|."
>   layout{}
> }
> 
> Why?
> 
> 
> ___
> 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: midi volume single note

2017-11-13 Thread Caagr98
I was thinking of something like this:

<<
  { c'1 }
  { s8 \set Voice.midiExpression=#0.5 s2.. Voice.midiExpression=#1 }
>> c'1

That is, simultaneously: a) play a note, b) wait a short while, reduce volume, 
wait until rest of the note is finished (2.. is 7/8 of a measure), then reset 
to normal.

On 11/13/17 13:25, Gianmaria Lari wrote:
> 
> On 13 November 2017 at 11:21, Caagr98 <caag...@gmail.com 
> <mailto:caag...@gmail.com>> wrote:
> 
> You can change `Voice.midiExpression` (0≤x≤1) in the middle of a note, 
> which changes dynamics/volume. I don't know whether you can do that to one 
> specific note without affecting other simultaneous ones, but you can just 
> create a new voice for that.
> 
> 
> I have no idea how to do that. Can you give more information or a small 
> example?

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


Re: midi volume single note

2017-11-13 Thread Caagr98
You can change `Voice.midiExpression` (0≤x≤1) in the middle of a note, which 
changes dynamics/volume. I don't know whether you can do that to one specific 
note without affecting other simultaneous ones, but you can just create a new 
voice for that.

On 11/13/17 11:16, Gianmaria Lari wrote:
> 
> 
> On 13 November 2017 at 10:57, bb  > wrote:
> 
> Changes in the MIDI volume take place only on starting a note, so 
> crescendi and decrescendi cannot affect the volume of a single note.
> 
> http://lilypond.org/doc/v2.18/Documentation/notation/creating-midi-files.html 
> 
> 
> 
> That's why I also asked  about some existing escamotage. :)
> 
> Thank you,
> g.
> 
> 
> ___
> 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: custom articulation position

2017-11-03 Thread Caagr98
What you're doing is just creating a text script, not an articulation. I use 
the following code to create a custom real articulation; you'll obviously have 
to adapt some of it to fit yours.

```
#(define (draw-unaccent grob)
   (let ((stil (make-path-stencil '(M -0.435 0.435 C -0.435 0.185 -0.250 0 0 0 
C 0.250 0 0.435 0.185 0.435 0.435) 0.13 1 1 #f))
 (dir (ly:grob-property grob 'direction CENTER)))
 (if (= dir DOWN)
   (ly:stencil-scale stil 1 -1)
   stil)))

#(define unaccent-script-alist
   (cons `("unaccent" .
 ((avoid-slur . around)
  (padding . 0.30)
  (side-relative-direction . ,DOWN)
  ))
 default-script-alist))

\layout {
  \context {
\Score
scriptDefinitions = #unaccent-script-alist
  }
}

unaccent =
  -\tweak stencil #draw-unaccent
  #(make-articulation "unaccent" 'midi-extra-velocity -30)
```

On 11/03/17 16:57, Gilberto Agostinho wrote:
> Hi all,
> 
> I am having a bit of trouble trying to create a custom articulation in
> LilyPond. At the moment I have the following code:
> 
> %
> \version "2.19.53"
> 
> doubleAccent = \markup {
>   \halign #-0.72
>   \combine
>   \musicglyph #"scripts.sforzato"
>   \raise #1.1
>   \musicglyph #"scripts.sforzato"
> }
> 
> {
>   \time 3/4
>   \stemUp
>   a-\doubleAccent
>   a'-\doubleAccent
>   a''-\doubleAccent
>   \stemDown
>   a-\doubleAccent
>   a'-\doubleAccent
>   a''-\doubleAccent
> }
> \markup{""}  % just for spacing
> {
>   \time 3/4
>   \stemUp
>   a->
>   a'->
>   a''->
>   \stemDown
>   a->
>   a'->
>   a''->
> }
> %
> 
> Outputting:
> 
>  
> 
> This does work well, but the new symbol does not automatically respond to
> the stem position like a regular accent (compare both systems above). I know
> that I can manually force their position with ^\doubleAccent and
> _\doubleAccent, but I want to ask if is there any way of doing this
> automagically. Does anyone have any suggestions?
> 
> And also, is there a way of associating a dynamic change to this new symbol
> so that it also affects the MIDI output?
> 
> Many thanks!
> Gilberto
> 
> 
> 
> --
> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
> 
> ___
> 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: rallentando/ritardando midi

2017-10-31 Thread Caagr98
I would do something like this (which is still manual, but a bit more readable):

```
<<
  {
e8^"rall." d c c c4 c
  }
  \tag midi {
\tempo 4=50 s8 \tempo 4=45 s8 \tempo 4=40 s8 \tempo 4=35 s8 %etc...
  }
>>
```

You'll have to use two scores, one of which has `\removeWithTag midi`, to make 
this work.

You could of course create a music function which generates the \tempos, but I 
wouldn't say that's worth the effort.

On 10/31/17 15:35, Gianmaria Lari wrote:
> I would like to generate midi output with some rallentando.
> 
> I made some tests with articulate script but without success and searching 
> online didn't help. Any help? And in case I have to manually "implement" a 
> rallentando is the following what I'm supposed to do or there is a better way?
> 
> \version "2.19.65"
> \score
> {
>   \fixed c' {
>     \set Score.tempoHideNote = ##t
>     \tempo 4=50 e8 \tempo 4=45 d \tempo 4=40 c \tempo 4=35 c \tempo 4=30 c4 
> \tempo 4=25 c
>   }
>   \layout { }
>   \midi { }
> }
> 
> Thank you, g.
> 
> 
> ___
> 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: Invisible note lines?

2017-10-27 Thread Caagr98
You can use \tag and \removeWithTag for that.

On 10/27/17 18:04, bb wrote:
> For a backing track I want a melody line and chords printed on a lead
> sheet - standard with lilypond.
> But a midi should have an aditional kickdrum/bassdrum for rhythm. The
> notes should not be visible on the lead sheet but to hear in the midi.
> Is it possible to add notes for midi but invisible on the print?
> 
> Certainly I can assemble one lilypond file for the lead sheet and
> another one for the midi. But that is not really smart. It is not
> comfortable to have to change two lilypond files for corrections etc.
> 
> Regards BB
> 
> 
> 
> 
> ___
> 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: guitar/bass as a transposing instrument and midi

2017-10-27 Thread Caagr98
I think you could use a combination of \transposition and \transpose. 
\transposition changes how the pitches are written, but not the midi. 
\transpose changes both.

On 10/27/17 13:50, bb wrote:
> A /transposing instrument/ is one in which the absolute pitches of the notes 
> played on the instrument are shifted up or down by a certain amount, compared 
> to how they are written in notation. \clef "treble_8" for guitar takes 
> account of, but is not always written, as that transposing property ias a 
> standard. Bass is a transposing instrument as well. \clef "bass_8"works as 
> well but I found it never written in any bass notation.
> 
> Writing tabulatures  can easily be corrected with \transpose in the  \new 
> TabStaff code section. 
> 
> That does not work the easy way for midi. The resulting midi-sound is an 
> octave higher in tone.
> 
> i cannot find a solution to lower the pitch for midi only. Every \transpose 
> alters the written notes as well. Eventually one has to write an aditinal 
> special music for midi? 
> 
> Thanks for any help, regards
> 
> I add a simple test file. Is there any soultion?
> 
> \version "2.19.65"
> guitar = \relative c {
>   \clef "treble_8"
>   r4 a b c d e f g
> }
> bass = \relative c, {
>   %\clef "bass_8"
>   \clef bass
>   a b c d e f g
> }
> \score {
>   <<
>     \new Staff  { \guitar }
>   \new Staff  {
>     %\transpose c c' % with this \transpose midi sounds to high  but 
> notation is correct
>     \bass}
>     >>
>   \layout {  }
>   \midi { }
> }
> 
> 
> 
> ___
> 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


How to resize a piano staff?

2017-10-24 Thread Caagr98
Using \magnifyStaff on the PianoStaff context gives the following error:
/usr/share/lilypond/2.19.65/scm/music-functions.scm:2513:19: In procedure 
ly:context-property in expression (ly:context-property Staff (quote 
magnifyStaffValue)):
/usr/share/lilypond/2.19.65/scm/music-functions.scm:2513:19: Wrong type 
argument in position 1 (expecting Context): #f

Using \magnifyStaff on the two constituent staves causes an uncomfortably large 
gap between the staves.

What's the best way to do this?

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


\magnifyStaff on PianoStaff

2017-10-24 Thread Caagr98
What's the best way to change the size of a PianoStaff? Trying to put 
`\magnifyStaff` on the PianoStaff causes the following error:
/usr/share/lilypond/2.19.65/scm/music-functions.scm:2513:19: In procedure 
ly:context-property in expression (ly:context-property Staff (quote 
magnifyStaffValue)):
/usr/share/lilypond/2.19.65/scm/music-functions.scm:2513:19: Wrong type 
argument in position 1 (expecting Context): #f

Putting the `\magnifyMusic` on the two individual staves causes an awkwardly 
large distance between the staves.

What's the best way to do this?

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


Re: Problem with Codas

2017-09-18 Thread Caagr98

On 09/18/17 19:46, Joel C. Salomon wrote:

Omitting the coda alternative, this would be the natural way to input
repeats of the form “D.S. al Fine”.  I would suggest “\repeat ds” (and
“\repeat dc”, unless you want to add magic that recognizes the start of
a piece) as the syntax.


There is already magic that recognizes the start of the piece in volta 
repeat (no start repeat barline), so I don't see how that would be a 
problem.



––Joel C. Salomon

___
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: default midi output tempo

2017-09-17 Thread Caagr98

I think the default tempo is 60 quarters per minute, but I'm not sure.

On 09/17/17 21:58, Larry wrote:

Hi everyone!

I'm new and I'm learning as I go. I've got the Fescobaldi installed and 
my inputs are slow. I know the tempo command can speed this up but I 
could not find what the default tempo is or how it is determined. Thanks 
for your help.


Larry


___
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: Is it possible to insert a "break" in a ottava bracket?

2017-09-07 Thread Caagr98
Oops, I guess I forgot to specify what kind of break I meant... I don't 
mean a line break, but stopping the current bracket and starting a new 
one. Without the grace spacer, the two brackets are merged into one.


On 09/07/17 18:42, Robert Schmaus wrote:

Hi,

I can't imagine there's any problem at all with having a \break within 
an "ottava-zone". have you tried it?

and should it be obvious what the grace spacer is for?

Best,
Robert



Am 07.09.17 um 18:01 schrieb Caagr98:
I currently do it with the code below. It works, but it feels wrong. 
Is there some better way to do it?


```
\ottava 1
c'''4 4 4 4
\ottava 0
\grace s32
\ottava 1
d'''4 4 4 4
\ottava 0
```

___
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


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


Is it possible to insert a "break" in a ottava bracket?

2017-09-07 Thread Caagr98
I currently do it with the code below. It works, but it feels wrong. Is 
there some better way to do it?


```
\ottava 1
c'''4 4 4 4
\ottava 0
\grace s32
\ottava 1
d'''4 4 4 4
\ottava 0
```

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


Edition Engraver: apply tweak to all editions

2017-09-04 Thread Caagr98
Sometimes, I want to have some tweaks that apply to only a particular 
PDF, but some that apply to all. Is there some way to do that?


With the following example, I'd like the C to be red, the E to be blue, 
and the D and F to be green. However, the green tweak isn't applied. Is 
there some way to solve this?




\version "2.19.64"

\include "oll-core/package.ily"
\loadPackage edition-engraver
\consistToContexts #edition-engraver Staff

\addEdition tweaks
\editionMod tweaks 1 0/4 "A".Staff \override NoteHead.color = #red
\editionMod tweaks 1 0/4 "B".Staff \override NoteHead.color = #blue
\editionMod tweaks 2 0/4 Staff \override NoteHead.color = #green

<<
  \new Staff \with \editionID "A" { c'1 d'1 }
  \new Staff \with \editionID "B" { e'1 f'1 }
>>


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


Re: How to write key change between double barline and repeat barline?

2017-09-03 Thread Caagr98
That is indeed a very hacky solution, but it works great. I'll probably 
want to \tag out the skip during midi generation, though. (It seems 
using graces also allows you to put multiple \marks at the same moment, 
which is neat.)


For the record, how exactly does that space-alist override work?

On 09/03/17 21:08, Thomas Morley wrote:

2017-09-03 20:48 GMT+02:00  :

Most obvious approaches would result in the key change being inside the
repeat barline, which doesn't feel right. See attached pic if you don't know
what I'm talking about.




Cheating:

   {
   r2. g4->
   \once \override Staff.KeySignature.space-alist.first-note =
 #'(fixed-space . 0)
   \grace { \bar "||" \key c \minor s32 }
   \repeat volta 2 c'8--->^"Get Back"
   }

Thanks to David K, who demonstrated it first.

HTH,
   Harm



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


Re: A note which is three measures long

2017-08-31 Thread caagr98
If you want a note that is three *whole notes* long, you could use a 
dotted \breve. If you want a note that is three *measures*, just use 
ties. Having notes that cross barlines is just confusing for everyone.


On 08/31/17 14:40, Bernhard Kleine wrote:

c\breve is two measures long, c\longa four measures.

At the end of the Kyrie from Palestrina's Missa Brevis there is a note
three measure long. Is there any way to do that simply?

Regards Bernhard



___
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


Is it possible to insert pitch bends in the MIDI output?

2017-08-26 Thread caagr98
There are some properties such as midiExpression and midiPanPosition (or 
whatever it's called); does something similar exist for bends? Or is 
there some other way to insert bends?


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


Re: numbers in lyrics

2017-08-18 Thread caagr98

Can't you just surround it with quotes?

On 08/18/17 14:14, bb wrote:

I tried to write
"Cmaj7"
in lyrics mode under a Cmaj7 chord. Lilypond obviously interprets the 7
as a lenght? Is there a solution?

Regards BB

___
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


Why is skipTypesetting so loud?

2017-08-10 Thread caagr98
When using \set skipTypesetting, stderr is *flooded* with messages 
saying `programming error: asked to compute volume at ...`, `programming 
error: no current dynamic`, and `continuing, cross fingers`. This makes 
it rather difficult to see if there are any actual errors, since those 
are printed before the five thousand lines of spam.


It's fairly trivial to write a wrapper script to remove those lines, but 
the fact that the spam exists at all bothers me. It didn't exist in 
2.18. Why does it exist now?


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


Re: Understanding how \tag works in \relative pitched music

2017-08-05 Thread caagr98
Huh, can't say I've heard of \fixed. I always use \transpose c c'', 
which seems to have the same effect. It looks stupid in the code, though.


And yeah, absolute mode is a lot easier than relative. If I want to 
duplicate a measure, I prefer just duplicating it instead of having to 
adjust the octave.


On 08/05/17 14:02, Kieren MacMillan wrote:

Hi Guy,


Which suggests that \tag used with \relative will never work.


Whether or not your conclusion is technically accurate — others will be more 
qualified to confirm or correct — the unpredictability of \relative with \tag 
(which I used to use heavily, before finding the edition-engraver) was one of 
the principal reasons I abandoned the use of \relative in all my music some 
years ago, after almost a decade of using it exclusively. There are many, many 
other reasons I'm glad I switched to absolute (and \fixed), but this was a main 
one.

You might consider doing the same? Editors like Frescobaldi make it easy to 
switch code back and forth between relative and absolute — even so, I've never 
found a reason to go back to relative once I've converted any [legacy] code to 
absolute. (On rare occasions, I'll use \fixed.). I can say with great 
confidence that a measurable chunk of my frustration with Lilypond disappeared 
along with \relative.

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
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: elementary macro problem

2017-07-21 Thread caagr98
How about \repeat volta 2 { c1 d1 e1 \alternative {{d1} {f1}} }? IMO, 
that makes more sense both syntactically and semantically - the way I 
see it, that example is four measures repeated, with the last measure 
being different. With the current syntax, it's three measures repeated, 
and... wtf is going on there at the end? It doesn't make sense.


That would also allow support for volta brackets in the middle of a 
repeat without fiddling with repeat-commands, and would allow it to work 
with \unfoldRepeats as well. I can't say I've ever seen that notation in 
the wild, but its meaning is rather obvious IMO, and either way, 
flexibility is usually a good thing.


The only problem I see with that syntax would be placing the repeat 
barline correctly between the last volta brackets, but there are far 
more complicated pieces of magic already. There's also the problem of 
backwards compatibility to consider. I don't know what Lilypond's stance 
is on that.


On 07/21/2017 04:36 PM, David Kastrup wrote:

Basically, to give \repeat the kind of pliability that music functions
enjoy, one would need to come up with different syntax/semantics for
alternatives.


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


Re: elementary macro problem

2017-07-21 Thread caagr98
If you're using 2.19, you might be able to use `thrice = \repeat unfold 
3 \etc`. Otherwise, you'll have to use the explicit version.


On 07/21/2017 04:22 PM, David Griffel wrote:
I'm a fairly inexpert lilypond user. I've used simple macros before, but 
this one fails:


thrice = \repeat unfold 3

it produces an error message:  error: unknown escaped string: `\thrice'

Minimal example:
   thrice = \repeat unfold 3
   {\thrice {a b } }

The same thing happens if I drop the 3 and try to define rept = \repeat 
unfold.


The Notation Manual 3.4.4 says "... So far we’ve seen static 
substitution – when LilyPond sees \padText, it replaces it with the 
stuff that we’ve defined it to be (ie the stuff to the right of padtext=)."


It then goes on to

padText =
#(define-music-function
  (parser location padding)
  (number?)
#{
  \once \override TextScript.padding = #padding
#})


which looks more sophisticated than I need.  I just want a short 
abbreviation of \repeat unfold

Maybe that's not possible without learning a good deal more?

David


___
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: Output to single PDF and multiple MIDI files

2017-07-20 Thread caagr98
I did just that a while ago. Here's the script I used (I had a few 
additional parameters, though):


```
#(define (movement title suffix music)
  (list
#{\bookpart {
  \header { title = #title }
  \score { \removeWithTag midi $music \layout {} }
}#}
#{\book {
  \header { title = #title }
  \bookOutputSuffix #suffix
  \score { \removeWithTag midi $music \layout {} }
  \score { \unfoldRepeats \removeWithTag nomidi $music \midi {} }
}#}
  ))

$@(movement "Part 1" "part_1" partOne)
$@(movement "Part 2" "part_2" partTwo)
$@(movement "Part 3" "part_3" partThree)
```

This places each part on a new page, though, due to using \bookparts. If 
you don't want that, you could add each \score to a list and then insert 
each of them into a \book at the end.



On 07/20/2017 11:40 PM, Jérôme Plût wrote:

I am typesetting a multi-movement work. I want the paper output to be
in a single file (say work.pdf) and the MIDI output to be in separate
files (work-1.pdf, work-2.pdf). Is there a simple and local way to do
this?

I can do it in a not-simple-enough way:

first = \relative { c'4 c c c }
second = \relative { c'4 d e f }

\book {
   \score { \new Staff << \first >> }
   \score { \new Staff << \second >> }  % here
}
\book { \bookOutputSuffix "1"
   \score { \new Staff << \first >> \midi { } } }

\book { \bookOutputSuffix "2"
   \score { \new Staff << \second >> \midi { } } } % and here

However, this is not *local*. What I mean is that if I want to comment
out, say, the second movement (for a test run), I need to comment two
places at once (marked “here” “and here” in the source above). For
consistency and efficiency, I want all lines relating to a single
movement to be grouped together. Besides, I also have some reasons to
want to group the source of the music with the \score commands; my
preferred file structure would be:

% first movement
music = \relative { ... }
\score { ... } % paper output to work.pdf
\score { ... } % MIDI output to work-1.midi

% second movement
music = \relative { ... }
\score { ... } % paper output appended to work.pdf
\score { ... } % MIDI output to work-2.midi


I also tried a variant, resetting the name of the book:

\book { \bookOutputName "work" \score { \new Staff << \first >> } }
\book { \bookOutputName "work" \score { \new Staff << \second >> } }

There would be two consistent ways to act here: the second score
could either overwrite the first one or add some extra pages.
(Concatenation would be more useful, obviously). However lilypond
chooses a bizarre third option: the code above produces two files
named work.pdf and work-1.pdf .

Does this problem have any solution?

Thanks,

--
 Jérôme Plût

___
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: What is LilyPond's default font for titles?

2017-07-20 Thread caagr98
According to `strings whatever.pdf|grep FontName`, the only fonts in the 
output PDF are Emmentaler and Tex Gyre Schola. Since Emmentaler is for 
music symbols, it's probably Tex Gyre Schola (bold, in the case of titles).


On 07/20/2017 08:56 PM, Reilly Farrell wrote:
For editing and consistency purposes, can anyone tell me what font 
LilyPond uses to print title information in its pdfs by default?  Based 
on the documentation, I'm wondering if it might be New Century 
Schoolbook in the roman (serif) font family - is this correct?


Thank you!


___
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: Parse scheme ast

2017-07-20 Thread caagr98
I have no idea what that specific AST comes from (did you invent it 
yourself?), but I think you're looking for (make-music) expressions, 
which are what is created from music expressions before being passed to 
the engravers. Check out \displayScheme (or (display-scheme-music) 
(talking about lisp inside parens is awkward)) and 
http://lilypond.org/doc/v2.19/Documentation/internals/music-expressions 
for more info.


On 07/20/2017 04:40 PM, Hlöðver Sigurðsson wrote:

Hi lilyponders,

I'm looking to find a way to transpile code to lilypond, I know how to 
generate an ast like this


((context . 0) (class . CreateContext) (unique . 1) (ops) (type . Score) 
(id . "\\new"))
((context . 1) (class . CreateContext) (unique . 2) (ops) (type . 
StaffGroup) (id . "\\new"))
((context . 2) (class . CreateContext) (unique . 3) (ops) (type . Staff) 
(id . "\\new"))
((context . 3) (class . CreateContext) (unique . 4) (ops) (type . Voice) 
(id . ""))


but I have no idea where in GUILE/lilypond this would get parsed to 
output. Some hints where to get started?



___
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: Can't use edition engraver to place \time and \tempo

2017-07-12 Thread caagr98
I would suggest adding separate functions for adding standalone text 
grobs. Would make a lot more sense than handling some types of objects 
differently.


On 07/12/2017 09:47 AM, Jan-Peter Voigt wrote:

Hi again,

I merged your PR, so \time and \tempo should work now. And I prepared a 
PR myself to streamline event-broadcasting. That works fine and marks 
can now be added.
With the default way for TextScript there is only one problem. I often 
add TextScript to Staff contexts when they are TODO-marks or the like. 
But other contexts don't consist the engraver to engrave them. So they 
are still created by the EE and tweaks are added while incarnating the 
grob.

I will further test the code. If it proves stable, I will merge later.

Cheers
Jan-Peter



Am 10.07.2017 um 14:33 schrieb caag...@gmail.com:
Oh, and another thing - it seems EE creates its own grobs for 
TextScripts and Marks in process-music, rather than handing them to 
the proper engraver in start-translation-timestep. This makes tweaks 
and other custom properties not work, let alone if you install a 
custom engraver for them. Moving their handling to 
start-translation-timestep seems to work fine, so why is it that way? 
(It does have the advantage of allowing multiple \marks at once, 
though.) TextScripts also don't work in the first measure if it's a 
MMR, which is weird. (Placing an empty chord before the MMR makes it 
work.)


I'm all for having a way to manually place texts/marks, but I 
personally think using the default method should be the, well, 
default. Changing it could break existing projects that rely on that 
behavior, though, which is bad.



___
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: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-10 Thread caagr98

E-ink displays are supposed to be just like normal paper, aren't they?

On 07/10/2017 03:43 PM, Wols Lists wrote:

On 10/07/17 14:28, Karlin High wrote:

On 7/9/2017 2:16 PM, Wols Lists wrote:

But out in the park, it was hard to stop the music blowing everywhere



That DOES sound like a problem. I've read of people using electronic
displays such as tablets or e-readers for displaying sheet music.
Ideally, page turns could be accomplished in one tap of the screen, or
even by foot pedals. Example here, GVIDO e-ink sheet music reader from
Japan: http://www.gvido.tokyo/ Looks good to me, even if the English
website needs translation help some places. And I'm sure there would be
technical concerns and device costs to consider - like $1,600 USD
multiplied by number of band members? Ouch.


Have you ever tried reading a mobile phone in bright sunlight :-)

(Yes I know you can apparently get screens that aren't hard ...)

Cheers,
Wol

___
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: Can't use edition engraver to place \time and \tempo

2017-07-10 Thread caagr98
I didn't notice any timing problems with \time. Of course, if you use it 
to add a time signature somewhere weird it gets broken, but that happens 
with inserting random time signatures in the source as well. If used 
responsibly, it works fine.


My \tempo patch seems to work (needs some more testing first). Shouldn't 
be too hard to make one for \time, I hope.


Oh, and another thing - it seems EE creates its own grobs for 
TextScripts and Marks in process-music, rather than handing them to the 
proper engraver in start-translation-timestep. This makes tweaks and 
other custom properties not work, let alone if you install a custom 
engraver for them. Moving their handling to start-translation-timestep 
seems to work fine, so why is it that way? (It does have the advantage 
of allowing multiple \marks at once, though.) TextScripts also don't 
work in the first measure if it's a MMR, which is weird. (Placing an 
empty chord before the MMR makes it work.)


I'm all for having a way to manually place texts/marks, but I personally 
think using the default method should be the, well, default. Changing it 
could break existing projects that rely on that behavior, though, which 
is bad.


On 07/10/2017 01:38 PM, Jan-Peter Voigt wrote:

Hi there,

yes the edition-engraver does not able to insert time and tempo. I 
decided not to include \time, because it would mess with the timing and 
therefore with addressing elements in time. \tempo is just not 
implemented (yet). So if you can provide a reasonable pull request I 
will be happy to merge!
About the \time thing: It should be possible to integrate it, but it 
stays problematic for the mentioned reasons. Perhaps warning messages 
are sufficient while allowing \time for edition-mods.


Jan-Peter

___
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: Can't use edition engraver to place \time and \tempo

2017-07-10 Thread caagr98
After some research, it seems edition engraver only _pretends_ to insert 
arbitrary objects - it actually only supports a select few types of 
objects. Not including \tempo and \time. \time can be worked around 
rather easily (see snippet below), but for \tempo, it seems I'd have to 
modify the source code. I guess I'll try to do that, and then maybe do a 
pull request if it works.


```
timeEdit =
#(define-music-function
   (beat-structure fraction) ((number-list? '()) fraction?)
   (make-sequential-music
 ((assoc-get 'elements-callback
(assoc-get 'TimeSignatureMusic
   music-descriptions))
  (time beat-structure fraction
```

On 07/10/2017 12:49 AM, caag...@gmail.com wrote:
I'd expect the two scores created by this to be identical, but the 
second one only has the \key applied (other stuff such as \bar and <>^"" 
works too), not the \time or \tempo. What am I doing wrong?


Also, it seems only the fourth argument is used for selecting editions 
(with \editionID); what's the first argument for?


```
\version "2.19.63"
\include "edition-engraver/edition-engraver.ily"

\consistToContexts #edition-engraver Score.Staff.Voice
\addEdition time
\editionMod time 1 0/0 E.Staff \key g \major
\editionMod time 1 0/0 E.Score \time 4/4
\editionMod time 1 0/0 E.Score \tempo "Some text" 4=120
\editionMod time 2 0/0 E.Score \time 2/4
\editionMod time 3 0/0 E.Score \time 4/4

\book {
   \score { \new Staff <<
 { b'1 2 1 }
 { \key g \major \time 4/4 \tempo "Some text" 4=120 s1 \time 2/4 s2 
\time 4/4 s1}

   >> }
   \score {
 \new Staff { b'1 2 1 }
 \layout {
   \context {
 \Score
 \editionID E
   }
 }
   }
}
```


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


Can't use edition engraver to place \time and \tempo

2017-07-09 Thread caagr98
I'd expect the two scores created by this to be identical, but the 
second one only has the \key applied (other stuff such as \bar and <>^"" 
works too), not the \time or \tempo. What am I doing wrong?


Also, it seems only the fourth argument is used for selecting editions 
(with \editionID); what's the first argument for?


```
\version "2.19.63"
\include "edition-engraver/edition-engraver.ily"

\consistToContexts #edition-engraver Score.Staff.Voice
\addEdition time
\editionMod time 1 0/0 E.Staff \key g \major
\editionMod time 1 0/0 E.Score \time 4/4
\editionMod time 1 0/0 E.Score \tempo "Some text" 4=120
\editionMod time 2 0/0 E.Score \time 2/4
\editionMod time 3 0/0 E.Score \time 4/4

\book {
  \score { \new Staff <<
{ b'1 2 1 }
{ \key g \major \time 4/4 \tempo "Some text" 4=120 s1 \time 2/4 s2 
\time 4/4 s1}

  >> }
  \score {
\new Staff { b'1 2 1 }
\layout {
  \context {
\Score
\editionID E
  }
}
  }
}
```

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


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread caagr98

On 07/09/2017 11:07 PM, Thomas Morley wrote:

Hi,

please always post an (minimal) example demonstrating the problem.
I wasted some minutes to reproduce your first problem. But I was
annoyed not being able to do so. Hence I decided to try solving the
problem instead of continuing finding an code-example triggering the
problem.
You could have done this.


Yeah, I forgot; sorry about that.




That said, how about:


That seems to work (though it seems a bit difficult if there are both a 
mark, tempo, and song name). I decided to use Edition Engraver, though, 
so I won't use that script. Thanks anyway.



Cheers,
   Harm



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


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread caagr98
I guess I'll just have to go with EditionEngraver. The main reason I 
didn't use it before was that I couldn't figure out how to install it, 
but I managed to figure that out.


On 07/09/2017 07:38 PM, Simon Albrecht wrote:

On 09.07.2017 18:24, caag...@gmail.com wrote:

As you can see on the screenshot, both texts are misaligned.


That’s your opinion.

The first one, a \tempo, is placed *under* the rehearsal mark instead 
of next to it.


Well, both are placed exactly according to standard conventions: the 
center of the RehearsalMark aligned to the bar line, and the left edge 
of the MetronomeMark aligned to the note at the same moment. And since 
the former has a higher outside-staff-priority (see 
) 
it is further away from the staff.


The second one, the name of a song, is too far too the right, since 
it's attached to the note instead of the barline (it's a <>^"").


Well, you explained that one yourself. I think it’s perfectly fine like 
that (except perhaps alignment should disregard the quotes for a more 
balanced look), but if you want the text to refer to the section instead 
of the notes, the question might be “How do I combine \mark\default and 
a custom text into a single RehearsalMark?”. I don’t know that off the 
top of my head…


How can I move the texts to be next to the rehearsal mark (without 
manual adjustments)?


Write an intelligent algorithm that decides when it makes sense to shift 
one of the objects? …
What’s so bad about having a manual adjustment? I’d rather Lily were 
cleverer in such situations, but this is asking _very_ much. Maybe you 
want to separate presentation and content, so using the edition engraver 
would be a good choice.


And is there a version of <>^"" that is attached to a moment instead 
of a note, to be more semantically correct?


TextScriptEvent 
 
is a post-event, not a rhythmic-event, so no, there isn’t. But the empty 
chord solution is pretty elegant for input, isn’t it?


Best, Simon


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


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread caagr98

On 07/09/2017 06:29 PM, Jacques Menu Muzhic wrote:
> Hello caagr98,
>
> The second score in the example below can help you solve the first issue.
>
> JM.

That makes them aligned vertically, which I'm not too bothered about. It 
doesn't help with horizontal alignment, though


On 07/09/2017 06:30 PM, Jacques Menu Muzhic wrote:
> And this one for the second issue:

That's exactly the kind of manual adjustment I'd prefer to avoid.

On 07/09/2017 06:32 PM, Wols Lists wrote:

It's a bodge rather than a true fix, but try putting spaces in front of
"Slightly slower". It should shift the text to the right, and then the
rehearsal mark will drop down into the space.

Cheers,
Wol


That's clever, but still too close to "manual adjustment" for me to be 
comfortable with it.


Maybe I should look up how hairpins do, since they act pretty much the 
way I want with dynamic texts.


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


Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread caagr98
As you can see on the screenshot, both texts are misaligned. The first 
one, a \tempo, is placed *under* the rehearsal mark instead of next to 
it. The second one, the name of a song, is too far too the right, since 
it's attached to the note instead of the barline (it's a <>^"").


How can I move the texts to be next to the rehearsal mark (without 
manual adjustments)?


And is there a version of <>^"" that is attached to a moment instead of 
a note, to be more semantically correct? I think \mark is supposed to do 
that, but it only supports one mark at a time.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Increase size of headers/footers but not music

2017-06-27 Thread caagr98

On 06/27/2017 09:48 PM, Simon Albrecht wrote:
> You have to redefine bookTitleMarkup and/or scoreTitleMarkup in a
> stylesheet that you use only for the full score, and enclose the
> entire \markup expression in \markup \larger \larger {} or the like.

I tried that, but as you pointed out, it doesn't really work.
however for reasons I don’t know only the composer actually gets larger… 
Anyone know why?


Presumably because the other parts (such as the title) are specified to 
use absolute font sizes, while the composer uses the default font size.


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


Increase size of headers/footers but not music

2017-06-27 Thread caagr98
In this piece I'm writing, the headers look perfect on each individual 
part (A4), but they look ridiculously small in the full score (which is 
on an A2). Is it possible to automatically scale them without affecting 
the music, and without affecting the headers on the parts? (Aside from 
giving a slightly smaller area to lay out the music on, obviously.)


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


How do I figure out the absolute path of the file currently being executed?

2017-06-24 Thread caagr98
That is, the file where the currently executing function is defined, not 
the file it's called from.


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


Re: Circular dependencies - Deadlock

2017-06-21 Thread caagr98

On 06/21/2017 11:10 PM, Johan Vromans wrote:

If you have a non-infinite recursive include it will continue.


I think that would require solving the Halting Problem first.

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


Re: How to write anti-accent (breve)

2017-06-15 Thread caagr98

This seems to work (and is a real articulation, which I find satisfying):

```
#(define (draw-unaccent grob)
   (let ((stil (make-path-stencil
'(M -0.435 0.435
   C -0.435 0.185 -0.250 0 0 0
   C  0.250 0 0.435 0.185 0.435 0.435)
0.13 1 1 #f))
 (dir (ly:grob-property grob 'direction CENTER)))
 (if (= dir DOWN)
   (ly:stencil-scale stil 1 -1)
   stil)))

#(define unaccent-script-alist
   (cons `("unaccent" .
 ((avoid-slur . around)
  (padding . 0.30)
  (side-relative-direction . ,DOWN)
  ))
 default-script-alist))

\layout {
  \context {
\Score
scriptDefinitions = #unaccent-script-alist
  }
}

unaccent =
  -\tweak stencil #draw-unaccent
  #(make-articulation "unaccent" 'midi-extra-velocity -30)

% dashUnderscore = #unaccent
```

Thanks for the help!

On 06/15/2017 04:07 PM, Pierre Perol-Schneider wrote:

Hi caagr98,

How about:

\version "2.19"

unaccent = -\markup
   \translate #'(0.6 . 0)
   \stencil
 #(make-path-stencil
 '(M -0.435 0.435
   C -0.435 0.185 -0.250 0 0 0
   C  0.250 0 0.435 0.185 0.435 0.435)
 0.13 1 1 #f)

{
   f''^\unaccent
}


HTH, Cheers,
Pierre

2017-06-15 15:59 GMT+02:00 <caag...@gmail.com <mailto:caag...@gmail.com>>:

On 06/15/2017 03:42 PM, Kieren MacMillan wrote:

Hi caagr98,

I'd rather not have to install extra fonts for my scores to
work...


You don't have to install extra fonts — just find a font that's
already installed and has that glyph.


That's exactly what I mean - I don't want to depend on what fonts I
have installed.

Isn't there any way to do it with markup or stencils?


Of course. Change

  \markup \fontsize #1 \override #'(font-name . "Old
Standard") \char ##x23D1

to whatever drawing routine you prefer.


Considering text-interface doesn't bother flipping the symbol
upside-down, I think I'll have to replace the entire stencil. I'll
make sure to report back when I've got it to work.


Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
<http://www.kierenmacmillan.info>
‣ email: i...@kierenmacmillan.info
<mailto:i...@kierenmacmillan.info>


___
lilypond-user mailing list
lilypond-user@gnu.org <mailto:lilypond-user@gnu.org>
https://lists.gnu.org/mailman/listinfo/lilypond-user
<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: How to write anti-accent (breve)

2017-06-15 Thread caagr98

On 06/15/2017 03:42 PM, Kieren MacMillan wrote:

Hi caagr98,


I'd rather not have to install extra fonts for my scores to work...


You don't have to install extra fonts — just find a font that's already 
installed and has that glyph.


That's exactly what I mean - I don't want to depend on what fonts I have 
installed.



Isn't there any way to do it with markup or stencils?


Of course. Change

 \markup \fontsize #1 \override #'(font-name . "Old Standard") \char ##x23D1

to whatever drawing routine you prefer.


Considering text-interface doesn't bother flipping the symbol 
upside-down, I think I'll have to replace the entire stencil. I'll make 
sure to report back when I've got it to work.



Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info



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


Re: How to write anti-accent (breve)

2017-06-15 Thread caagr98
I'd rather not have to install extra fonts for my scores to work... 
Isn't there any way to do it with markup or stencils?


On 06/15/2017 03:38 PM, Kieren MacMillan wrote:

Hi caagr98,


As in https://en.wikipedia.org/wiki/Accent_%28music%29#Anti-accent_marks.
How do I write the first of those? \lheel is similar, but it's not the same.


\version "2.19.62"

unaccent =
   -\tweak stencil #ly:text-interface::print
   -\tweak text \markup \fontsize #1 \override #'(font-name . "Old Standard") 
\char ##x23D1
   -\accent

{ c''\unaccent }

If you don't have "Old Standard" installed, try to find another font containing 
that glyph.

Hope this helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info



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


How to write anti-accent (breve)

2017-06-15 Thread caagr98

As in https://en.wikipedia.org/wiki/Accent_%28music%29#Anti-accent_marks.

How do I write the first of those? \lheel is similar, but it's not the same.

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


Re: encapsulating woodwind diagrams

2017-06-13 Thread caagr98

Try removing the brackets ({ ... }) around the \markup.

On 06/13/2017 04:46 PM, Jaime Oliver La Rosa wrote:

Hi all,

I am using the following code to place diagrams in a score:

c^\markup
 \center-column {
\override #'(size . .75)
\override #'(thickness . 0.05){
\woodwind-diagram
   #'flute-b-extension
   #'((cc . (one1h three))
  (lh . (b  gis))
  (rh . (d dis ees cis c b)))
 }
   }

however, since I have several of these, I'd like to store them as 
separate encapsulated commands that I'd like to call such as


position1 = {\markup
 \center-column {
\override #'(size . .75)
\override #'(thickness . 0.05){
\woodwind-diagram
   #'flute-b-extension
   #'((cc . (one1h three))
  (lh . (b  gis))
  (rh . (d dis ees cis c b)))
 }
   }

}

And then call it in the score with

c^\position1

but I get all sorts of errors. Not sure how to proceed. Can anyone point 
me to some information?


best,

J


___
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: pushing items "through" or "beyond" other contexts

2017-06-02 Thread caagr98

Couldn't you do \new Dynamics { \alignAboveContext = "upper" s4/p }?

On 06/02/2017 09:00 PM, Kieren MacMillan wrote:

Hello all,

No compilable code/snippet here… just a thought-experiment/question for 
discussion.

Is there any way (currently possible, or relatively easily coded) that items in 
one context can be independently pushed “through” or “beyond” other contexts?

As one (obvious) example, say I start with

  \new PianoStaff <<
\new Staff = “upper” \upperStuff
\new Dynamics = “dyn” \centredDynamics
\new Staff = “lower” \lowerStuff




Now let’s say I want one particular dynamic (in the centred context) to appear 
*above* the upper staff. I would love to write

  \once \alignAboveContext = “upper” s4\p

or whatever. (Right now, I just use the edition-engraver and an extra-offset 
tweak.)

Thoughts?

Thanks,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
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: \transposition does nothing?

2017-05-31 Thread caagr98
\transposition doesn't affect the generated score, it only affects the 
midi output. To transpose the score, do \new Staff { \transposition f 
\transpose f c {...} }. (In your case, the << >> can replace the inner {}.)


On 05/31/17 19:09, Jérôme Plût wrote:

I am typing a horn part in F. In the attached file, \transposition
does nothing. Where should I put it: at the voice, Staff, Score level?
The documentation 
(http://lilypond.org/doc/v2.19/Documentation/notation/displaying-pitches#instrument-transpositions)
 is very unclear about this.

The file itself:


\version "2.19"

Ig = \relative {
   \time 4/4 \key g \major \partial 4
}
IcA = \transpose c g \relative {
   r4 R1 r8. c'16\f c4 r2 R1 d4\f r r2 R1*2 e2\p(^"soli" d) c4 r r2 R1*2 R1*5
}
\bookpart { \header { instrument = "Cor I (Fa)" }
\score { { \new Staff { \transposition f << \Ig \transposition f \IcA >> } } }
}
% note that this outputs a score in g major and not, as it should,
% in d major



Thanks,



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


Re: Predicate for a string representing an integer

2017-05-30 Thread caagr98

On 05/30/17 11:13, Jan-Peter Voigt wrote:
I doubt that checking all characters in the string are in the range 
'0'-'9' is faster then string->number.


Don't forget the optional leading hyphen, base specifiers (#x, #o, #d, 
#b), etc.


However, do keep in mind that (integer? (string->number x)) accepts 
"2/2", "1.0", "1e10", and even "1.0001" as integers, which 
might not be what you want.


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


Re: Trouble with Polyphony

2017-05-27 Thread caagr98

On 05/27/17 05:06, Jon Arnold wrote:
I'm trying to print a note simultaneous to a rest but have the rest be 
in normal \oneVoice position. (This is to illustrate a harp muffle of a 
single note.)


This is basically how I'm doing it (minus the complicated code of 
replacing the stem glyph):


<< { r8 } {\tiny \stemDown \omit Flag bes,,8} >>

The problem is that this also affects the fontsize of the rest (which 
seems odd to me since they in separate braces).


In Lilypond, braces don't indicate scopes, they just say that their 
contents are in sequential order.


Have you tried `\once`, as in `{ \once \tiny \once \voiceOne \once omit 
Flag bes,,8 }`? (I'm not sure whether `\once {\tiny \voiceOne \omit 
Flag}` works.)


You could also use `\tweak`, but that's a bit more complicated.

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


Re: multi language score

2017-05-18 Thread caagr98

http://lilypond.org/doc/v2.19/Documentation/notation/different-editions-from-one-source

That link should contain most information you need. If you want the 
scores in different PDFs, replace the `\score {...}` with `\book { 
\bookOutputSuffix "French" \score {...} }`.


On 05/18/17 10:20, Gianmaria Lari wrote:
I want to write a score with some didactical annotation in different 
language (french and italian).


In case I decide to generate two separate score, one in italian and one 
in french, what's the best way to manage the source?

Thank you, g.


___
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: How to attach markup to several notes

2017-05-09 Thread caagr98
You could also try using the technique described here: 
http://lilypond.org/doc/v2.18/Documentation/notation/expressive-marks-attached-to-notes 
, *Creating a delayed turn*.


On 05/09/17 12:36, Kaj wrote:

On 2017-05-09 at 10:47, Ivanov Dmitry wrote:

Code:

\version "2.18.2"
\relative f'{
 f8_\markup {F} 
}

How can I attach the markup to several notes, so the text was put
between them?

Something like this:

\version "2.18.2"
\relative f'{
 {f8 }_\markup {F}
}

Hi Ivanov!
I understand that you want a function which puts your text exact at the 
midpoint between the notes, but...
Else is the simplest to just displace your text some distance. But of 
course, then you have to calculate the midpoint yourself.


\version "2.18.2"
\relative f'{
  f8_\markup { \translate #'(0.8 . 0) F} 
}
Kaj



___
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: Appreciation

2017-05-08 Thread caagr98
Source please? Most search engines aren't particularly helpful when 
searching special characters.


On 05/08/17 23:28, Dave Hartley wrote:

# finally get my head around the difference between $( ) and #( ) 


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


Re: Doing some strange stuff with multi-measure rests

2017-05-05 Thread caagr98

Yeah, that seems to work, thanks!

I'd prefer if it didn't reduce the left margin, but there's no point in 
being picky. I guess it can be fixed by tweaking the X-offset and the 
scaling factor. I'm considering experimenting with modifying the stencil 
expression itself, though.


Getting the drum roll to be normal-sized is easy - just don't make it a 
grace.


As for the text inside the MMR, I think one possible way would be to 
make MMRNumber.text contain both the fermata and a whiteouted text.


On 05/05/17 14:59, Jan-Peter Voigt wrote:

Hi,

here are some hints, how might tweak the output:

   \new RhythmicStaff {
 b'1 | \afterGrace { % we place the drum-roll on a grace position
   % override the stencil for the MultiMeasure stencil
   \once \override MultiMeasureRest.stencil = #(lambda (grob) (let 
((stil (ly:multi-measure-rest::print grob)))


(ly:stencil-scale stil .5 1)))
   \mmrferm R1*2
 } { % shift the drum-roll right
 \once \override NoteColumn.force-hshift = #1 b'2:32\< } | b'1\!
   }

The drum roll is small, because its a grace - I don't know how to do it, 
but it should be easy to solve.


HTH
Jan-Peter


Am 05.05.2017 um 10:24 schrieb caag...@gmail.com:

Basically, I want to show a rest with indeterminate length for all
parts, except the drumset, which is to make undefined creepy noises, and
the cymbal, which should do a drumroll-crescendo (not sure if there's
any fancy name for that) before the rest of the parts resume playing.

I've attached an image of what I have so far, and one of what I want
(which obviously is photoshopped).

Is this possible to do? (Or is there some better way to show it that I
haven't thought of?)


(Mostly) minimal example of what I have:
```
\version "2.19.59"

mmrferm =
  \once \override MultiMeasureRestNumber.text =
\markup { \musicglyph #"scripts.ufermata" }

\layout {
  \context {
\Score
\compressFullBarRests
\override MultiMeasureRest.expand-limit = #1
  }
}

<<
  \new Staff { b'1 | \mmrferm R1*2 | b'1 }
  \new DrumStaff { b'1 | \mmrferm R1*2 | b'1 }
  \new RhythmicStaff { b'1 | \mmrferm R1*3/2 b'2:32\< | b'1\! }



```
(In the real score I create a 'MultiMeasureRestEvent explicitly to avoid
the barcheck.)


___
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


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


Doing some strange stuff with multi-measure rests

2017-05-05 Thread caagr98
Basically, I want to show a rest with indeterminate length for all 
parts, except the drumset, which is to make undefined creepy noises, and 
the cymbal, which should do a drumroll-crescendo (not sure if there's 
any fancy name for that) before the rest of the parts resume playing.


I've attached an image of what I have so far, and one of what I want 
(which obviously is photoshopped).


Is this possible to do? (Or is there some better way to show it that I 
haven't thought of?)



(Mostly) minimal example of what I have:
```
\version "2.19.59"

mmrferm =
  \once \override MultiMeasureRestNumber.text =
\markup { \musicglyph #"scripts.ufermata" }

\layout {
  \context {
\Score
\compressFullBarRests
\override MultiMeasureRest.expand-limit = #1
  }
}

<<
  \new Staff { b'1 | \mmrferm R1*2 | b'1 }
  \new DrumStaff { b'1 | \mmrferm R1*2 | b'1 }
  \new RhythmicStaff { b'1 | \mmrferm R1*3/2 b'2:32\< | b'1\! }
>>
```
(In the real score I create a 'MultiMeasureRestEvent explicitly to avoid 
the barcheck.)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Apply event function *within* music-function

2017-05-02 Thread caagr98

Wouldn't the <>\stopGroup extend the group one note too far?

On 05/02/17 10:06, Thomas Morley wrote:

2017-05-02 8:29 GMT+02:00 Urs Liska :

Hi all,

I'm trying to apply event functions to music passed into a music function
like that:

\version "2.19.57"

test =
#(define-music-function (mus)(ly:music?)
#{
  #mus \startGroup
#})

{
   \test c' d' e' f' \stopGroup
}


(of course this is not what I ultimately want to achieve, but the nucleus
from which I'll be able to continue on my own).

This fails with "error: syntax error, unexpected EVENT_IDENTIFIER". I think
it is because the #mus expression is somehow already complete (differently
from when used in regular input) and I have to somehow *apply* the
\startGroup event function to the #mus argument.

 From \displayMusic I can see that it is added as a NoteGroupingEvent to the
note's articulations, but I'd like to ask if there's a more straightforward
way to attach the event to the music than rebuilding the music expression in
Scheme.
OTOH I will want to do that for the first *and last* element in a music
expression (in order to apply the start and stop command to a sequence of
notes), so I may *have* to extract the Scheme representation anyway?

TIA
Urs




\layout {
   \context {
 \Voice
 \consists "Horizontal_bracket_engraver"
   }
}

test =
#(define-music-function (mus)(ly:music?)
#{
   <>\startGroup
   $mus
   <>\stopGroup
#})

{
   \test { c' d' e' f' }
}

Should do the trick.

Cheers,
Harm

___
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


Polymark: draw marks horizontally

2017-05-01 Thread caagr98
I'm using Polymark (LSR 976) to be able to print song names (in 
medleys), codas, etc. at the same time as rehearsal marks. However, 
using a `\polyMark Center` (or empty) at the same time as a `\polyMark 
Left` draws the Left diagonally above the Center (assuming the Left is 
defined last). I'd like to draw them horizontally instead. Basically 
what `\override Score.RehearsalMark.extra-spacing-width` does, but for 
the same column. Is this possible?


To clarify with crappy ascii art, Polymark draws:

 "Song Title"
[A]

I want:

[A] "Song Title"

Obviously, if there isn't a rehearsal mark in the same column, the Left 
should be directly above the barline.


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


Re: Is it possible to change the PDF title?

2017-04-24 Thread caagr98
`pdftitle` seems to be exactly what I was looking for. I also added 
`midititle = #pdftitle` for good measure.


On 04/25/17 02:21, Thomas Morley wrote:

2017-04-25 2:18 GMT+02:00 Thomas Morley :

2017-04-25 1:43 GMT+02:00  :

```
title = \markup {
   \concat {
 "W"
 \scale #'(15/22 . 15/22) \combine
   "o"
   \translate-scaled #'(0 . 1.2) "a"
 "ndering"
   }
}
```

This is extracted as "Wandering" (or at least that's what Atril shows).


The function doing so is markup->string.
I'll have to think whether it's the desired behaviour for combine-markup.

Though it's not likely it will ever insert brackets or "a o"->"ꜵ"


I want it to be "W[ao]ndering" (or maybe "Wꜵndering"), because it's supposed
to be ambiguous.



Try:

\header {
   title = \markup
 \concat {
   "W"
   \scale #'(15/22 . 15/22) \combine
 "o"
 \translate-scaled #'(0 . 1.2) "a"
   "ndering"
 }
   pdftitle = "W[ao]ndering"
   %% or
   %pdftitle = "Wꜵndering"
}

Cheers,
   Harm


Also, see NR 3.2.3 Creating output file metadata



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


Re: Is it possible to change the PDF title?

2017-04-24 Thread caagr98

```
title = \markup {
  \concat {
"W"
\scale #'(15/22 . 15/22) \combine
  "o"
  \translate-scaled #'(0 . 1.2) "a"
"ndering"
  }
}
```

This is extracted as "Wandering" (or at least that's what Atril shows). 
I want it to be "W[ao]ndering" (or maybe "Wꜵndering"), because it's 
supposed to be ambiguous.


On 04/25/17 01:35, Thomas Morley wrote:

2017-04-25 0:49 GMT+02:00  :

By PDF title I mean the one shown in the PDF viewer's title bar. It seems to
be extracted from the header:title field, but in my case, the title contains
some complex markup and isn't extracted properly.


It should.
Could you post the title-markup?

Cheers,
   Harm



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


Is it possible to change the PDF title?

2017-04-24 Thread caagr98
By PDF title I mean the one shown in the PDF viewer's title bar. It 
seems to be extracted from the header:title field, but in my case, the 
title contains some complex markup and isn't extracted properly. Can I 
override the title somehow?


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


Re: Lines to edges of \center-column

2017-04-24 Thread caagr98
Seems the latest devel version (2.19.59) has fixed that bug, so it's 
probably not important anymore.


On 04/24/17 19:43, David Wright wrote:

Well, I can't take a view on that because AFAICT the source in the OP
only contained kanji (complicated-looking) characters. Would that be
correct? Could you give the source with which you produced your
seam.png output (preferably as an attachment so I don't have to rely
on my paste's behaviour).


Sure, attached. (The two japanese words are "kana" and "kanji".)

I agree, but I'm more concerned about the contents of the window than
the window itself.


That's true, but ugly chrome can be rather distracting.


Well, I've taken a closer look with evince at my box.pdf and I can see
the effect you mention. However, I think they're just artifacts of its
display, because when you magnify the areas in question, the blemishes
don't get magnified but disappear, or appear elsewhere. So I don't
think the problem lies in the PDF at all. One also has to bear in mind
that the screen resolution can lead to odd effects just because of
where the grid of pixels happen to be relative to the image.


Yeah, I'm pretty sure those gaps are just some kind of rounding error.


Are those characters the same height? I think you should put some
characters into both lines for control purposes; some ordinary Roman
alphabeticals, say.


I'm pretty sure they are, assuming they use the same font. Oddly enough, 
manually specifying the font fixes it (tested with Takao Gothic and 
Takao Mincho). The Japanese characters look identical with and without 
manual font override, but the boxes don't.


I'm guessing it's just some weird font bug, which is fixed in 2.19.

By the way, is it possible to have both 2.18 and 2.19 installed at the 
same time (preferrably with 2.19 as the default `lilypond`), on Arch 
Linux? Having to uninstall and then recompile if I want to test 
something with 2.18 isn't very fun.
\version "2.18.2"
\paper {
  #(define fonts
 (make-pango-font-tree "Takao Gothic" "" ""
   (/ staff-height pt 20)))
}
\markup {
  "かな━━━"
}
\markup {
  "漢字━━━"
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lines to edges of \center-column

2017-04-22 Thread caagr98
I did some further work on it. It looks pretty great, IMO. It works with left- 
and right-aligning, too. No scaling horizontally (just 1sp margins), but it 
automatically scales vertically.

```
#(define (expand-add pair n)
   (cons (- (car pair) n) (+ (cdr pair) n)))
#(define (expand-mul mul pair)
   (let* ((a (car pair))
  (b (cdr pair))
  (mid (/ (+ a b) 2))
  (A (+ (* (- a mid) mul) mid))
  (B (+ (* (- b mid) mul) mid)))
 (cons A B)))

#(define (add-brackets mols th)
   (define (line x1 y1 x2 y2)
 (stencil-with-color
  (make-line-stencil th x1 y1 x2 y2)
  '(3/5 3/5 3/5)))
   (let ((max-extent (ly:stencil-extent (car mols) X)))
 (map (lambda (x)
(let ((stil-ext (ly:stencil-extent x X)))
  (if (not (equal? max-extent stil-ext))
  (let ((me (expand-add max-extent -2))
(se (expand-add stil-ext 1))
(ye (expand-mul 1/2 (ly:stencil-extent x Y
(if (< (car me) (car se))
(set! x
  (ly:stencil-add
   (line (car me) (car ye) (car se) (car ye))
   (line (car me) (car ye) (car me) (cdr ye))
   x)))
(if (> (cdr me) (cdr se))
(set! x
  (ly:stencil-add
   (line (cdr se) (car ye) (cdr me) (car ye))
   (line (cdr me) (car ye) (cdr me) (cdr ye))
   x))
x)
  mols)))

#(define (general-column-bracket align-dir baseline mols)
   (let* ((aligned-mols (map (lambda (x) (ly:stencil-aligned-to x X align-dir)) 
mols))
  (aligned-mols (add-brackets aligned-mols 0.1))
  (stacked-stencil (stack-lines -1 0.0 baseline aligned-mols))
  (stacked-extent (ly:stencil-extent stacked-stencil X)))
 (ly:stencil-translate-axis stacked-stencil (- (car stacked-extent)) X)))

#(define-markup-command (jp-column layout props args)
   (markup-list?)
   #:category align
   #:properties ((baseline-skip))
   (general-column-bracket CENTER baseline-skip (interpret-markup-list layout 
props args)))
```

On 04/23/17 00:56, caag...@gmail.com wrote:
> This is great, thanks! I was trying to mess around with \hbracket and 
> \whiteout, but this is far better.
> 
> Just a few questions:
> Is it possible to scale the protrusions (and other things) by font size?
> How can I change the color of the lines?
> What does "mols" mean?
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


  1   2   >