Changes in lilypond-book?
Hello, after updating a lilypond-based toolchain on one of my PCs to the latest version (2.24.4), I ran into a problem with lilypond-book. I'm not sure if the problem is with lilypond or with python, however here is the issue: I use the following command in a python script: subprocess.run(["lilypond-book", "--output="+args.output,"--pdf","-lERROR","--lily-loglevel=ERROR", file],shell=True) This results in a file not found error from lilypond book: --output=C:\Users\[Username]\Desktop\Tools\Songbook\Sample\pyOut --pdf -lDEBUG --lily-loglevel=ERROR book_general.lytex But running this command directly in the shell, it works: lilypond-book.py --output=C:\Users\[Username]\Desktop\Tools\Songbook\Sample\pyOut --pdf -lDEBUG --lily-loglevel=ERROR book_general.lytex I used this a lot before the update and can't figure it out. Those arguments must get messed up somewhere. FWIW, I'm using the "portable" installation without the installer, because that one messed up my environment variables. Sorry for posting a possibly not strictly lilypond-relevant question, but any help would be appreciated. Kind regards!
Bug in \chords in latest developer version?
Hello, I found very strange behaviour of \chords when used together with \numericTimeSignature. Check the following code: \new Score { << \chords { c1 g c g } \relative c' { \numericTimeSignature c4-1 c c2 d4 d d2 e4 e e c e2 d \bar "|." } >> } When running it on LilyBin, it compiles correctly with the latest stable version, but with latest unstable, it shows no notes or staff, but only a line of chords. I tried to move the \numericTimeSignature to different places, but neither worked: Sometimes I got the chords below my staff, sometimes I got an extra staff with just the timeSignature - I think the place where I have it should work. Are there any changes in the unstable version to this part, or is it simply a bug? Kind regards, SK
Re: Detecting double accidentals
Thank you David, that works perfectly. I would have probably never found this way, even if I understand what it does. Sorry for the late response, didn't expect an answer that fast. If anyone is interested in this project, the full code as well as a quick-and-dirty documentation is available as a gist on GitHub: https://gist.github.com/TheNothingMan/6f5daf540d55b4ad9138e3ff5d3ffbd0 Thank you, kind regards! Am Di., 21. Jan. 2020 um 21:50 Uhr schrieb David Kastrup : > SK writes: > > > Hello, > > > > I wrote a script for generating music theory worksheets for school. One > > feature is the generation of chords that should be named by the students. > > The way this function works is by simply transposing some predefined > chords > > to a new randomly generated root. To keep the difficulty controllable, I > > would like to filter out double accidentals in some cases, e.g. to not > > produce an augmented F# chord. > > Does anybody know about a way to check in scheme if music has double > > accidentals, or can think of another smart way of doing this? > > > > I would not want to define all possible chords manually, and I think that > > filtering out certain root notes is quite complex, too, if you just want > to > > avoid double accidentals. > > > > Kind regards! > > #(define (has-doubles mus) >(any (lambda (p) (not (< -1 (ly:pitch-alteration p) 1))) > (music-pitches mus))) > > #(display (map has-doubles > (list #{ c'4 d' e' fis' g' a' b' #} > #{ cisis'4 d' e' #}))) > > -- > David Kastrup >
Detecting double accidentals
Hello, I wrote a script for generating music theory worksheets for school. One feature is the generation of chords that should be named by the students. The way this function works is by simply transposing some predefined chords to a new randomly generated root. To keep the difficulty controllable, I would like to filter out double accidentals in some cases, e.g. to not produce an augmented F# chord. Does anybody know about a way to check in scheme if music has double accidentals, or can think of another smart way of doing this? I would not want to define all possible chords manually, and I think that filtering out certain root notes is quite complex, too, if you just want to avoid double accidentals. Kind regards!
Re: printKeyCancellation not working as expected
Thanks, this works and is cleaner than overwriting the stencil. -- Forwarded message -- > From: SK > To: lilypond-user@gnu.org > Cc: > Bcc: > Date: Wed, 27 Feb 2019 16:13:24 +0100 > Subject: printKeyCancellation not working as expected > Hello, > > I would like to be able to change key signatures without ANY hints for > educational purposes. For this I use Staff.printKeyCancellation set to > false, together with the visibility options for key signatures. It works > fine for most keys, but when changing to a key without any accidentals such > as c major, the natural signs are shown and tell the student where there > have been accidentals before. > Any help would be very appreciated. > > > > > > -- Forwarded message -- > From: Malte Meyn > To: lilypond-user@gnu.org > Cc: > Bcc: > Date: Wed, 27 Feb 2019 16:18:45 +0100 > Subject: Re: printKeyCancellation not working as expected > > > Am 27.02.19 um 16:13 schrieb SK: > > Hello, > > > > I would like to be able to change key signatures without ANY hints for > > educational purposes. For this I use Staff.printKeyCancellation set to > > false, together with the visibility options for key signatures. It works > > fine for most keys, but when changing to a key without any accidentals > > such as c major, the natural signs are shown and tell the student where > > there have been accidentals before. > > Any help would be very appreciated. > > Try > \omit Staff.KeyCancellation > instead. > > > ___ > 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
printKeyCancellation not working as expected
Hello, I would like to be able to change key signatures without ANY hints for educational purposes. For this I use Staff.printKeyCancellation set to false, together with the visibility options for key signatures. It works fine for most keys, but when changing to a key without any accidentals such as c major, the natural signs are shown and tell the student where there have been accidentals before. Any help would be very appreciated. \new Score { \key g \major f4 g a b \set Staff.explicitKeySignatureVisibility = #all-invisible \set Staff.printKeyCancellation = ##f \override Staff.KeySignature.break-visibility = #all-invisible \key f \major f4 g a b \key c\major f4 g a b } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Get NoteName as String
Hello, I try to find a way to get a notename as string, so that it can be processed further. To be concrete, I want to build a scale task generator that randomly selects a pitch and scale, then prints the scale as notes as well as the tonic/root/finalis and the mode as lyrics (or other text). The result should look like the file I attached, but it is important to insert the pitch in the lyrics automatically. I tried to get the text from a NoteNames context, but didn't come close to what I need. Maybe someone out there has a better idea... All the best! \score { { \key #(ly:make-pitch 1 3 0) \dorian << \transpose d f { d' e' f' g' a' b' c'' d'' } \new NoteNames { } >> } \addlyrics { "f dorian" _ } }___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user