Re: Scheme help

2024-05-24 Thread Valentin Petzel
Hello Kevin, When you call a music expression like \music Lilypond will allways pass a copy of that music object. Thus some music functions assume it is safe to modify the original music object. So when you do \keepWithTag ... #music you will first remove everything tagged without v1, then

Re: Frescobaldi?

2024-05-06 Thread Valentin Petzel
I’m wondering if the Frescobaldi approach is actually working out. Keep in mind that originally Frescobaldi was just a project for adding support for Lilypond to KATE, then it became a KDE parts solution, then it started to do everything itself for more control. And this means you’ll need to

Re: how difficult would it be to have “auto-correct spacing” (even for just a single measure)?

2024-05-05 Thread Valentin Petzel
Hi Kieren, if you want you could tell Lilypond to ignore Accidentals in spacing (N.B.: This can lead to collision with the previous head!): accidentalNoWidth = \override Accidental.extra-spacing-width = #(lambda (grob) (let ((ext (ly:grob-property grob 'X-extent))) (display ext)

Re: Trouble with concat in a markup command

2024-05-04 Thread Valentin Petzel
Hello Alec, note that since 2.24 we have a neat markup function \with-string-transformer, which is called whenever a string is found, and does a lot of the logic for you (such as making sure this is called upon a string, not a complex markup: \markup \with-string-transformer #(lambda

Automatic indent

2024-05-04 Thread Valentin Petzel
Hello, I’ve been wondering just now: Wouldn’t it be possible to use the break-align- symbol mechanism to allow for dynamic indents? Take this as example: << \new Staff \with { instrumentName = "ins" } { \override Score.BreakAlignment.break-align-orders = #(make-vector 3 '(cue-end-clef

Re: output-filename with variable

2024-05-04 Thread Valentin Petzel
Hello cord, note that \fromproperty is a markup command, which is interpreted later with the right context. The output-filename does not actually want a markup, so you’d need to be careful here. If you really want to do this you can extract values from the top level header or from the header

Re: afterGrace, glissando, and hidenotes

2024-04-12 Thread Valentin Petzel
Am Donnerstag, 11. April 2024, 19:11:45 CEST schrieb Walt North: > Hello, I would appreciate some help with this music function. > > The end goal is have a define function produce a glissando after a note > going either up or down to > > undetermined second note. For example a guitar slide down

Re: indicate scordatura at beginning of piece

2024-04-08 Thread Valentin Petzel
Hello Dirck, you might be interested in something I recently made for music SE. Essentially this will add two new engravers that automatically annotate the string tuning whenever it changes. Cheers, Valentin\version "2.24" % Used for printing the actual changes. A procedure that takes the

Re: Can't compile Lilypond files

2024-03-25 Thread Valentin Petzel
Hello David, great that things worked out. Instead of putting a script at /usr/bin/lilypond which calls ~/bin/lilypond you could also create a symlink. Also modern Linux setups should have ~/.local/bin in PATH by default, so if the reason is only to be able to call `lilypond` without path

Re: nested \set ?

2024-03-25 Thread Valentin Petzel
Hello Werner, properties handle this by having internally not a single value, but a list of values, and temporary overriding simply means adding to that list. Context properties do currently not allow for this mechanic, but we could simulate it ourselves: #(set-object-property! 'details

Re: Can't compile Lilypond files

2024-03-24 Thread Valentin Petzel
Hello David, it apears your Lilypond installation has some issue. What OS are you currently on? How did you install Lilypond? If you are using some Linux distribution there might be a version mismatch between the libraries the binaries have been compiled against and the ones installed on your

Re: draw box around score

2024-03-22 Thread Valentin Petzel
r") ) \book-title \score { c'1 } } Cheers, Valentin Am Freitag, 22. März 2024, 20:46:16 CET schrieb Valentin Petzel: > Hello Joop, > > this would be hard to do, as this is tied to the page breaking algorithm. > Rather directly draw your header in your markup: > > #(de

Re: draw box around score

2024-03-22 Thread Valentin Petzel
Hello Joop, this would be hard to do, as this is tied to the page breaking algorithm. Rather directly draw your header in your markup: #(define-markup-command (book-title layout props) () (interpret-markup layout props (ly:output-def-lookup layout 'bookTitleMarkup empty-markup)))

Re: Circular staves

2024-03-16 Thread Valentin Petzel
d by rotating the score clockwise. > > Perhaps a new "spin" on the four-part tablebook format used by Dowland? > > Or has Lazy Susan format already been done? > > Jeff > > On 3/16/2024 10:29 AM, Leo Correia de Verdier wrote: > > Wow! > > > > That wa

Re: How do I force chord names to top of stave when using multiple voices?

2024-02-05 Thread Valentin Petzel
Hello Marcus, essentially what you have here is << chordNames voiceI \\ voiceII >> If you only had << chordNames voiceI >> this would work out, because Lilypond would first see the chord names, which creates a new ChordNames context, and then the music, for which Lilypond does implicitely

Re: Is this a sensible interface for temporary multiple clefs?

2024-02-05 Thread Valentin Petzel
Hello David, if I understand this correctly the intent here is to have different staff behaviour in one staff. I believe that there might be a more general concept here. Instead of creating a new context and mechanic to set additional clefs, maybe it would make sense to have a more general

Re: performance marks

2024-02-03 Thread Valentin Petzel
Am Donnerstag, 1. Februar 2024, 00:03:00 CET schrieb Curt McDowell: > Stan, > > Here is a brute force way by embedding PostScript – although it can be a > bit tedious. > > \version "2.22.1" > > %% Custom dynamic marks using embedded PostScript > > %% If a particular mark is needed repeatedly,

Re: Alternate bars in different time signatures

2024-02-03 Thread Valentin Petzel
Am Freitag, 2. Februar 2024, 16:38:22 CET schrieb Lukas-Fabian Moser: > ... and without any new insight, but with a healthy dose of syntactic sugar: And with a rather simple custom engraver Lilypond will do these kinds of things for us. Cheers, Valentin\version "2.24" #(set-object-property!

Re: [large/complex projects] where should transpositions go?

2024-01-29 Thread Valentin Petzel
Hi Kieren, I think with large projects it is a good idea to establish a nice data flow. Basically your code does different things. For one thing you have musical data, for another thing you have formatting of said data, and then you also have functions and stuff. Depending on your particular

Re: Output PDF to stdout

2024-01-21 Thread Valentin Petzel
Hello Vlad, You will not avoid intermediate files in any case, as Lilypond with gs output will generate ps code, which is then turned into a pdf. If you want to pipe PDFs for convenience you might create a wrapper say plilypond in the search path doing something like this: #!/bin/bash

Re: Removing gap in markup text when changing text color?

2024-01-03 Thread Valentin Petzel
Hello Harm, hello Matt, One more way that might be a bit more common and concise would be \concat { ( \with-color #green Remember } Cheers, Valentin signature.asc Description: This is a digitally signed message part.

Re: How to move an ornament vertically

2024-01-02 Thread Valentin Petzel
Hello Hajo, > I wonder how you can "talk" LilyPond into moving a dashPlus symbol > above a slur. Without any tweaking it always puts the dashPlus under a > slur, whereas if you replace the dashPlus by a \trill command, the > trill symbol is always placed above the slur. This can be done using

Re: Is there a property that would set all of the "above staff" text to "above chordnames"

2024-01-01 Thread Valentin Petzel
Hello Kevin, Am Montag, 1. Jänner 2024, 21:24:16 CET schrieb Kevin Cole: > Or vice versa? > > What I mean is, I often have a situation where there's only a wee bit > o' text occasionally, above the staff. But I frequently have > ChordNames. It seems to me that the ChordNames would be better

Re: accessing current file name in markup function

2023-12-07 Thread Valentin Petzel
Am Donnerstag, 7. Dezember 2023, 06:47:56 CET schrieb Werner LEMBERG: > >> Maybe a bit less esoteric: > > Or even less esoteric: > Thanks! However, Jean's statement > > > markups don't store location info, unfortunately. > > is still true, which means that you can't access the current input >

Re: accessing current file name in markup function

2023-12-06 Thread Valentin Petzel
Am Mittwoch, 6. Dezember 2023, 23:10:11 CET schrieb Jean Abou Samra: > \version "2.24.2" > > #(define-markup-command (foo layout props loc-provider) (ly:music?) >(display (ly:input-file-line-char-column (ly:music-property loc-provider > 'origin))) empty-stencil) > > \markup \foo {{}} Maybe

Re: skip of defined length in lyrics?

2023-10-14 Thread Valentin Petzel
Hello Graham, there are multiple ways to solve the problem and having different voice contexts for different lyrics is surely one of the better ways to handle it. You can it do cleaner like this: % ~~ instrumental = #(define-music-function (m) (ly:music?) #{

Re: chord names

2023-10-13 Thread Valentin Petzel
Hello, instead of doing \repeat unfold 8 {s1} do s1*8 or \scaleDurations 8 s1 Cheers, Valentin Am Freitag, 13. Oktober 2023, 21:43:53 CEST schrieb clyde: > I would like to include chord names in only part of a song. The example > I attached does that. The problem is that the use of spaces in

Re: Function for letter noteheads

2023-10-08 Thread Valentin Petzel
Alternatively (as long as we do not want to parse parallel music in order) we can use a music function like this: %%% \version "2.24" typing-text = "Goddag Fru Direktör Det meddelande du sände den andra har landat." %When I uncomment these dynamics the text jumps

Re: programming error: note-column has no direction

2023-10-07 Thread Valentin Petzel
Hello Harm, The error you are seeing is caused by handling NoteCollisions. This has different behavior depending on the direction of the note column. The direction is set by the stem engraver, which is removed in this context. To get rid of this message we can either remove collision handling

Re: vertical spacing of top-level `\markup` and `\bookpart`

2023-10-04 Thread Valentin Petzel
> >> If I activate the `\bookpart` block, the stretchability is > >> completely lost – both inside and outside of `\bookpart`. Is this > >> expected? How can I control the stretchability for global markups > >> section-wise (e.g., in `\bookparts`)? > > > > > > If you add ragged-last-bottom =

Re: barline in proportional notation disappear

2023-10-03 Thread Valentin Petzel
> Thank you sooo much for your answer! > That’s amazing, it’s really clear and I’ll take a deep look at it! > What is MusicSE? I cannot find anything on google. Can u point me out to the > reference u said? > Cheers! As Jean said it is the music stackexchange thing. You’ve accidently replied

Re: Overwrite key signature with numbers

2023-10-03 Thread Valentin Petzel
Am Dienstag, 3. Oktober 2023, 12:55:21 CEST schrieb Robert Mengual: > Thanks a lot Valentin, that's simply perfect! > > However, after reading a lot of the documentation I think I would have > never been able to find any solution close to yours. I am very confused > with a few things, and I can't

Re: Overwrite key signature with numbers

2023-10-03 Thread Valentin Petzel
Damn it, turns out the key engraver has an hardcoded path to always create Key Cancellations for keys with no alteration. So one would need to do \override KeyCancellation.stencil = ##f which is of course a bit wonky as compared to telling Lilypond to not create Cancellations in the first

Re: Replace with red dot

2023-10-03 Thread Valentin Petzel
You are doing << { c'2. } \new Voice { \redDotMultiMeasureRest R1 } >> but a 3/4 measure only has length 2. . So do << { c'2. } \new Voice { \redDotMultiMeasureRest R2. } >> instead. While you are at it: You can directly boxify the stencil using box-stencil without going the extra way over a

Re: Overwrite key signature with numbers

2023-10-02 Thread Valentin Petzel
Hi Robert, you could do it like this: \version "2.23.6" \layout { \context { \Staff \override KeySignature.text = #(lambda (grob) (let* ((alt (ly:grob-property grob 'alteration-alist)) (alts (map cdr alt)) (tot (* 2 (apply + alts)))

Re: barline in proportional notation disappear

2023-10-01 Thread Valentin Petzel
Hello, this was also posted on MusicSE, for reference here my reply: You are not getting some barlines as s1^"text" \bar "!" will insert the bar line after the skip, which is in your case in a random position later. Rather do \bar "!" s1^"text" to have the bar line at the exact

Re: \markup text outside Lyrics - how?

2023-09-28 Thread Valentin Petzel
Hello Michael, you could create a Dynamics context before the staff containing the markup. Cheers, Valentin Am Donnerstag, 28. September 2023, 19:54:22 CEST schrieb Michael Gerdau: > Dear lilyponders, > > I would like to have directional text outside of lyrics. I've been > trying to use

Re: Is there a way to convert -- or evaluate -- a string to a pitch?

2023-09-26 Thread Valentin Petzel
Or alternatively (if you only need basepitch, not different octaves) you may avoid parsing and directly pull the pitch from the pitch name mapping (less powerful, but less chaotic and safer): #(assoc-get (string->symbol "c") pitchnames) or even (to avoid problems when changing language) from a

Re: Symmetrical hairpins

2023-09-25 Thread Valentin Petzel
Hello Arjen, I’m wondering if in your case it ight be beneficial to not create two Hairpins, but rather a special case stencil like this: % #(define (ly:expr-hairpin::print grob) (let* ((orig (ly:hairpin::print grob)) (sp (ly:grob-property grob 'shorten-pair '(0 . 0)))

Re: custom replace/map of one set of pitches to another

2023-08-31 Thread Valentin Petzel
Hello Lukas, I don’t think this is a particularly good idea. Lilypond conceptually first creates data for the sementic meaning of the music (or the actual content) and have engravers turn this into graphical content. Mapping pitches to other pitches is not a layout option, but a musical

Re: custom replace/map of one set of pitches to another

2023-08-31 Thread Valentin Petzel
Hi Michael, some time ago I created a function for exactly that for a stackexchange question: https://music.stackexchange.com/questions/127175/lilypond-transpose-a-sequence-to-modes-with-different-intervallic-structure Essentially it introduces a function to map one scale to another, and it

Re: title in the Breitkopf fraktura font

2023-08-31 Thread Valentin Petzel
Hello Bernhard, > Thanks a lot, that was fairly simple. I noted an error with convert-ly: > > F:\Meine Noten\EigeneNoten\Kirchenchor> C:\"Program Files > > (x86)"\LilyPond\lilypond-2.25.7\bin\convert-ly > > .\Näher-mein-Gott-zu-dir-Lowell-Mason-1792-1972-2.22.1.ly > > C:\Program Files

Re: crescendo and decrescendo within slurs

2023-08-12 Thread Valentin Petzel
Hi, you could set the outside-staff-priority of the Slur: \version "2.24.1" top = { \change Staff = "upper" \voiceTwo } bottom = { \change Staff = "lower" \voiceOne } upper = \relative c' { \key g \minor \voiceOne d'4.^\markup {\italic "espressivo"}^"a tempo"\p^- c8\tweak outside-staff-

Re: One-page page-turning

2023-08-09 Thread Valentin Petzel
Theoretically yes, but this would require more specific implementations,as current implementation of special cases only work for n = 2 and do not matter for n = 1. Am Mittwoch, 9. August 2023, 19:14:58 CEST schrieb Pierre-Luc Gauthier: > I understand from your code that this opens up the door

Re: One-page page-turning

2023-08-09 Thread Valentin Petzel
Hi Pierre-Luc, if you feel confident building from source I’ve changed the code such that page-turn-breaking will do a turn after each single page unless two-sided is set true: https://gitlab.com/vpetzel/lilypond/-/tree/single_turn_breaking Cheers, Valentin Am Mittwoch, 9. August 2023,

Re: Is there a Scheme macro(?) to use fretboards to generate a generic guitar strum?

2023-08-05 Thread Valentin Petzel
Hi all, > The problem has two parts: 1) Generate a sensible voicing for a given > chord; 2) create the arpeggio. (Maybe you intended to do 1) manually > anyway?) some time ago I wrote a function for deriving chord voicings from fretboards for some SE question:

Re: Cadenza in right hand, metered in left

2023-08-03 Thread Valentin Petzel
Hello Knute, there is no need to move timing, simply omit the barlines. Moving Timing translator will mean you’ll loose bar numbering too. Cheers, Valentin Am Donnerstag, 3. August 2023, 19:04:26 CEST schrieb Knute Snortum: > On Thu, Aug 3, 2023 at 9:47 AM Knute Snortum wrote: > > On Thu, Aug

Re: Nested tuplet ratio notation

2023-08-02 Thread Valentin Petzel
My function takes an optional hook for inserting such overrides: \override TupletNumber.font-series = #'bold Or you can do a general override in a layout block: \override StandaloneRhythm.TupletNumber.font-series = #'bold Cheers, Valentin Am Mittwoch, 2. August 2023, 08:04:31 CEST schrieb Lib

Re: Nested tuplet ratio notation

2023-08-01 Thread Valentin Petzel
Hi Lib, Am Dienstag, 1. August 2023, 11:21:31 CEST schrieb Lib Lists: > Hi Valentin, > I'm speechless, that's absolutely wonderful and useful, thank you so much! glad you like it > The only comment I have is that the numbers and the ratio symbol are > not Italic, but from your code I cannot

Re: Multi Measure Rests in Cadenzas

2023-07-31 Thread Valentin Petzel
Hello Calvin, MM rests and cadenzas do not play well together. The reason for this is that the MM is placed centered between start and end of measure. But \cadenzaOn is not really made for creating arbitrary length measures. What is does is simply telling Lilypond to stop counting. So when you

Re: Nested tuplet ratio notation

2023-07-28 Thread Valentin Petzel
Hello Jean, Hello Lib, in fact rather than constructing a tuplet marking using markup we can directly use a real tuplet number in the \rhythm markup: \rhythm { % Change padding of Tuplet to be relative to size of Number, % so that distance to bracket does not depend on fontsize

Re: System delimiters for middle of stave

2023-07-24 Thread Valentin Petzel
Hello Alex, exactly what Jean said! Regarding 3: No, it would still be possible to get around that issue. In the linked SE post I’ve given an answer that uses a different approach that essentially redraws those delimiters where specified. This would work in the occasion. Alternatively one may

Re: System delimiters for middle of stave

2023-07-23 Thread Valentin Petzel
The trick is simply to not override the stencil for these cases. But before you invest huge amounts of effort remember this code does not handle breaks exactly well. Back then I spent a significant amount of time to get my solution to work well with any configuration of breaks, it is quite a

Re: Suggestion: Hooks for formatting titling fields

2023-07-23 Thread Valentin Petzel
But I feel that this is a bigger issue. Generally the issue here is that systems-per-page only cares about systems of music and not about anything else that may be placed on the page, as one can see here: \paper { systems-per-page = #16 } \markup\column { a a a a a a a a a a a a a a a a a a

Suggestion: Hooks for formatting titling fields

2023-07-23 Thread Valentin Petzel
Hello Pondmates, I’ve just stumbled upon a music SE question regarding the formatting of page numbers. Currectly we do not have any hooks to change formatting of such things, rather the general approach to this is "you need to change the whole titling procedure, here is the default value".

Re: Retrieve context properties

2023-07-23 Thread Valentin Petzel
Hello Rip_Mus, you can obtain the name of a context using ly::context-id, and the type of a context using ly:context-name. The problem is that you can only really use these only during the translation step. So I thing the easiest way would be to create an engraver that adds this information:

Re: How to return markup conditionally?

2023-07-20 Thread Valentin Petzel
Am Donnerstag, 20. Juli 2023, 18:26:58 CEST schrieb Trevor Bača: > Can both subproperties be changed in a single call to grob-transformer? > > Or is it necessary to use something more complex (perhaps like Valentin > proposes here)? Yes, within one grob-transformer-call you can do arbitrary as

Re: detecting parallel fifths and octaves in figured bass

2023-07-20 Thread Valentin Petzel
Hello Eef, if you are going to do something like this I’d suggest a somewhat modular design. In part writing there are many rules that apply to different voices, so I suggest to do something that allows to do arbitrary checks in a nice and extendable manner. I’ve sketched up a small proof of

Re: Help with satb.ly and repeated lyrics

2023-07-20 Thread Valentin Petzel
Hello Mark, use the alignBelowContext property to tell Lilypond where to put the Lyrics: \version "2.24" SopranoMusic = \relative { \repeat volta 2 {a' a a a } } AltoMusic = \relative { f' f f f } TenorMusic = \relative { a a a a } BassMusic = \relative { f f f f } VerseOne = \lyricmode {

Re: How to return markup conditionally?

2023-07-19 Thread Valentin Petzel
> That is indeed a problem, but note that the same problem exists with before- > line-breaking (you can't write two independent before-line-breaking > overrides, you need to combine them). Sure, that is also something where it would be nice to actually have a list of procedures. Of course one

Re: How to return markup conditionally?

2023-07-19 Thread Valentin Petzel
Good point, I didn’t think of that! Also I know that using a callback on bound-details would work as well, but I’m not sure if this is the best way to replace a single value in an alist (what if you want to change other parts of the alist independently?). Maybe the whole transformer thing

Re: How to return markup conditionally?

2023-07-19 Thread Valentin Petzel
Hello Trevor, instead of trying to use a callback on bound-details.left.text you can use the before-line-breaking and after-line-breaking hooks to modifiy this property: %%% BEGIN %%% \version "2.24" % no left text set { \once \override TextSpanner.before-line-breaking = #(lambda (grob)

Re: squeezing a page

2023-07-10 Thread Valentin Petzel
Hello David, hello Tom, using page-count does theoretically work, but it can produce non optimal results, as it will at some point simply start to compress the last page. E.g. in this case page count still works fine: \paper { page-count = 3 ragged-last-bottom = ##f indent = 0\cm } {

Re: Multi-trills

2023-07-10 Thread Valentin Petzel
Hello Greg, it would help to understand your problem if you gave us some example. Multiple trill spans can be achieved by using multiple Voices: << { c''1\startTrillSpan 1 1\stopTrillSpan } \\ { c'1\startTrillSpan 1 1\stopTrillSpan } >> If you need the notes to be within the same voice

Re: Engraving a triple-stop for violin

2023-07-10 Thread Valentin Petzel
Am Sonntag, 9. Juli 2023, 09:42:52 CEST schrieb David Kastrup: > The latter is definitely the _natural_ way to enter this construct > (single voice simultaneity) but I do seem to remember that LilyPond did > not deal well with it? The thing is that if we combine Simultaneous Music with implicit

Re: Engraving a triple-stop for violin

2023-07-09 Thread Valentin Petzel
Hello Pierre, I think this should rather be { <\tweak duration-log #2 g \tweak duration-log #2 e' e''>2^. } Alternatively one can simply do \new Voice << g4 e' e''2^. >> (the \new Voice is necessary as there has been no music before this, so there does not exist a voice, and Lilypond will

Re: How to display timesig.C22 on 4/2 instead of 2/2

2023-07-08 Thread Valentin Petzel
Hello William, you can lookup ly:time-signature::print in scm/time-signature.scm. You will find that Lilypond uses a formatting procedure given by the 'style property. You can add such a procedure using add-simple-time-signature-style In scm/time-signature-settings.scm you will find the

Re: spacing

2023-07-07 Thread Valentin Petzel
Hm, seems to be correct. I'm just a bit confused by this as it does not appear to make any sense. From an etymological standpoint theol-ogy does not work out, but also the pronunciation given by this dictionary entry seems to follow theo-logy. Cheers, Valentin 07.07.2023 15:13:02 Werner

Re: spacing

2023-07-07 Thread Valentin Petzel
Hello Lydia, are you sure "theology" should go "the - ol - o - gy"? Shouln’t it be "The - o - lo - gy"? Also shouldn’t "Orthodoxy" be "Or -- tho -- do -- xy"? It might be this way in English (they tend to do weird things), I don’t know, but at the very least it feels weird. The issue with

Re: QUIBBLE: Interesting use (mis-matched) of left and right quotes of quoted strings in Lilypond output

2023-07-02 Thread Valentin Petzel
Hello Ken, considering this behaviour is consistent across the output I’m quite sure this is deliberate. I suppose the intention behind this is to give a clear indication of where the quote starts and where it ends (similar to how typographic quotation marks would use different symbols for

Re: for-each?

2023-07-02 Thread Valentin Petzel
Hello Pierre, you should not use for-each in such a case. for-each is essentially a version of map that does not return anything. So (for-each (lambda (part) part) parts) does not give you any return, and (map (lambda (part) part) parts) would not change anything (it instructs to map the

Re: Music function to manage a moment and beat for the Staff and the Voice

2023-07-01 Thread Valentin Petzel
Am Samstag, 1. Juli 2023, 18:48:31 CEST schrieb David Kastrup: > The funny thing is that I suspect Han-Wen might still be surprised to > hear what Staff.property "actually means". > > It's been around for quite longer than its "actual meaning". But of > course I should be the last person to

Re: Music function to manage a moment and beat for the Staff and the Voice

2023-07-01 Thread Valentin Petzel
Hello Vlad, in addition to Jean’s answer it might be helpful to understand what Staff.property actually means. This get’s parsed to a list of the symbols 'Staff and 'property. So you can in fact simply remain with scheme, and directly enter #(list scope 'property) like this % \version

Re: How to submit a feature request (issue)

2023-07-01 Thread Valentin Petzel
Maybe Lilypond should also give a warning if it on a lower language version. The assumption here is that lower language versions are generally compatible with higher program versions, but this is not true. So basically we only guarantee that a specific language version will be working with the

Re: PDF file gets "-1" appended

2023-07-01 Thread Valentin Petzel
. Cheers, Valentin Am Freitag, 30. Juni 2023, 22:16:01 CEST schrieb Jean Abou Samra: > Le mardi 27 juin 2023 à 21:17 +0200, Valentin Petzel a écrit : > > Hello Knute, > > > > so you are using books to allow specification of the midi filename. This > > is > > probably a

Re: Define an alias to a parametrized command

2023-06-27 Thread Valentin Petzel
Hello Vlad, Also checkout this thread: https://lists.gnu.org/archive/html/lilypond-user/2023-02/msg00035.html If you want a real alias (that is a second binding to the same function) you can do #(define acc acciaccatura) This will create another binding to the same object, which means you do

Re: PDF file gets "-1" appended

2023-06-27 Thread Valentin Petzel
utFile may be used to override the full midi file name This has the advantage over abusing Books that it specifies the names at the relevant position, not at a higher position. Cheers, Valentin Am Dienstag, 27. Juni 2023, 16:39:53 CEST schrieb Knute Snortum: > On Tue, Jun 27, 2023 at 2:35 AM Va

Re: PDF file gets "-1" appended

2023-06-27 Thread Valentin Petzel
Hello Knute, I do not think this behaviour is particularly weird, rather the input is weird. Using \book is telling Lilypond you want to generate a new PDF. So there should be no reason to enclose scores that only produce MIDI into a \book clause. And if you do I think it should not be

Re: Metronome marking with non-integer value

2023-06-25 Thread Valentin Petzel
Hello Lib, this is a limitation of the Lilypond parser which implements the syntax \tempo [text] [duration = ...] Here it assumes that ... is an unsigned integer. This I think is not unreasonable, if you tell a musician to play something in MM 72.4 he will probably be a bit confused. Anyway,

Re: clef bass_16

2023-06-23 Thread Valentin Petzel
To be more general the clef modifier specifies a shift in steps where we start with 1 as unison. So as an octave is 7 steps n octaves will have a shift of 7*n, but we will add a 1 as we start with 1 = unison, which gives 0+1 = 1, 7+1 = 8, 14+1 = 15, 21+1 = 22, ... Also the correct suffix would

Re: Adjusting length of final line

2023-06-20 Thread Valentin Petzel
Hello Dave, Maybe use somthing like this: %= example = \version "2.22.1" scale = \relative c' { c d e f g a b c } halfscale = \relative c' { c d e f \noBreak \stopStaff\cadenzaOn \hideNotes c c c c \startStaff\unHideNotes\bar"" \cadenzaOff } \score { \new Staff {

Re: Passing pitch to function

2023-06-15 Thread Valentin Petzel
hier > > a écrit : > > So sorry, you have to remove the c''% at the end… 'should have made that > > clear.> > > Le jeu. 15 juin 2023, à 12 h 33, Valentin Petzel a écrit : > > > Hello Pierre-Luc, > > > > > > It works for me if I copy and past

Re: Passing pitch to function

2023-06-15 Thread Valentin Petzel
Hello Pierre-Luc, It works for me if I copy and paste your code. Can you maybe attach a ly file that does not work for you? Cheers, Valentin Am Donnerstag, 15. Juni 2023, 18:25:37 CEST schrieb Pierre-Luc Gauthier: > What am-I doing wrong here… ☹ > > \version "2.25.6" > > \language "english"

Re: shifting accidentals horizontally

2023-06-13 Thread Valentin Petzel
Or rather there is the NoteColumn.ignore-collision property. If set to #t the Note column will not be added to any NoteCollision grob. The problem here is that in this case there need to be no positional correction. So we require some additional check in the engraver to apply this correction

Re: shifting accidentals horizontally

2023-06-13 Thread Valentin Petzel
Hello Werner, this Problem is not caused by my solution, but generally by your approach of taking the Notes with collision applied (the 8th note bb on the left, the b,e on the right) and shifting the bb until it is right of the others. This still means that the will be offcentered. So this

Re: Compilation time (was: Generate \scaleDurations procedurally)

2023-06-13 Thread Valentin Petzel
Hello Lib, this slowdown appears to be induced by forbidBreakBetweenBarLines = ##f This might be understandable: Your code will division at 30/1, 30/2, ..., 30/88, which might induce a relatively large number of potential break points. This appears to be too much for the line breaking

Re: shifting accidentals horizontally

2023-06-12 Thread Valentin Petzel
Hello Jean, I think a possible case would be something like the appended case, so if we have some sort of superimposed patterns. @Werner I’ve added a small fix concerning the case when there is no NoteCollision grob (in which case this should not be relevant in the first place). Cheers,

Re: shifting accidentals horizontally

2023-06-12 Thread Valentin Petzel
Hello Werner, I’ve tried something using an engraver that sends of accidentals from the given context to a separate AccidentalPlacement grob: % #(define (which lst) (define (impl lst count) (if (null? lst) #f (if (car lst) count (impl (cdr

Re: How to make a blank page

2023-06-12 Thread Valentin Petzel
Hello Silvain, it might help to understand that \pageBreak is not an instruction to insert a pageBreak. Think of \noPageBreak: This is a token that prevents a pageBreak to happen at the given place. Similarly \pageBreak is a token that enforces a pageBreak to happen at the given place (in

Re: How to generate \scaleDurations values procedurally

2023-06-12 Thread Valentin Petzel
Hello Lib, #(ly:music-transpose {\mus} i) does not make sense. \mus is Lilypond syntax, not scheme. Either do #{ \mus #} to parse this as Lilypond expression, or do mus (instead of { \mus }) to scope this as Scheme object. Also ly:music-transpose does take a pitch as second argument, so if

Re: Trying and failing to engrave a segno repeat with coda: More alternatives than repeats.

2023-06-09 Thread Valentin Petzel
Hello Ken, please try to give a MWE and to describe what you actually want to achieve. It is hard to get what you want from just a handful of screenshots of jump marks. I suppose this is supposed to be something like A [SEGNO] B [Fine→Coda] C [Dal segno al Fine e poi la coda] [Coda] D So

Re: Leadsheet with cadenza / ad lib.

2023-06-08 Thread Valentin Petzel
Hello Stephan, hello Leo, depending on the circumstances it might be useful to replace cadenzas with scaled duration such that the music fits a whole measue. Using a small helper function one might do something like this: % scaleMusicTo = #(define-music-function (duration mus) (fraction?

Re: Indent

2023-06-02 Thread Valentin Petzel
Hello Dimitri, \layout can be specified both global as wel as per score. So if you want to have no indent in a specific excerpt you can do \score { ... \layout { indent = 0 } } Cheers, Valentin Am Freitag, 2. Juni 2023, 16:51:58 CEST schrieb Dimitri Sykias: > I have some musical examples

Re: Defining variables mid-stream in a music expression using tags.

2023-05-20 Thread Valentin Petzel
Hello David, > I do have a difference in the the output of the code below, which does > not use \new Staff. > > Without \textLengthOn, it makes two staves. With \textLenthOn, it > combines the two music expressions into one stave. Why is that happening? That is one of the many pitfalls with

Re: Defining variables mid-stream in a music expression using tags.

2023-05-19 Thread Valentin Petzel
Hello David, > My conundrum is that I want to call the same music expression (that is > declared as a variable) from different staves, but also cause markup > functions inside the music expression to behave differently from outside > the music expression. Using tags is the only way I have found

Re: Defining variables mid-stream in a music expression using tags.

2023-05-18 Thread Valentin Petzel
I have been doing it that way. > > Could you please show me what you mean by the quote below from your > response? That sounds interesting, but I am not getting it. > > On 5/18/23 06:31, Valentin Petzel wrote: > > More generally if you want have parts of your score behave

Re: quoting percent repeats

2023-05-18 Thread Valentin Petzel
Hello Paul, while I’m not entirely sure what is going on there it seems like the iterator for quoted music is messing with the logic of the iterator for percent repeated music. This is done not by the engraver, but by the iterator. Basically the iterator decides on whether to create

Re: Moving note in three-voice context

2023-05-18 Thread Valentin Petzel
Hello Jakob, try to do something like this: \tweak extra-spacing-width #'(-1.5 . 0) a' this will tell Lilypond to add 1.5 spaces to the left of the stem for spacing. In this case this will work out, but say if the d and the f# the beat before were an octave higher there would be no collision,

Re: Defining variables mid-stream in a music expression using tags.

2023-05-18 Thread Valentin Petzel
Am Donnerstag, 18. Mai 2023, 05:32:28 CEST schrieb dfro: > \version "2.24.1" > > #(define-markup-command >(symbol > layout props > var staff-variable) >(markup? markup?) >(interpret-markup > layout props > #{ \markup \concat { "Symbol " #var #staff-variable } #} >

Re: Defining variables mid-stream in a music expression using tags.

2023-05-17 Thread Valentin Petzel
Valentin Petzel: > Hello David, > > there is some confusing going on here about how certain things are > evaluated. When you do > > { ... something ... } > > this is evaluated pretty much as it is parsed, returning some music object. > So > > \keepWithTag #'te

  1   2   3   4   5   6   7   >