Re: Orchestral strings, how to organise score and parts for divisi, solos, desks etc.
On Wed, 27 May 2020 at 18:10, Valentin Villenave wrote: > > On 5/27/20, Lib Lists wrote: > > merge the stems so > > that the final result looks like one voice. > > In that case, what you want clearly is \partcombine (\partCombine since 2.21). > > If you have more than two voices, then you can always apply another > \partCombine on top of the first two voices, or use other tricks to > deal with the more complex situations. I understand. Unfortunately I cannot find a way to use the remove-layer technique with \partcombine (see attached file). I'd like to hide the top staff while maintaining the staff group between bar 19-24 for the difficult passage. Is there a way to achieve this? In other words there are four notations that I'd need to achieve for divisi: unisono, divisi (a2, a3, etc.) on same voice & same staff, divisi on different voices & same staff, divisi on different staves. > > > Finally, adding a \shortInstrumentName in the StaffGroup gives an > > error, but the resulting pdf is otherwise correct. > > instrumentName and shortInstrumentName are both siple property > definitions, not variables or functions so the \ is not needed; just > instrumentName = "something". That worked, thank you! > > Cheers, > -- V. 200519_LILYPOND_Violin_Divisi_Solution_002_002.ly Description: Binary data
Re: Adding a line break on \breve note
Maybe not the easiest way, but a clean way without doing random spacing overrides would be like this.\version "2.20.0" \paper { #(set-paper-size "a4landscape") } ToninaZalmu = \key c \major FirstMusicVerse = \relative { \cadenzaOn \ToninaZalmu g'\breve e8 g a4 g \bar "|" } VerseOne = \lyricmode { \set Lyrics.stanza = "1." \once\override LyricText.self-alignment-X = #LEFT \markup { \column { \right-align { "Lorem ipsum dolor sit amet, consectetuer adipiscing elit.+" \line { "Etiam commodo dui eget wisi. Nunc auctor." } } } } \temporary\override LyricHyphen.height = #(- 0.42 3) \markup {\column { " " { Sus }}} -- \markup {\column { " " { pen }}} -- \markup {\column { " " { di }}} -- \markup {\column { " " { sse. }}} \revert LyricHyphen.height } VerseTwo = \lyricmode { \set Lyrics.stanza = "2." \once\override LyricText.self-alignment-X = #LEFT \markup { \column { \right-align { "Lorem ipsum dolor sit amet, consectetuer adipiscing elit.+" \line { "Etiam commodo dui eget wisi. Nunc auctor." } } } } \temporary\override LyricHyphen.height = #(- 0.42 3) \markup {\column { " " { Sus }}} -- \markup {\column { " " { pen }}} -- \markup {\column { " " { di }}} -- \markup {\column { " " { sse. }}} \revert LyricHyphen.height } \score { \new Staff = "staff" << \clef "treble" \new Voice = "first" << \voiceOne \FirstMusicVerse >> \new Lyrics \with { alignBelowContext = "staff" \override VerticalAxisGroup. nonstaff-relatedstaff-spacing.padding = #2 \override VerticalAxisGroup. nonstaff-nonstaff-spacing.padding = #1 } \lyricsto "first" { \VerseOne } \new Lyrics \with { alignBelowContext = "staff" \override VerticalAxisGroup. nonstaff-nonstaff-spacing.padding = #1 } \new Lyrics \with { alignBelowContext = "VerseOne" \override VerticalAxisGroup. nonstaff-nonstaff-spacing.padding = #1 } \lyricsto "first" { \VerseTwo } >> }
Re: Adding a line break on \breve note
Sorry, I left an orphaned lyrics context in here.\version "2.20.0" \paper { #(set-paper-size "a4landscape") } ToninaZalmu = \key c \major FirstMusicVerse = \relative { \cadenzaOn \ToninaZalmu g'\breve e8 g a4 g \bar "|" } VerseOne = \lyricmode { \set Lyrics.stanza = "1." \once\override LyricText.self-alignment-X = #LEFT \markup { \column { \right-align { "Lorem ipsum dolor sit amet, consectetuer adipiscing elit.+" \line { "Etiam commodo dui eget wisi. Nunc auctor." } } } } \temporary\override LyricHyphen.height = #(- 0.42 3) \markup {\column { " " { Sus }}} -- \markup {\column { " " { pen }}} -- \markup {\column { " " { di }}} -- \markup {\column { " " { sse. }}} \revert LyricHyphen.height } VerseTwo = \lyricmode { \set Lyrics.stanza = "2." \once\override LyricText.self-alignment-X = #LEFT \markup { \column { \right-align { "Lorem ipsum dolor sit amet, consectetuer adipiscing elit.+" \line { "Etiam commodo dui eget wisi. Nunc auctor." } } } } \temporary\override LyricHyphen.height = #(- 0.42 3) \markup {\column { " " { Sus }}} -- \markup {\column { " " { pen }}} -- \markup {\column { " " { di }}} -- \markup {\column { " " { sse. }}} \revert LyricHyphen.height } \score { \new Staff = "staff" << \clef "treble" \new Voice = "first" << \voiceOne \FirstMusicVerse >> \new Lyrics \with { alignBelowContext = "staff" \override VerticalAxisGroup. nonstaff-relatedstaff-spacing.padding = #2 \override VerticalAxisGroup. nonstaff-nonstaff-spacing.padding = #1 } \lyricsto "first" { \VerseOne } \new Lyrics \with { alignBelowContext = "VerseOne" \override VerticalAxisGroup. nonstaff-nonstaff-spacing.padding = #1 } \lyricsto "first" { \VerseTwo } >> }
Re: Replace sub-string
Arron: Just getting to this and having a problem. See below. On Sat, May 23, 2020 at 12:31 AM Aaron Hill wrote: > > On 2020-05-22 8:38 pm, Freeman Gilmore wrote: > > Is there a procedure, to replace 'all' occurrences of a sub-string > > within a string. with a string? > > If so please give an example. > > regexp-substitute/global [1] should do the job. > > [1]: > https://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Regexp-Functions.html#Regexp-Functions > > > > (regexp-substitute/global #f >"(c|sh|w)ould of" >"I would of done that if I could of." >'pre 1 "ould have" 'post) > > => "I would have done that if I could have." \version "2.20.0" #(regexp-substitute/global #f "(c|sh|w)ould of" "I would of done that if I could of." 'pre 1 "ould have" 'post) Gives: Unbound variable: regexp-substitute/global Also: \version "2.20.0" #(regexp-substitute/global #f "[ \t]+" "this is the test" 'pre "-" 'post) Gives: Unbound variable: regexp-substitute/global What am i missing? Thank you, ƒg > > > > > -- Aaron Hill >
Re: Replace sub-string
On 2020-05-28 4:46 am, Freeman Gilmore wrote: Just getting to this and having a problem. See below. \version "2.20.0" #(regexp-substitute/global #f "[ \t]+" "this is the test" 'pre "-" 'post) Gives: Unbound variable: regexp-substitute/global What am i missing? You will need to bring in the regular expression module: \version "2.20.0" #(use-modules (ice-9 regex)) \markup #(regexp-substitute/global #f "[ \t]+" "this is the test" 'pre "-" 'post) NOTE: I am using \markup above as a simple way to visualize the resulting string. -- Aaron Hill
Re: Replace sub-string
On Thu, May 28, 2020 at 8:10 AM Aaron Hill wrote: > > On 2020-05-28 4:46 am, Freeman Gilmore wrote: > > Just getting to this and having a problem. See below. > > > \version "2.20.0" > > #(regexp-substitute/global #f "[ \t]+" "this is the test" 'pre "-" > > 'post) > > > > Gives: Unbound variable: regexp-substitute/global > > > > What am i missing? > > You will need to bring in the regular expression module: > > > \version "2.20.0" > > #(use-modules (ice-9 regex)) > > \markup >#(regexp-substitute/global #f > "[ \t]+" > "this is the test" > 'pre "-" 'post) > Thank you, that works. Do you normally places '#(use-modules (ice-9 regex))' with the include files? > > NOTE: I am using \markup above as a simple way to visualize the > resulting string. I did not know about using this, this way, thanks > > > -- Aaron Hill
Strange error from define-syntax
Dear Ponders & Schemers, I wanted to try creating a simple Scheme macro. I've never done this before, so I may well be going about it all wrong, but the error I get doesn't make sense. Here is a minimal non-working example: \version "2.20.0" #(use-modules (ice-9 syncase)) #(define-syntax set-default (syntax-rules () ((set-default name value) (if (eqv? name 'UNDEF) name value) ))) #(define some-setting 44) #(set-value some-setting 99) #(ly:message "some-setting = ~a\n" some-setting) This gives the error: Wrong number of arguments to #> Huh? I also tried define-syntax-rule, which came up unbound. Any insights into what I'm doing wrong would be welcome. Thanks, John
When (in seconds) does each page begin?
I would like to obtain timing information to tell me at how many seconds into the score each page begins. I have had a go at this, and failed. So I'm now looking for answers to two questions: 1. How to obtain this output from lilypond (e.g. a file listing the number of seconds into the score at which each page begins.), and 2. Why does my attempt (see below) not work? I'm new to this type of deeper digging into lilypond, and I hope to learn from my mistakes. What have I tried so far? I guessed that the page-break-event might occur at the times of interest to me. Looking at http://lilypond.org/doc/v2.19/Documentation/notation/saving-music-events-to-a-file, I modified event-listener.ly in an attempt to catch the page-break-event, like so: % New function to handle the event: #(define (format-page engraver event) (print-line engraver "page")) % add a listener for the event: #(define event-listener-engraver (make-engraver (listeners (page-break-event . format-page) (tempo-change-event . format-tempo) (rest-event . format-rest) etc ... This didn't produce the output I was looking for (no 'page' in the generated .notes files) So I wondered (just guessing) if I needed to change the context to which event-listener-engraver was being added, do I changed that as follows: \layout { \context { %\Voice %% try a broader context :Score: \Score \consists #event-listener-engraver } } No joy. My final hack was to add handling for the line-break-event and page-turn-event. Again no joy. I am out of my depth. Have I perhaps just exposed the fact that I don't properly understand the interplay between events, contexts and engravers? Is there some difference between the page-break-event and the the events that are properly handled by event-listener.ly ? Matt
Re: Strange error from define-syntax
"John Schlomann" writes: > Dear Ponders & Schemers, > > > > I wanted to try creating a simple Scheme macro. I've never done this before, > so I may well be going about it all wrong, but the error I get doesn't make > sense. > > > > Here is a minimal non-working example: > > > > \version "2.20.0" > > #(use-modules (ice-9 syncase)) > > > > #(define-syntax set-default > >(syntax-rules () > > ((set-default name value) > > (if (eqv? name 'UNDEF) name value) > >))) > > > > #(define some-setting 44) > > #(set-value some-setting 99) > > #(ly:message "some-setting = ~a\n" some-setting) > > > > This gives the error: > > Wrong number of arguments to # (arg)>> > > > > Huh? I also tried define-syntax-rule, which came up unbound. Any insights > into what I'm doing wrong would be welcome. syntax-case doesn't work in LilyPond since LilyPond defines \void as a music function and the Guile 1.8 implementation of syntax-case falls apart if 'void has a value. You are not doing anything wrong other than expecting syntax-case to work. Stick to macros instead of define-syntax. Sorry for that. -- David Kastrup
RE: Strange error from define-syntax
Thank you, David, for your quick response. I'm not sure what you mean by "stick to macros". I thought define-syntax was the way to define a macro. What am I missing? John > -Original Message- > From: David Kastrup [mailto:d...@gnu.org] > Sent: Thursday, May 28, 2020 11:54 AM > To: John Schlomann > Cc: 'Lilypond-User Mailing List' > Subject: Re: Strange error from define-syntax > > "John Schlomann" writes: > > > Dear Ponders & Schemers, > > > > > > > > I wanted to try creating a simple Scheme macro. I've never done this > before, > > so I may well be going about it all wrong, but the error I get doesn't make > > sense. > > > > > > > > Here is a minimal non-working example: > > > > > > > > \version "2.20.0" > > > > #(use-modules (ice-9 syncase)) > > > > > > > > #(define-syntax set-default > > > >(syntax-rules () > > > > ((set-default name value) > > > > (if (eqv? name 'UNDEF) name value) > > > >))) > > > > > > > > #(define some-setting 44) > > > > #(set-value some-setting 99) > > > > #(ly:message "some-setting = ~a\n" some-setting) > > > > > > > > This gives the error: > > > > Wrong number of arguments to # > (arg)>> > > > > > > > > Huh? I also tried define-syntax-rule, which came up unbound. Any insights > > into what I'm doing wrong would be welcome. > > syntax-case doesn't work in LilyPond since LilyPond defines \void as a > music function and the Guile 1.8 implementation of syntax-case falls > apart if 'void has a value. > > You are not doing anything wrong other than expecting syntax-case to > work. Stick to macros instead of define-syntax. Sorry for that. > > -- > David Kastrup
Re: Strange error from define-syntax
On 5/28/20, John Schlomann wrote: > Thank you, David, for your quick response. I'm not sure what you mean by > "stick to macros". I thought define-syntax was the way to define a macro. > What am I missing? I think David may have been referring to LilyPond macros; have a look at that for example: http://lilypond.org/doc/v2.21/Documentation/extending-big-page#interfaces-for-programmers Cheers, -- V.
Re: When (in seconds) does each page begin?
On 5/28/20, Matt Wallis wrote: > I would like to obtain timing information to tell me at how many seconds > into the score each page begins. I have had a go at this, and failed. If you’re trying to make videos out of LilyPond scores, here are some links for you: https://lists.gnu.org/archive/html/lilypond-user/2020-03/msg00275.html https://lists.gnu.org/archive/html/lilypond-user/2020-03/msg00276.html https://lists.gnu.org/archive/html/lilypond-user/2017-11/msg00098.html https://lists.gnu.org/archive/html/lilypond-user/2017-07/msg00234.html https://gitlab.com/sigmate/lilypond-html-live-score (That doesn’t answer your question, but others will certainly chime in :-) Cheers, -- V.
Re: Strange error from define-syntax
"John Schlomann" writes: > Thank you, David, for your quick response. I'm not sure what you mean by > "stick to macros". I thought define-syntax was the way to define a macro. > What am I missing? define-macro and defmacro apparently. -- David Kastrup
Re: When (in seconds) does each page begin?
On 28/05/2020 19:29, Valentin Villenave wrote: On 5/28/20, Matt Wallis wrote: I would like to obtain timing information to tell me at how many seconds into the score each page begins. I have had a go at this, and failed. If you’re trying to make videos out of LilyPond scores, here are some links for you: https://lists.gnu.org/archive/html/lilypond-user/2020-03/msg00275.html https://lists.gnu.org/archive/html/lilypond-user/2020-03/msg00276.html https://lists.gnu.org/archive/html/lilypond-user/2017-11/msg00098.html https://lists.gnu.org/archive/html/lilypond-user/2017-07/msg00234.html https://gitlab.com/sigmate/lilypond-html-live-score (That doesn’t answer your question, but others will certainly chime in :-) Many thanks for the links. Some of them I have seen before, but I'm not keen on a solution that requires patching lilypond. The others, I will look into. Yes- as you suspected, I want to make videos. My initial needs are very basic - just to display each page at the correct time. I currently get the timings from a simple script that plays the audio, and I press 'enter' each time the page of the score changes, to record the timing. But I want to automate this. With that timing data alone, I can produce very basic videos that meet my (initial) requirements. The output from event-listener is so close. I just need to get it to listen to the appropriate events ... if that is possible. Maybe I'll want to colour notes too at some point :-) Perhaps those links will answer the next question: Can I dump out from lilypond the following information for each note: note start time; note duration; co-ordinates of the centre of the note on the PNG created by lilypond I think that's all the data needed from lilypond in order to create a quite nice video with note highlighting. How difficult can that be? :-) Is it the case that this can't be triggered neatly from a note event, because when the note event is received, the engravers have not yet decided where on the score that note should be put? Matt
How to enter chords names in makam.ly
Hi, I am writing music including makam.ly but chords names different from natural notes are not recognized by Lilypond, so for example I can write c:m (C minor) but not cb:m (C# minor)... Anyone can help me please? -- Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
RE: Strange error from define-syntax
define-macro works perfectly for me, even though the Guile manual seems to somewhat disparage its use. Thank you, David. John > -Original Message- > From: David Kastrup [mailto:d...@gnu.org] > Sent: Thursday, May 28, 2020 2:02 PM > To: John Schlomann > Cc: 'Lilypond-User Mailing List' > Subject: Re: Strange error from define-syntax > > "John Schlomann" writes: > > > Thank you, David, for your quick response. I'm not sure what you mean by > > "stick to macros". I thought define-syntax was the way to define a macro. > > What am I missing? > > define-macro and defmacro apparently. > > -- > David Kastrup
Re: Strange error from define-syntax
"John Schlomann" writes: > define-macro works perfectly for me, even though the Guile manual seems to > somewhat disparage its use. Well, it's not the modern Scheme way but at the current point of time LilyPond works best with Guile 1.8. -- David Kastrup
Re: When (in seconds) does each page begin?
On 5/28/20, Matt Wallis wrote: > The output from event-listener is so close. I just need to get it to > listen to the appropriate events ... if that is possible. Then you should definitely have a look at the last link I sent (lilypond-html-video); IIRC it uses a Scheme engraver (so no patching Lily itself) to output svg with additional timing information encoded as data- attributes for each rhythmic event. Then one can use that to get a cursor, change CSS attributes on the fly (e.g. noteheads opacity), switch from one page to the next, etc. It’s still very much WIP, but you can have a look at the examples (particularly the vibraphone one) to get an idea. I’m CCing Mathieu as it’s his project. Mathieu, you can read Matt’s previous message here: https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00527.html Cheers, -- V.
Re: How to enter chords names in makam.ly
On 5/28/20, prosfigaki80 wrote: > Hi, I am writing music including makam.ly but chords names different from > natural notes are not recognized by Lilypond Greetings, you’re right. You can fix it by adding this at the top of your file: \include "makam.ly" #(set! language-pitch-names (append language-pitch-names (list `(makam . ,makamPitchNames #(set! standard-alteration-glyph-name-alist (append standard-alteration-glyph-name-alist makamGlyphs)) \language "makam" I’ll edit the makam.ly file itself to include that in the next LilyPond release. Even with this modification, however, chord notation remains limited for non-semitones accidentals: for example the following example works (more or less) for NoteNames, but not very well for ChordNames: music = { } << \new Staff \music \new NoteNames \music \new ChordNames \music >> Cheers, -- V.