another variation for repeat segno
Is there a way to do this with Segno repeat structure? \version "2.25.16" xDS = \markup{\fontsize #4 \line{D.S. al Fine }} xFine = \markup{\fontsize #4 Fine} music = \fixed c' { g1 \segnoMark 1 f 4 g a b \set Score.repeatCommands = #`((volta ,xDS) start-repeat) \bar "||" g4 a g a \set Score.repeatCommands = #`((volta #f) (volta ,xFine) end-repeat) \bar "||" b1 \set Score.repeatCommands = #'((volta #f)) \bar "|." } \score{ \music } \score{ \unfoldRepeats \music } TIA, Paul
Re: gvim point and click
On Mon 03 Jun 2024 at 07:24:41 (+0200), Stefan Thomas wrote: > Am Mo., 3. Juni 2024 um 03:19 Uhr schrieb David Wright: > > On Sun 02 Jun 2024 at 16:10:56 (+0200), Stefan Thomas wrote: > > > again, I'm trying to activate point and click in gvim. I made a little > > > success: > > > I wrote in the editor options of okular: > > > gvim --remote-silent +%l %f +normal! %c > > > When I click on a note, the right document is opened and the cursor is > > > placed at the correct line, but not at the correct note in the lilypond > > > file. > > > What can I do? > > > > Perhaps the command you're trying to invoke is, for example: > > > > gvim --remote-silent +:123:norm45l path-to-file > > > > using literal constants for line number 123 and column 45. > > > > Naively, that would mean okular would have something like: > > > > gvim --remote-silent +:%l:norm%cl %f > > > > but, not being familiar with okular, I can't tell how it would > > handle %cl (where l means move to the right by %c columns) and > > whether it would need any quoting. For example, > > > > gvim --remote-silent '+:%l:norm%c l' %f > > > > might work better. > > > Unfortunately, none of your suggestions have brought the desired result! It always helps to post exactly what your new options were, and the result they produced. Does gvim complain about the invocating command, for example, or just ignore part of it? If there's a controlling terminal, you could try replacing gvim --remote-silent by echo, to see whether the command option is well-formed. BTW, in your OP, does "not at the correct note" mean the cursor is at the start of the line, or pointing at an incorrect note? (I'm assuming column one would never have a note in it). As I don't run okular (installing it would require 195 other packages), I would suggest you add the word okular into the Subject line, as I know two or three users here use it, though perhaps not exclusively. Cheers, David.
Re: how to draw lines independent from the notes
Thanks Aaron, see the attached pdf as an example: On Mon, Jun 3, 2024 at 7:49 PM Aaron Hill wrote: > On 2024-06-03 10:39 am, Paolo Prete wrote: > > On Mon, Jun 3, 2024 at 7:33 PM Aaron Hill > > wrote: > > > > so feel free to > >> reach out if this is not your area of expertise. > >> > > > > That's what I just did ;-) > > > > cheers > > > I must admit I have not followed this thread super closely. Do you have > a drawing of the type of arrow head you are interesting in. I have time > today to futz around, so I can see about putting together something for > you, hopefully more in the style of "teaching a man to fish" rather than > just "giving a man a fish". > > > -- Aaron Hill > 22-new.pdf Description: Adobe PDF document
Re: how to draw lines independent from the notes
On 2024-06-03 10:39 am, Paolo Prete wrote: On Mon, Jun 3, 2024 at 7:33 PM Aaron Hill wrote: so feel free to reach out if this is not your area of expertise. That's what I just did ;-) cheers I must admit I have not followed this thread super closely. Do you have a drawing of the type of arrow head you are interesting in. I have time today to futz around, so I can see about putting together something for you, hopefully more in the style of "teaching a man to fish" rather than just "giving a man a fish". -- Aaron Hill
Re: how to draw lines independent from the notes
On 2024-06-03 10:33 am, Aaron Hill wrote: But pretty much, once you are in a \markup context, the world's your oyster. Start with the more primitive drawing commands and build up your own shapes. Turn those into reusable markup-commands of your own. Some of this may require some Scheme code to achieve, so feel free to reach out if this is not your area of expertise. I should also mention that a good working knowledge of geometry and maths is helpful for building shapes programmatically. I know some folks feel they have a maths phobia, although, I am convinced they just were taught poorly. People who "hate" maths simply were set up to fail. No fault on the student. And sometimes no fault on the teacher. Some teachers are so into maths that they have a tough time helping students find the passion. Because it is true that some maths is tricky, but when you have passion, you have determination. No problem will stand in your way. In fact, you often seek out problems. But that is tangent (no pun intended) that I will stop for now. I guess once you have worked as a teacher, it is hard to stop educating. -- Aaron Hill
Re: how to draw lines independent from the notes
On Mon, Jun 3, 2024 at 7:33 PM Aaron Hill wrote: > On 2024-06-03 10:25 am, Paolo Prete wrote: > > Thanks, this is what I was searching for! > > > > Now, for an optimal refinement: is there a way to avoid these curved > > sides > > on the arrows and can the segment be attached to the arrows without > > gaps? > > so feel free to > reach out if this is not your area of expertise. > That's what I just did ;-) cheers
Re: how to draw lines independent from the notes
On 2024-06-03 10:25 am, Paolo Prete wrote: Thanks, this is what I was searching for! Now, for an optimal refinement: is there a way to avoid these curved sides on the arrows and can the segment be attached to the arrows without gaps? Virtually anything is possible inside of LilyPond's \markup system. Some of the built-in commands could use some more styles and parameters, but that is the joy of open source. All of the code for something like the \arrow-head command is right there. But pretty much, once you are in a \markup context, the world's your oyster. Start with the more primitive drawing commands and build up your own shapes. Turn those into reusable markup-commands of your own. Some of this may require some Scheme code to achieve, so feel free to reach out if this is not your area of expertise. -- Aaron Hill
Re: how to draw lines independent from the notes
Thanks, this is what I was searching for! Now, for an optimal refinement: is there a way to avoid these curved sides on the arrows and can the segment be attached to the arrows without gaps? Cheers On Mon, Jun 3, 2024 at 3:08 PM Leo Correia de Verdier < leo.correia.de.verd...@gmail.com> wrote: > Expanding on Werner’s example a bit, is this something like what you’re > after? > > \version "2.25.12" > > \markup \with-dimensions #'(0 . 0) #'(0 . 0) { > \translate #'(20 . -20) >\center-column { example-text \concat { \arrow-head #X #LEFT ##t > \draw-line #'(30 . 0) \arrow-head #X #RIGHT ##t }}} > > << > { f'2 f' f' f' f'1 } > { d'2 d' d' d' d'1 } > >> > > \paper { > markup-markup-spacing.basic-distance = 0 > markup-markup-spacing.minimum-distance = 0 > markup-markup-spacing.padding = 0 > > markup-system-spacing.basic-distance = 0 > markup-system-spacing.minimum-distance = 0 > markup-system-spacing.padding = 0 > > top-markup-spacing.basic-distance = 0 > top-markup-spacing.minimum-distance = 0 > top-markup-spacing.padding = 0 > } > > > > 3 juni 2024 kl. 13:43 skrev Paolo Prete : > > > > Thanks to Torsten and Werner, > > > > I'm going to use the postscript approach. > > > > But what about the segment with arrows and centered text? > > > > I googled a bit, and I also queried ChtaGPT but could not find anything > useful... > > > > > > On Mon, Jun 3, 2024 at 11:46 AM Torsten Krueger > wrote: > > Paolo Prete wrote on 02.06.2024: > > > > > How can I draw a vertical (or even diagonal) line independently > positioned > > > from the notes in the score, that can span across staves, as shown in > the > > > figure? > > > > For drawing lines independently from notes I do not use Lilypond > > directly but postscript. For this purpose I have added a few lines of > > code right at the beginning in the definition of bookTitleMarkup like > > this (drawing two small horizontal lines in the page margins): > > > > --8<---cut here---start->8--- > > > > bookTitleMarkup = \markup { > > \column { > >\postscript #" > > gsave > > initmatrix > > 1 setlinewidth 0 306 moveto 6 0 rlineto stroke > > 1 setlinewidth 377 306 moveto 6 0 rlineto stroke > > grestore" > >\fill-line { > > \fromproperty #'header:instrument > > ... > > > > --8<---cut here---end--->8--- > > > > Don't know if it helps in your case, but maybe gives you an idea of how > > to proceed. > > > > Have fun > > Torsten > > > > > >
Re: how to draw lines independent from the notes
Expanding on Werner’s example a bit, is this something like what you’re after? \version "2.25.12" \markup \with-dimensions #'(0 . 0) #'(0 . 0) { \translate #'(20 . -20) \center-column { example-text \concat { \arrow-head #X #LEFT ##t \draw-line #'(30 . 0) \arrow-head #X #RIGHT ##t }}} << { f'2 f' f' f' f'1 } { d'2 d' d' d' d'1 } >> \paper { markup-markup-spacing.basic-distance = 0 markup-markup-spacing.minimum-distance = 0 markup-markup-spacing.padding = 0 markup-system-spacing.basic-distance = 0 markup-system-spacing.minimum-distance = 0 markup-system-spacing.padding = 0 top-markup-spacing.basic-distance = 0 top-markup-spacing.minimum-distance = 0 top-markup-spacing.padding = 0 } > 3 juni 2024 kl. 13:43 skrev Paolo Prete : > > Thanks to Torsten and Werner, > > I'm going to use the postscript approach. > > But what about the segment with arrows and centered text? > > I googled a bit, and I also queried ChtaGPT but could not find anything > useful... > > > On Mon, Jun 3, 2024 at 11:46 AM Torsten Krueger wrote: > Paolo Prete wrote on 02.06.2024: > > > How can I draw a vertical (or even diagonal) line independently positioned > > from the notes in the score, that can span across staves, as shown in the > > figure? > > For drawing lines independently from notes I do not use Lilypond > directly but postscript. For this purpose I have added a few lines of > code right at the beginning in the definition of bookTitleMarkup like > this (drawing two small horizontal lines in the page margins): > > --8<---cut here---start->8--- > > bookTitleMarkup = \markup { > \column { >\postscript #" > gsave > initmatrix > 1 setlinewidth 0 306 moveto 6 0 rlineto stroke > 1 setlinewidth 377 306 moveto 6 0 rlineto stroke > grestore" >\fill-line { > \fromproperty #'header:instrument > ... > > --8<---cut here---end--->8--- > > Don't know if it helps in your case, but maybe gives you an idea of how > to proceed. > > Have fun > Torsten > >
Re: Position of nested tuplet brackets
Yes, of course! It's that simple! Thank you very much! On Mon, Jun 3, 2024 at 2:44 PM Werner LEMBERG wrote: > > It seems that the positions of nested tuplet brackets can only be changed > > separately if the inner n-tuplet brackets do not start on the downbeat. > > > > Take this as an example: > > > > \version "2.25.2" > > > > { > > \once \override TupletBracket.positions = #'(6 . 6) > > \tuplet 5/4 { c'4 c' c' c' c' } > > > > \once \override TupletBracket.positions = #'(6 . 6) > > \tuplet 5/4 { c'4 > > \once \override TupletBracket.positions = #'(3 . 3) > > \tuplet 5/4 { c' c' c' c' c' } } > > > > \once \override TupletBracket.positions = #'(6 . 6) > > \tuplet 5/4 { > > \once \override TupletBracket.positions = #'(3 . 3) > > \tuplet 5/4 { c' c' c' c' c' } c' } > > } > > > > What is the reason for this and how can it be changed? > > Replace `\once \override foo = bar ` with `\tweak bar`. > > > Werner >
Re: Position of nested tuplet brackets
> It seems that the positions of nested tuplet brackets can only be changed > separately if the inner n-tuplet brackets do not start on the downbeat. > > Take this as an example: > > \version "2.25.2" > > { > \once \override TupletBracket.positions = #'(6 . 6) > \tuplet 5/4 { c'4 c' c' c' c' } > > \once \override TupletBracket.positions = #'(6 . 6) > \tuplet 5/4 { c'4 > \once \override TupletBracket.positions = #'(3 . 3) > \tuplet 5/4 { c' c' c' c' c' } } > > \once \override TupletBracket.positions = #'(6 . 6) > \tuplet 5/4 { > \once \override TupletBracket.positions = #'(3 . 3) > \tuplet 5/4 { c' c' c' c' c' } c' } > } > > What is the reason for this and how can it be changed? Replace `\once \override foo = bar ` with `\tweak bar`. Werner
Position of nested tuplet brackets
Dear list, It seems that the positions of nested tuplet brackets can only be changed separately if the inner n-tuplet brackets do not start on the downbeat. Take this as an example: \version "2.25.2" { \once \override TupletBracket.positions = #'(6 . 6) \tuplet 5/4 { c'4 c' c' c' c' } \once \override TupletBracket.positions = #'(6 . 6) \tuplet 5/4 { c'4 \once \override TupletBracket.positions = #'(3 . 3) \tuplet 5/4 { c' c' c' c' c' } } \once \override TupletBracket.positions = #'(6 . 6) \tuplet 5/4 { \once \override TupletBracket.positions = #'(3 . 3) \tuplet 5/4 { c' c' c' c' c' } c' } } What is the reason for this and how can it be changed? Thank you and best regards, Adrian tuplet_brackets_positions.pdf Description: Adobe PDF document
Re: how to draw lines independent from the notes
Thanks to Torsten and Werner, I'm going to use the postscript approach. But what about the segment with arrows and centered text? I googled a bit, and I also queried ChtaGPT but could not find anything useful... On Mon, Jun 3, 2024 at 11:46 AM Torsten Krueger wrote: > Paolo Prete wrote on 02.06.2024: > > > How can I draw a vertical (or even diagonal) line independently > positioned > > from the notes in the score, that can span across staves, as shown in the > > figure? > > For drawing lines independently from notes I do not use Lilypond > directly but postscript. For this purpose I have added a few lines of > code right at the beginning in the definition of bookTitleMarkup like > this (drawing two small horizontal lines in the page margins): > > --8<---cut here---start->8--- > > bookTitleMarkup = \markup { > \column { >\postscript #" > gsave > initmatrix > 1 setlinewidth 0 306 moveto 6 0 rlineto stroke > 1 setlinewidth 377 306 moveto 6 0 rlineto stroke > grestore" >\fill-line { > \fromproperty #'header:instrument > ... > > --8<---cut here---end--->8--- > > Don't know if it helps in your case, but maybe gives you an idea of how > to proceed. > > Have fun > Torsten > > >
Re: wordwrap on argument of markup function
Thanks for elaborating! I forgot to hit Reply All when I replied to Jean, excuse me. On 02.06.24 10:10, Ya Gloops wrote: #(define-markup-command (freely layout props width-param text) (number? markup-list?) "Format text for one bar of 'width-param' quarter notes’ length" (interpret-markup layout props #{\markup\box \line { \override #`(line-width . ,width-param) \wordwrap { #text }} #})) \markup \freely #10 { test test test test test test } Le samedi 1 juin 2024 à 17:55:22 UTC+2, Jean Abou Samra a écrit : > (define-markup-command (freely layout props width-param text) (number? markup?) ^^^ Make that `markup-list?`. Otherwise, your command is accepting only a single markup. In your example, \line inside the command is working perfectly (though not actually needed), but \freely gets applied multiple times. HTH Jean
Re: how to draw lines independent from the notes
Paolo Prete wrote on 02.06.2024: > How can I draw a vertical (or even diagonal) line independently positioned > from the notes in the score, that can span across staves, as shown in the > figure? For drawing lines independently from notes I do not use Lilypond directly but postscript. For this purpose I have added a few lines of code right at the beginning in the definition of bookTitleMarkup like this (drawing two small horizontal lines in the page margins): --8<---cut here---start->8--- bookTitleMarkup = \markup { \column { \postscript #" gsave initmatrix 1 setlinewidth 0 306 moveto 6 0 rlineto stroke 1 setlinewidth 377 306 moveto 6 0 rlineto stroke grestore" \fill-line { \fromproperty #'header:instrument ... --8<---cut here---end--->8--- Don't know if it helps in your case, but maybe gives you an idea of how to proceed. Have fun Torsten
Re: gvim point and click
Maybe you could try the call cursor command vim +"call cursor(%l,%c)" %f As in David' remarks, you may need to adjust the quoting to get the desired result. vim +"call cursor(5,3)" file.ly works on the shell command line. On 03/06/2024 06:24, Stefan Thomas wrote: Dear David, thanks for Your reply. Unfortunately, none of your suggestions have brought the desired result! Best, Stefan Am Mo., 3. Juni 2024 um 03:19 Uhr schrieb David Wright : On Sun 02 Jun 2024 at 16:10:56 (+0200), Stefan Thomas wrote: > again, I'm trying to activate point and click in gvim. I made a little > success: > I wrote in the editor options of okular: > gvim --remote-silent +%l %f +normal! %c > When I click on a note, the right document is opened and the cursor is > placed at the correct line, but not at the correct note in the lilypond > file. > What can I do? Perhaps the command you're trying to invoke is, for example: gvim --remote-silent +:123:norm45l path-to-file using literal constants for line number 123 and column 45. Naively, that would mean okular would have something like: gvim --remote-silent +:%l:norm%cl %f but, not being familiar with okular, I can't tell how it would handle %cl (where l means move to the right by %c columns) and whether it would need any quoting. For example, gvim --remote-silent '+:%l:norm%c l' %f might work better. Cheers, David. -- Timothy Lanfear, Bristol, UK.