Re: help with Wrong type of argument
On 5/1/2023 4:52 AM, Lukas-Fabian Moser wrote: #`((lineto 0 ,hgt) (closepath)) is the a list with two elements, namely - the 3-element list containing 'lineto, 0 and the value of the variable hgt - the 1-element list containing the symbol 'closepath. This may also be written as: #(list (list 'lineto 0 hgt) (list 'closepath)) or, mixing the two styles, #(list (list 'lineto 0 hgt) '(closepath)) Thanks, Lucas. That helps too! -- o_ Jeff Olson (\___\/_/) jjocanoe ~ ~ ~ / ~ ~ ~ ~ @gmail.com
Re: help with Wrong type of argument
On 5/1/2023 12:20 AM, Michael Werner wrote: #`((lineto 0 ,hgt) Thank you so much for your quick fix and very patient explanation, Michael! I had noticed the quote (') and figured that an unquote (,) would be needed but forgot that it required changing the quote to a quasiquote (`). All the gory details can be found at: https://extending-lilypond.gitlab.io/en/scheme/quoting.html Thanks again! I had read that article about quoting when Jean first advertised it but quasiquoting didn't sink in. Re-reading it now, it seems more complete than I recall and all makes sense. It's an excellent explanation (thanks Jean!). -- o_ Jeff Olson (\___\/_/) jjocanoe ~ ~ ~ / ~ ~ ~ ~ @gmail.com
Re: frescobaldi themes
Ciao Valentin, Thank you for your kind msg! You wrote: [install multiple themes all at once in Frescobaldi] > I suppose the easiest way to be able to install multiple files would be to > slightly > tweak Frescobaldi’s code (which can easily be done on a distributed copy > as it is python). > For this find the location of of the frescobaldi_app module and open > widgets/schemeselector.py. > [] I found the file and tried to modify it. Unfortunately I have a (pre)compiled .pyc file so I can't modify it directly. Now I don't have time but I'll try to find the source and compile it (hopefully I'll be able to do it). Thanks a lot! Gianmaria
Re: How can I print only some parts of a score (staves, but no chords)?
Hi Werner, >> \include “chorded.ily” > Just to avoid potential problems: This must be > \include "chorded.ily" > i.e., straight doublequotes. Thanks for that. I recently switched over to a "new" [2014] Mac Mini (because my 2011 iMac finally died), and the auto-smart-quotes feature was still on from the initial OS install — I’ve now turned it off, so the only “smart quotes” will be the ones I’m smart enough to generate myself. ;) Cheers, Kieren. __ My work day may look different than your work day. Please do not feel obligated to read or respond to this email outside of your normal working hours.
Re: How can I print only some parts of a score (staves, but no chords)?
> Sure! Just > > \include “chorded.ily” Just to avoid potential problems: This must be \include "chorded.ily" i.e., straight doublequotes. Werner
Re: How can I print only some parts of a score (staves, but no chords)?
Hi Alessandro, > Let me explain, because I'm afraid I fell into the XY problem (if that's > true I apologize for the time wasted). I have a directory with all the > songs I transcribed, like: > . > ├── song1.ly > ├── song2.ly > ├── song3.ly > └── song4.ly > > I would like to be able to compose each song separately (so that I can > quickly inspect what I am doing, and in case print out a single sheet > per time), and then maybe have a file (LaTeX or Lilypond) that includes > different songs. This is exactly what I do, for most of my projects. I write operas and musicals and other large-scale multi-movement works for the “musical stage”. Take, for example, my current front-burner project, “The Quest” (a two-act “Broadway-style” musical about four Grade 9 girls who play a D game called “Quest”… It has 24 musical songs/cues in it. I have 24 _notes.ily files Prologue_notes.ily StuckInsideASchool_notes.ily etc. In each, I have a variable which creates a “full score” for that song, and I have a file editing.ly with which I can work on any given single song/cue by simply changing which notes file I \include. Finally, I have all the different output scores I need: TheQuest_pianoconductor.ly TheQuest_pianovocal.ly TheQuest_vocalchoral.ly TheQuest_score.ly TheQuest_keyboard.ly TheQuest_bass.ly etc. In those, I \include the appropriate style file (musical_parts_20pt.ily or musical_pianoconductor.ily or whatever) so that the output is exactly what I want/need. > I would like to control whether to print chords or not > depending on a option (even better a CLI argument, > but I don’t think it's possible). I’m quite sure a CLI argument could be passed, and then the appropriate Scheme code in your Lilypond file could include/exclude chords as instructed. Hope this helps! Kieren. __ My work day may look different than your work day. Please do not feel obligated to read or respond to this email outside of your normal working hours.
Re: How can I print only some parts of a score (staves, but no chords)?
Follow up: indeed, a thing like \version "2.24.1" \layout{ \context{ \ChordNames \remove Chord_name_engraver } } \include "Del-Tuo-Spirito-Signore.ly" \include "Ô-Toi-l-au-delà-de-tout.ly" seems to WORK! Yay! But is this ok? Are there more idiomatic ways to do this? -- Alessandro Bertulli
Re: How can I print only some parts of a score (staves, but no chords)?
Thanks, this is the idea I would like to do, since I need to combine multiple files together, and thus I cannot simply use variables: I should use distinct names for everything, not to mention that I couldn't just "test out" a new piece while I'm writing it without recomposing the entire "book". Let me explain, because I'm afraid I fell into the XY problem (if that's true I apologize for the time wasted). I have a directory with all the songs I transcribed, like: . ├── song1.ly ├── song2.ly ├── song3.ly └── song4.ly I would like to be able to compose each song separately (so that I can quickly inspect what I am doing, and in case print out a single sheet per time), and then maybe have a file (LaTeX or Lilypond) that includes different songs. There, I would like to control whether to print chords or not depending on a option (even better a CLI argument, but I don't think it's possible). > Sure! Just > > \include “chorded.ily” > > or not, depending on whether you want chords — then be sure to \remove the > relevant engravers in your main file, and \consist them in chorded.ily and > voila! :) Yeah I too was thinking about style sheets, but I am still a beginner and I don't know how to use them. Can I disable an engraver for an entire file, for instance? Because if so then it's trivial, I can just place at the beginning of the "main" file whether I want chords or not, then simply \include the song files(?) -- Alessandro Bertulli
Re: How can I print only some parts of a score (staves, but no chords)?
Hi Alessandro! > For comparison, LaTeX's songs package > (https://songs.sourceforge.net/) can change the type of document > produced by changing one single option in the document preamble (say, > from chorded to lyric). Let's see if I can do the same in Lilypond. Sure! Just \include “chorded.ily” or not, depending on whether you want chords — then be sure to \remove the relevant engravers in your main file, and \consist them in chorded.ily and voila! :) Cheers, Kieren. __ My work day may look different than your work day. Please do not feel obligated to read or respond to this email outside of your normal working hours.
Re: How can I print only some parts of a score (staves, but no chords)?
>> P.S. I am happy there are other solution other than lilypond-book, >> because to me it seems a very fragile solution (copying the doc and then >> composing manually), especially if you are embedding music in a complex >> LaTeX document. There is lyluatex with LuaLaTeX but I don't know if the >> output is the same in terms of quality > > If you’re talking about the lyluatex that Urs Liska was working on, > the quality is superb — if I only had time to retool my workflow, I > would probably move it all to that framework. Actually I was referring to just the CTAN package lyluatex (https://ctan.org/pkg/lyluatex). Didn't know Urs Liska's lyluatexmp existed, tho for now it seem still WIP? Anyway, now I'll try tweaking a bit with \book{} commands, let's see if I can achieve what I need. For comparison, LaTeX's songs package (https://songs.sourceforge.net/) can change the type of document produced by changing one single option in the document preamble (say, from chorded to lyric). Let's see if I can do the same in Lilypond. -- Alessandro Bertulli
Re: help with Wrong type of argument
Hi Michael, To say I'm no expert in Scheme is a vast understatement. However, I think I found the answer to this one. Just in order to reassure you a bit: Basically, as I understand things, this bit: #'((lineto 0 hgt) Accosrding to my rather vague understanding of Scheme syntax the ' between the # and the 1st ( is saying don't interpret anything in that expression, just pass it as is. Which means that your variable hgt isn't getting passed as a variable but is getting passed as simply a series of three characters. Better make that: hgt is passed as the "symbol" hgt (usually entered as 'hgt in Scheme). Other than that, you're right. What seems to be needed (and what made this appear to work here) is to use what's called quasiquoting. Basically, it lets you designate certain bits within an expression as "this part should be interpreted before getting passed on". This entails changing the above line to: #`((lineto 0 ,hgt) By changing the ' into a ` (BTW, that's the one that on my keyboard is up near the top left, just under the Escape key) you say that there's something in the following expression that will need interpreted. Then the comma before the variable name points out which item to interpret. That's correct (modulo the term "interpret" where "evaluate" is more common), and quasiquoting indeed is the right way to construct complicated list/pair structures containing lots of symbols and some variables that should be evaluated. There's one other way which is sometimes useful (but admittedly won't simplify the present use case much): #`((lineto 0 ,hgt) (closepath)) is the a list with two elements, namely - the 3-element list containing 'lineto, 0 and the value of the variable hgt - the 1-element list containing the symbol 'closepath. This may also be written as: #(list (list 'lineto 0 hgt) (list 'closepath)) or, mixing the two styles, #(list (list 'lineto 0 hgt) '(closepath)) Lukas
Re: help with Wrong type of argument
Hi Jeff, To say I'm no expert in Scheme is a vast understatement. However, I think I found the answer to this one. Or, at least, something that seems to make this code work for me here. On Mon, May 1, 2023 at 1:00 AM Jeff Olson wrote: %< snip >% > Here's my code (small if not minimal): > > \version "2.24.0" > > #(define-markup-command (dopath layout props xtip ytip hgt wid txt rot) >(number? number? number? number? string? number?) >(let ( > (a (* wid 0.4)) > ) >(interpret-markup layout props > #{\markup \translate #(cons xtip ytip) \rotate #rot \path #0.25 > Basically, as I understand things, this bit: >#'((lineto 0 hgt) > Accosrding to my rather vague understanding of Scheme syntax the ' between the # and the 1st ( is saying don't interpret anything in that expression, just pass it as is. Which means that your variable hgt isn't getting passed as a variable but is getting passed as simply a series of three characters. What seems to be needed (and what made this appear to work here) is to use what's called quasiquoting. Basically, it lets you designate certain bits within an expression as "this part should be interpreted before getting passed on". This entails changing the above line to: #`((lineto 0 ,hgt) By changing the ' into a ` (BTW, that's the one that on my keyboard is up near the top left, just under the Escape key) you say that there's something in the following expression that will need interpreted. Then the comma before the variable name points out which item to interpret. There's a great deal more to all this, but this is the bare basics as I sorta kinda vaguely understand them. All the gory details can be found at: https://extending-lilypond.gitlab.io/en/scheme/quoting.html > (closepath)) >#}))) > > \markup \dopath #10 #0 #2 #1 "D" #-5 > Hope this helped at least a little. Or at least didn't confuse things worse. Michael