Extract notes from chords, with silence when there are none
I'd like to take a passage of music that contains chords with differing numbers of notes, and some single notes, and extract it into separate monophonic streams such that their union is the original passage. The application is to generate microtonal MIDI using pitch bend, which can only practically play one note per channel, from music entered as polyphonic voices for typesetting convenience. I'm aware of the snippet at http://lsr.di.unimi.it/LSR/Item?id=545 and it does almost what I want, except for the handling of missing notes. If I specify an index greater than the number of notes playing at a given moment, then this code returns the highest-numbered note that exists. I don't understand why anyone would want that behaviour, but that's what the code does. I want to have rests, not duplicated notes, in the remaining voices when there are fewer notes playing than the number of voices. Is there any simple, obvious way to modify the code to do this? I can probably get it to work with enough trial and error, but it's not clear to me where in the code it is actually handling the case of index greater than the number of notes, so I'm not sure what to try modifying first. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Extract notes from chords, with silence when there are none
On Wed, 16 Sep 2015, David Kastrup wrote: > > Just to clarify, in the case of 3-voice music, how would you expect it to > > deal with a 2 note chord? > > > > One note to Treble, one to Bass, or one in Treble, one in Alto, or... what? > > As I read him, he does not care. First note anywhere, second note > anywhere else, skip in the remaining expression. This is for midi. That's right. I just want any two notes that play simultaneously to be returned by separate index values into the extraction function, and any other index values to return something that will be silent (either a skip or a rest). The typesetting of human-readable score will be from the original single polyphonic voice; the splitting is only for MIDI, only to separate the pitch-bend data for different notes, and the split channels will be played using identical settings, so the exact assignment of notes to index values (channels) can be arbitrary. I would expect that the easiest way to do the note assignment would be what I described in my initial message - change the "extract" script to return silence instead of the last note in the data structure, when the index is greater than the number of notes. Then with two simultaneous notes they will be returned by index values 1 and 2, and silence returned by index 3. I don't need to deal with cases like << { d''1 } { c'2 c'2 } >>, because the input really is a single polyphonic voice. Notes will all start and stop together, only the number of notes changes. FWIW, I'm aware of the script at http://x31eq.com/lilypond/, which attempts to do better microtonality with LilyPond and MIDI Tuning Standard messages, but it's not suitable for my needs because I'm sending the data to a very simple MIDI device that doesn't understand MTS, only pitch bend. (And I think it would require separating the notes into channels first anyway.) -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Extract notes from chords, with silence when there are none
On Wed, 16 Sep 2015, Thomas Morley wrote: > Is my recent coding here: > http://www.lilypondforum.de/index.php?topic=2080.msg11479#msg11479 > of any help? On my first few attempt to load this page the server didn't respond, but it seems to work now, and yes, that looks like it does what I want. Thanks! -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Extract notes from chords, with silence when there are none
On Thu, 17 Sep 2015, msk...@ansuz.sooke.bc.ca wrote: > On my first few attempt to load this page the server didn't respond, but > it seems to work now, and yes, that looks like it does what I want. I spoke too soon: the code doesn't handle single notes (non-chords), so it's not a complete solution. But maybe I can further modify it. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Chords and what they mean
On Thu, 17 Sep 2015, Blöchl Bernhard wrote: > I would call (always depending on the context) Cmadd4, F7sus2/C, > D#6no5add2/C. > Always consider the harmonic context!!! What exactly does the "harmonic context" mean? What would be specific examples of contexts where it could make sense to call this set of notes Cmadd4, and contexts where it would be better to call it F7sus2/C, etc.? If we are hoping to teach a computer program, i.e. LilyPond, to assign correct names to chords, then we have to really say what the considerations are that lead one name to be correct over another. I'd like to think it could be as simple as looking at the current key signature for a clue, but I realize that's only likely to actually give the right results in limited cases, and to highlight whatever errors remain. Maybe a smarter solution could involve a language model (hidden Markov, context-free grammar, etc.) that could assign a likelihood to each chord name for a set of notes depending on the ones before and after it - like the standard techniques for determining which words in a sentence are nouns and verbs and so on, even though any single word may be ambiguous. It sure would be useful if there were a system of descriptive names for sonorities *in isolation* that could be understood as giving a single name to the set of notes not commenting on anything else except which notes are and are not present, but I realize that's not the information conventional chord names are intended to convey. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Extract notes from chords, with silence when there are none
On Thu, 17 Sep 2015, Gilles THIBAULT wrote: > So Chris, the last change you have to make in the code is to change > > line 73 (in \extractNote definition) > (extract-note music n)) > > by > > (extract-note (event-chord-wrap! music) n)) Assuming you mean me... I just found a message I thought I'd already sent, in my "postponed drafts" folder. Most likely I started to write it, then saw more mail coming in on this thread, stopped to read that in case it could answer my problem, and never got back to the original message. That message is now obsolete, but in it I described how making your first change just resulted in the error message "fatal error: cannot find music object: RestEvent 'duration". Now, I made your second change and continued getting the "fatal error: cannot find music object: RestEvent 'duration" message. Then I tried downloading the file and making the change again, exactly as before, and got different error messages. I ran a diff on the files and got this (as part of longer output)... 40c40 < (make-music 'RestEvent 'duration (ly:music-property note 'duration --- > (make-music 'RestEvent 'duration (ly:music-property note > 'duration ...which is utterly bizarre! Apparently the same identical line of code, reported by diff as being different. However, that was a clue. After some digging around with hex dump, it appears that the issue is when I copied and pasted from your message into the file the first time, some invisible HTML-related garbage (namely, 0xA0 characters) was copied too. Those characters *look* like spaces, but LilyPond neither recognizes them as such nor reports them as errors. It just produces an incorrect parse. Probably, the same issue is what causes all your messages to appear double-spaced on my screen, making them hard to read. I wish people would stop using HTML for email. Anyway, with the second change and the removal of the HTML garbage, the script seems to do what I was hoping for. Thanks! -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Chords and what they mean
On Fri, 18 Sep 2015, Blöchl Bernhard wrote: > I tried to make clear that there is not just a single correct name for a > chord. That is only true for the simplest chords of our simple original folk When someone enters a set of notes and asks LilyPond to print the chord name, there's such a thing as a wrong answer, even if there may also be more than one answer you would call correct. LilyPond has to print something and it would be preferable that it prints one of the correct answers. What rules should LilyPond follow to determine what it prints? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Chords and what they mean
On Fri, 18 Sep 2015, BB wrote: > Can you really feed some notes to Lilypond and it tells you the name of the > chord? A kind of reverse chord finder? I have not found in the manual. I thought that was the point under discussion. It's in the manual here: http://lilypond.org/doc/v2.18/Documentation/notation/displaying-chords#printing-chord-names In the second chunk of example code, there's music entered like 2 and LilyPond assigning chord names to it. If that's not what was being discussed, I'd better go back to lurking. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Transpose without collapsing double accidentals
If transposing music produces notes with alteration of more than a whole tone, \transpose will produce a warning and change the note name. I would like to be able to transpose notes up or down an octave without changing their names or alteration at all, even if it is more than a whole tone. Simple example (not an octave, but exhibits what I think is the same problem): \score { \transpose cis c \transpose c cis { cisis'1 } } This gives a warning ("warning: Transposing cProb' by cisih' makes alteration larger than double") from the inner transpose, and then engraves a D, not a C-double-sharp. When it creates a note more altered than double-sharp, it changes the note name, even though the round trip would correctly have ended with a note not more altered than double-sharp. Despite the wording of the error, it is actually "a whole tone of alteration" that triggers the note name change, not twice the size of a sharp or flat, as demonstrated by my actual application: My actual application is in 22-EDO microtonal music, where a sharp or flat is worth three units of the octave division, and the gaps between successive letter names are one and four units. The note cisis is two EDO units sharper than d ; but I want to pass it to some kind of "transpose down an octave" function and get cisis, as the output. Given that I've already redefined the note names and accidentals with the regular.ly script from http://x31eq.com/lilypond/ , doing \transpose c c, { cisis } gives me a warning about how it has no accidental symbol for 6/11 of a whole tone, and engraves a D note. It's apparently detecting that the alteration of cisis makes it sharper than d and automatically changing the note name from c to d. Is there any simple way to make it NOT change the note name or alteration, but only transpose the octave? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transpose without collapsing double accidentals
On Sat, 19 Sep 2015, David Kastrup wrote: > msk...@ansuz.sooke.bc.ca writes: > > > If transposing music produces notes with alteration of more than a whole > > tone, \transpose will produce a warning and change the note name. I would > > like to be able to transpose notes up or down an octave without changing > > their names or alteration at all, even if it is more than a whole > > tone. > > Issue 1009, fixed in version 2.19.0. Thanks for the pointer. LilyPond 2.19 (installation of which is non-trivial, since it seems to be only available through Git and is dependent on several obsolete packages) fixes this in small test cases, but chokes on the regular.ly script from http://x31eq.com/lilypond/ , which I'm using in my actual project. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Transpose without collapsing double accidentals
On Sat, 19 Sep 2015, Michael Gerdau wrote: > > > Issue 1009, fixed in version 2.19.0. > > > > LilyPond 2.19 (installation of which is non-trivial, since it seems to be > > only available through Git > > Have you checked out > http://lilypond.org/development.de.html > > Of course it is not 2.19.0 but 2.19.27 Hm, I didn't even notice that there were precompiled binaries there - I had been looking for a source package and, not seeing that, went straight to the Git repository. Water under the bridge now, since I did manage to compile and install it. As for the regular.ly script, I was able to modify it to work with the newer version, basically just by removing the "parser" and "location" variables that the new version doesn't expect in music functions. And, for the moment at least, the result seems to work. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re:Chords and what they mean
On Sun, 20 Sep 2015, Flaming Hakama by Elaine wrote: > However, if you view lilypond as a notation program, > then the practical question becomes, > if I want to print a certain chord symbol, > what to I write for the input > (and do I need to customize the chord symbol for that note set)? Excellent point. All this talk of chords on the list inspired me to try to add chord names to one of my microtonal pieces. There didn't seem much point feeding the actual music (which is entered as note sets, not chord names) into \chords , but I figured if I could find the right input to produce each symbol I wanted, then I could just give \chords a sequence of those inputs. That didn't work very well - not only did my changed note names screw things up, but I even found one case where as far as I can tell, two identical inputs produced two different chord symbols. This was a Bb7 harmonic chord, which in one case printed as B\flat\super{7 5} and in another as B\flat\super{7 5 8} with as far as I can tell *identical* note sets described by identical input. I'll try to come up with a minimum working example if this is of interest. What seems like it would be most useful for me would be to forget about LilyPond's chord-naming translation from note sets to symbols, and just use markup to add symbols of my choice wherever I want them. So that raises the question: what's the easiest or cleanest way to place markup so that it will look like chord symbols, typically appearing above the staff at the start of a bar, but a little after the barline, not right above it? Would it work to code it as some modified kind of rehearsal marks, or maybe lyrics? > You would "suspend" the third, but then play a 3rd anyway? > Since the 5 is in every C chord (except augmented or diminished), > why would "sus" have anything to do with 5? Bear in mind that the original meaning of "suspend" here was not "remove," "raise," or "lower"... it came from classical harmony where a note from the previous chord would continue into the new one so that it would end up as the second or fourth of the new chord. Then you'd remove the third of the new chord so it wouldn't clash with the suspended note. It's really the *presence* of the second or fourth, and possibly only in the context where that note was in the previous chord, that makes the chord a suspended chord. It's not the absence of the third; the third is not the thing that's being suspended. And so if we're using that definition of suspension, a chord with just the root and fifth, such as might be written C5 , is not suspended. I realize this is not necessarily the current usage of the term. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Chords and what they mean
On Mon, 21 Sep 2015, Johan Vromans wrote: > > What seems like it would be most useful for me would be to forget about > > LilyPond's chord-naming translation from note sets to symbols, and just > > use markup to add symbols of my choice wherever I want them. So that > You'll lose the ability to transpose. That's true, but transposition was already not working well for me. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Labeling harmony using Roman numerals from a blind user
On Wed, 23 Sep 2015, Daniel Contreras wrote: > Does anyone know the best way to input harmony labels such as II V I etc? Any > help or suggestions would be much appreciated. Enter them as lyrics? That seemed to be the most natural solution for my similar question of how to use arbitrary markup for chord names without depending on LilyPond to guess the names from note sets. If you want it to automatically determine which numerals to print based on the notes, that's obviously a more complicated question. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Bar numbers seem to be one off
On Sat, 26 Sep 2015, Andrew Bernard wrote: > The output is normal and correct. What may be putting you off is that > with the default fonts, under 2.19.27 at least, the numerals are aligned > slightly to the left of the barline, perhaps giving the impression they > belong to the bar before. The do indeed relate to the proper bar, and It may be useful to think of the numbers as referring to the bar boundaries, not the contents of the bars. When you start playing from bar 2, that means a specific moment, which is marked by a line and possibly a number. The line marks bar boundary number 2 and the number marks that line as being number 2. Neither of them refers to the notes before or after the line. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Bar numbers seem to be one off
On Sat, 26 Sep 2015, Klaus Blum wrote: > The last barline belongs to a bar that doesn't "exist" because there is no > contents left. That's one reason I suggested treating numbers as referring to boundaries, not to the music between the boundaries. There is a bar line at the end; that boundary exists. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Repeat with alternatives
On Fri, 2 Oct 2015, Richard Shann wrote: > > > > {fixed part 1} {alternative 1} {alternative 2} {fixed part 2} repeat > and it gives a warning which I don't understand. OTOH the > end-of-second-time marker wouldn't serve any particular purpose - the > player doesn't do anything special at that point. Well, "end of second time" is also the place where the player picks up after skipping over the second alternative during the *first* repetition, so it's worth marking it in some way. Is this a task that could be accomplished with careful use of segno, coda, DS, DC, and so on? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Aw: Re: PDF Links in Windows
On Mon, 5 Oct 2015, Blöchl Bernhard wrote: > > Does anyone know if it would be possible to make the links in the regular > > PDF reader go to Frescobaldi? > > What is a regular PDF reader? Is it a working one? Which one is irregular? Adobe Acrobat Reader. > > me. LilyPad is O.K. most of the time too, but it can't handle Unicode! :O > Lilypond DOES unicode: LilyPad. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
MIDI "volume"
The discussion of MIDI in the manual refers to "volume" throughout. It appears that at least some of the time, that actually means MIDI velocity, which is not the same thing. For instance, dynamic marks like \f and \pp seem to set the velocity. Do *all* references to "volume" really mean velocity, or are there also some LilyPond features that set the true MIDI volume (control change 7)? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Dashed repeat tie
Can I set dash-definition on a RepeatTie? It appears that the answer is "no": that property is part of tie-interface and RepeatTies instead use semi-tie-interface. So the real question is, how can I get a similar effect? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Frescobaldi creates the pdf but doesn't export it?
On Sat, 10 Oct 2015, David Kastrup wrote: > The real SSD killer is putting swap there and/or suspend to disk. > That's gigabytes of actually happening writes. Is that really true of suspend-to-disk? Seems to me that writing the contents of memory to disk on suspend would only happen between one and ten times per day, and with hundreds of thousands of writes available before an SSD wears out, it has decades of lifespan at that rate. Something else in the system will almost certainly die first. Almost an ideal scenario for an SSD. Putting swap on SSD is another story entirely. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: My finances for working on LilyPond
On Fri, 23 Oct 2015, Ivan Kuznetsov wrote: > Maybe the Linux Foundation can help us set up a Lilypond foundation? > > Are there any lawyers on this list that can donate their time? > > Or perhaps Lilypond software can become sponsored by the Linux Foundation? The fact that the package is named "GNU Lilypond" sort of implies that it's sponsored in some meaningful way by GNU. If that is not in fact the case, then why are they getting free advertising? The TeX Users' Group may also be a potential source of funding. They do sponsor projects of interest to TeX users from time to time, and Lilypond certainly seems to be such a thing. The amounts of money involved are unlikely to be on the scale necessary to keep someone from needing other employment, though. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: chord symbol styling
On Tue, 27 Oct 2015, David Kastrup wrote: > Well, arguably it makes a bit more sense than Knuth's choice of a > magstep being a factor of 1.2. Because the powers of 2^{1:12} as the > basis of half a magstep are known to be close enough for practical > purposes to a variety of small-integer-based ratios. So, will a future version allow microtypographical 2^{1/19} magnification steps? :-) -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
A few notes softer
This may be more a question about musical notation than about LilyPond, but: I would like to indicate that just a few notes (one hand on the piano for the duration of one bar) should be played softly. Not as a progressive change over time (crescendo/decrescendo), but the isolated notes - play at normal volume up to that point, play the few soft notes, then go back to the previous level. What is the best way to indicate this so that musicians will easily understand that that is how I intend it to be played? How can that best notation be easily achieved with LilyPond? Is there a standard musical term for this effect? Here's what I have at the moment, and what it looks like is attached. Code extracted from a longer score; in the real file the two hands are inside separate defines. % this is in D major; none of these notes will be engraved as accidentals << { 8 8 8 8 } \\ { \override Hairpin.stencil = #constante-hairpin s8._\> s16_\p\< s4_\! } >> | % the left hand is probably not relevant, but: 4 r4 | I think this looks nice, but I don't know if anyone else but me will understand what it means, and I wish I could get the "p" to be centred and the spacing at the ends of the bracket to be more balanced. Maybe it would be better to abuse a tuplet bracket to engrave this? Having it *also* produce the right velocities for MIDI is probably a lost cause, but it's no big deal if I have to rewrite that bar for the MIDI version. I don't want to just put \p at the start of the bar and \mf at the start of the immediately following bar, because that suggests changes in the ongoing overall dynamic level (which I don't intend) and also I don't think that would clearly indicate that it's just for one hand. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ piano-bar.png Description: Binary data ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: A few notes softer
On Mon, 30 Nov 2015, Mark Stephen Mrotek wrote: > Sotto voce? Thanks, I think sotto voce is the term I want. How should I indicate its scope, horizontally and vertically? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: November font
On Fri, 11 Dec 2015, Andrew Bernard wrote: > The downloadable PDF font sample shows beams for 16’s and 32’s squashed > together with no whitespace (depending on PDF view scale factor, which I > have never seen before), beams running past stems at the end, and other > errors. Hence my doubts, and my queries to the list as to people’s > experience. I noticed that too. If the objects displaying this behaviour are part of a font, then these are the kinds of issues that good hinting in the font is supposed to prevent, and it seems like commercial-quality fonts should do better than what's in that file. However, it's mostly noticeable with beams. Are the beams really from the font, or are they graphical objects drawn by the engraving software? I suspect they're graphics, not font glyphs, and so this may be an issue with the engraving software used to produce the file and nothing to do with the font as such. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: converting svg glyph to path data for use in scheme (was: accidentals for just intonation)
On Sat, 12 Dec 2015, N. Andrew Walsh wrote: > accidentals as needed. I suppose, rather than having Lily/Scheme calculate > prime factors on the fly at runtime, it would be easier to have a lookup > table of the prime factorization for each integer up to a certain limit (but > that would end up being very high, so maybe not). That's a computational > problem for further down the road, though. For numbers of 32 bits or so, doing prime factorization by simple-minded trial and error on a present-day computer is cheaper than most people realize. It's a tight loop that fits in cache; the arithmetic may actually be faster than a lookup table in main memory, and it's at least unlikely to be prohibitively slow. I think a trickier computational problem may be converting between LilyPond's "rational number of semitones" and just-intonation's "rational ratio of frequencies" ways to express pitch. Because of the log function in between, in general any number that has a representation on one of those scales will have no exact representation on the other, and you're forced to do some kind of rounding, or maybe abandon LilyPond's pitch scheme for something else. Have you decided how you want to deal with this issue yet? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: converting svg glyph to path data for use in scheme (was: accidentals for just intonation)
On Sun, 13 Dec 2015, N. Andrew Walsh wrote: > Actually, coverting between the ratios and semitones has alread been done, > as there's a simple set of log and mround functions that do it. Have a look > in the OLL repository under notation-tools and you should find the .ily At what URL? I'm looking in https://github.com/openlilylib/openlilylib and can't find a directory called "notation-tools" at all, nor this kind of code in the directories that do exist. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: converting svg glyph to path data for use in scheme
On Sun, 13 Dec 2015, Graham Breed wrote: > Converting from ratios to cents is easy. Converting between ratios and cents > requires a function from cents to ratios. That's a lot more difficult because > information is lost. You got us excited by suggesting that had been solved. Indeed. One can pretty easily define a set of ratios that will be allowed (for instance, by saying "use primes up to this limit, at powers up to this other limit") and then ask for the nearest ratio in that set, to a given pitch in cents; it wouldn't be terribly difficult to implement that. I think it turns into integer programming (an NP-hard problem in general) but the size of the instances is small enough that the computation would be easy in practice. However, I don't have a strong sense of what's actually a good set of allowed ratios to use for such purposes, and I was hoping the people working on doing this in OLL had an opinion on that. Having this kind of algorithm would be interesting for converting pitches that were *not* originally written as just frequency ratios, for instance from an EDO scale, into rational approximations to notate them with a just-intonation notation scheme such as yours or "Saggittal notation." -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [OT} Was "Re: Rounded beams"
On Thu, 17 Dec 2015, David Kastrup wrote: > LilyPond's focus is creating good, readable scores. That's what > typography is about. Not creating visual artworks. The boundary Some material on the LilyPond Web site - in particular, the "Essay" - gives the impression that it *is* about creating visual artworks. Is that up for revision? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [OT} Was "Re: Rounded beams"
On Thu, 17 Dec 2015, Kieren MacMillan wrote: > I just read through the Essay in its entirety, and found nothing which > suggests to me that Lilypond ever sacrifices clarity or functionality > for "visual artistry”. That is not what I said. A focus on creating beautiful output does not imply "sacrificing" clarity or functionality. On the contrary, it seems reasonable to guess that clarity and functionality are best served by beautiful output, that is part of what beauty means in the context of music engraving, and the "Essay" asserts such a claim throughout. There's also a specific point made near the start about exact alignment of bar lines between systems being bad. Assertions about "beauty" and "art" are repeated constantly in that document, to the point that it sometimes comes across as protesting too much. The "Essay" is unconvincing for that reason even though I agree with most of the points it's trying to make. It seems strange that exactly straight beams in all cases without exception are good and necessary for LilyPond, if exact alignment of bar lines is bad and the avoidance of alignment is something to brag about. And excluding the possibility of curved beams in all cases, even as a manual override for scores with special nonstandard needs, in the context of a tool that attempts to cover a wide range of other unusual notation cases, seems to be a sacrifice of "functionality" right there. For what purpose is LilyPond making that sacrifice? It may simply be a technical limitation, and that may be the right decision in relation to costs and benefits: adding a curved-beam feature would be very difficult in the current architecture, and the number of users with a reason to want it may be vanishingly small, so that the work isn't justified. I'm not sure anyone in this discussion actually wants to use curved beams themselves, and there would be (laborious, but possible) ways to do it with more general graphics features if someone really did need it. But don't claim that such a technical limitation is for our own good! The statements that LilyPond doesn't do curved beams because users aren't smart enough to use such a feature wisely (when LilyPond can do plenty of other things that also look bad if misused, and has never been nor claimed to be a safe tool for the unwise) and LilyPond isn't about visual art (when there's a whole "Essay" stridently insisting that it is about visual art) are hard to credit. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Repeat 8va
On Fri, 8 Jan 2016, Christopher R. Maden wrote: > Generally, once you get into any kind of moderately complicated score, you > have to concoct your score and MIDI separately, e.g.: > > theTune = c c c c > theScore = \repeat volta 2 { \theTune } > theMidi = \theTune \transpose c c' \theTune > \score{ \theScore \layout{} } > \score{ \theMidi \midi{} } This is pretty much exactly what I do for a similar instruction in an original ragtime piece. It's a shame that LilyPond's requirement to completely evaluate music expressions immediately, and therefore once and for all, forces this kind of thing on us. The natural thing to want to do would be to have an "if (MIDI) { }" kind of construction at the point in the music where there's a difference; but that's simply impossible the way LilyPond currently works. And so anyone who wants both a printed score and MIDI is forced to write the whole thing twice over, attempting to keep the two versons updated relative to each other by hand, with the ability to share code only at the lowest levels of the hierarchy. I'm sure that someone will now respond with a claim that the way LilyPond currently works is actually better for users too, instead of being only a consequence of behind-the-scenes design issues. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Repeat 8va
On Fri, 8 Jan 2016, H. S. Teoh wrote: > > It's a shame that LilyPond's requirement to completely evaluate music > > expressions immediately, and therefore once and for all, forces this > > kind of thing on us. The natural thing to want to do would be to have > This is not really true. What I usually do is something like this: > \tag #'midi { a8 r b r c r } > \tag #'layout { a4-. b-. c-. } > The \tag #'layout and \tag #'midi lines basically behave like an if > (MIDI) block. This lets you intersperse layout-specific and > midi-specific stuff in the same place, so that you don't forget to > update one after editing the other. I've had trouble getting that to work in more complicated situations, such as when there's nesting involved. If I want a few notes different inside \foo (for instance, because of needing to split them into separate voices for typographical reasons while keeping them in a single voice for MIDI) but then I want to either repeat \foo in a volta for print, or write out the repeat to transpose one of them, then using the same tag for both conditionals is a problem. That can be worked around in turn by using more tags, but the complexity steadily increases, and all of it is work I think the computer should be doing, not the human. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Repeat 8va
On Sat, 9 Jan 2016, David Kastrup wrote: > > I've had trouble getting that to work in more complicated situations, such > > as when there's nesting involved. If I want a few notes different inside > You know the \tagGroup command, do you? I found it when I was looking for a clean solution to this issue, but couldn't see a way to use it as part of a clean solution. Do you have one? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Repeat 8va
On Sat, 9 Jan 2016, David Kastrup wrote: > For "this issue"? It allows you to use different tags for different > purposes without interference between the purposes. > > Not more, not less. Then why suggest it? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrument names and smallest possible bounding box
On Sun, 17 Jan 2016, Carl-Henrik Buschmann wrote: > 2) I need to export pngs for my latex documents and i would like the > bounding box to be as small as possible. How do i do this? I don't know how well this fits into your workflow, but I'd be inclined to trim the images after export using pnmcrop, automated by a Makefile recipe. Probably simpler than trying to get Lilypond to resize its "page" to fit the material. If you were exporting in a vector format, the trimming operation might be harder, but trimming off white borders on a PNG file is easy. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: lyp - a Package Manager for Lilypond
On Fri, 29 Jan 2016, Urs Liska wrote: > I think one of the nice things in Sharon's approach is that you don't > *have* to contribute - you can also simply make your packages available. ...as hosted Git repositories. I thought that was a dealbreaker, but I tried to give it a fair chance. I read the readme as far as the line about piping the output of curl into bash. I stopped there. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: lyp - a Package Manager for Lilypond
On Fri, 29 Jan 2016, Sharon Rosner wrote: > >...as hosted Git repositories. I thought that was a dealbreaker, but I > > tried to give it a fair chance. > > Please explain why packages as hosted git repositories is a bad idea. What > would be a better solution in your opinion? Version control systems in general are not well-suited for distribution of software to users. They significantly increase the level of skill and of previously-installed software a user needs just to get in the door. It's not a good idea to require a client for a much more complicated protocol just to serve the function adequately addressed by HTTP or FTP. Git in particular is an especially poor substitute for HTTP (as compared to other version control systems) because when used as directed, it requires transferring the entire previous history of development to anyone who just wants a copy of the current version, and those people will disproportionately be the ones least able to make use of the history. Further comments are here: http://ansuz.sooke.bc.ca/entry/230 That article discusses individual software packages using Git for distribution. Building a package manager tied to Git, so that ALL software it can install must use Git for distribution, compounds the issues by unnecessarily imposing them on all developers. Everybody's required to have public Git repositories, which is a much higher bar than requiring developers to be able to put files on HTTP servers, an approach which has served the community well for many years (as did anonymous FTP before that). It's not clear what benefit Git provides over much simpler ways of distributing files; but it has some real disadvantages. When distributing software requires Git, there's an implicit encouragement to use Git for the actual development too, and that unnecessarily limits the tools and organizational structures anyeone can use when building software that will be installed by this package manager. Git may be appropriate for some projects; but a built-in assumption that Git is appropriate for every project, even in the limited space of LilyPond development, is harder to justify. "A public Git repository" is in practice almost the same thing as "a public repository on Github," and Github in particular has had some recent issues with both technical reliability and human governance. They had a big outage yesterday. It's not good to put all the community's eggs in the Github basket. Requiring everyone who wants to build a package to build it in a Git repository does not require them to build it on Github, but does make it a little harder to build elsewhere. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inline images, was Re: Variable slur thickness
On Thu, 10 Mar 2016, Cynthia Karl wrote: > Why on earth would anyone filter inline images? I filter HTML, because HTML in email is usually spam. "Inline" images imply HTML and thus get filtered too. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inline images, was Re: Variable slur thickness
On Thu, 10 Mar 2016, Brian Barker wrote: > At 10:33 10/03/2016 -0600, Matthew Skala wrote: > > ... HTML in email is usually spam. > > You are joking, of course! No. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Not Nice Review of the LilyPond
On Sun, 2 Dec 2018, David Kastrup wrote: > is hard. At least LilyPond is a better starting point than MusiXTeX. But MusiXTeX can do "if" statements. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Not Nice Review of the LilyPond
On Sun, 2 Dec 2018, David Sumbler wrote: > > But MusiXTeX can do "if" statements. > I felt that an "if" would be useful, so I eventually came up with: That is useful for conditional includes, but it can't be embedded in the data structure that LilyPond calls "music" and stores in variables. As soon as something is turned into "music" it has to be data, not code; conditionals must either be evaluated before the input is turned into "music," or by separate code (usually, in Scheme rather than in LilyPond as such) that conditionally modifies the static "music." That latter approach, with tags in the "music" that can be filtered out, is what's usually recommended as a substitute for real conditionals in LilyPond, but it's quite limiting compared to what programming languages can do with "if." For those familiar with programming languages it's not so mysterious why this situation comes about. LilyPond takes care to call its variables variables in the documentation. You reference them; you don't execute them. They contain data, not code. Obviously, data will be the same every time you look at it, unless you externally change it. But I wish that without escaping to Scheme I could have something more like a macro than like a variable, evaluating its conditionals (and doing other programming-language stuff) every time it is used. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Not Nice Review of the LilyPond
On Sun, 2 Dec 2018, David Kastrup wrote: > Have you looked at tags? Please read my messages before responding to them. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Flat flared hairpins
On Tue, 1 Jan 2019, Andrew Bernard wrote: > American floors: 11 12 14 15 > English floors: 11 12 13 14 > > I saw this a lot when I worked in new York. I think this custom has persisted in the USA because large buildings need to have "mechanical" or "service" floors not directly visited by the regular occupants, and if you're going to have the elevator skip a floor anyway, you might choose it to be the one with a number some people want to avoid. In East Asia, where the number 4 is similarly considered unlucky, the number 4 is sometimes skipped - and I've even seen a building where the floor numbering skipped both 4 and 13. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: tag issue
On Sat, 13 Apr 2019, Gianmaria Lari wrote: > \tag #'testOne a > \tag #'testTwo b > ~ > \tag #'testOne a > \tag #'testTwo b > > } > > > But then why lilypond removes the tie? Shouldn't just remove the expression > following testTwo that is "b" ? The tie is not a separate object. The tie is part of the first b and that b is tagged with testTwo. So when everything tagged testTwo is removed, the b is removed, and the tie disappears. This issue is another aspect of the fact that LilyPond "music" is data, not code, and cannot contain real conditionals. It's also related to why one writes "a( b c)" to slur all three notes together, not "(a b c)". The parentheses do NOT designate a syntatic group as they do in pretty much all real programming languages including Scheme; in LilyPond, a parenthesis is a modification to the properties of the preceding note. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Fine bar line \break before repeat sign
On Tue, 7 May 2019, Adam Good wrote: > I'm baffled by bar lines. In the example below, I would like for the f1 bar > to use a "final" bar line as in \bar "|." the \break then on the next line > begin with a repeat sign. The manual doesn't hint at this > > http://lilypond.org/doc/v2.19/Documentation/notation/bars#bar-lines If I'm correctly understanding what you want, this seems to do it: \defineBarLine ".|:-|." #'("|." ".|:" "") \relative { f'1 \bar ".|:-|." \break \repeat volta 2 { g1 } \break a1 b1 \bar "|." } -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Vertical spacing of numeric time signature
Is there any simple way to modify the vertical spacing between numerator and denominator in a numeric time signature? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Vertical spacing of numeric time signature
On Thu, 9 May 2019, Malte Meyn wrote: > Am 09.05.19 um 16:53 schrieb msk...@ansuz.sooke.bc.ca: > > Is there any simple way to modify the vertical spacing between numerator > > and denominator in a numeric time signature? > > > > Not really simple. But it can be done by redefining the stencil: Thanks! -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Migrating from commercial music notation software to free alternative
On Wed, 12 Jun 2019, ah wrote: > ... using a TeX-based or TeX-like (free) music composition system, if > available and doing all programming, templating etc. in this myself. > Advantages: platform independent and free. Lilypond is not TeX-based nor conceptually TeX-like, despite the fact that it uses backslashes. Its programming interface is all based on Scheme and works quite differently from TeX macro expansion. If you just mean "free" when you say TeX-like, fine, but if you want something that is programmable the same way TeX is, then you should consider other free software that is more closely connected to TeX. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Migrating from commercial music notation software to free alternative
On Wed, 12 Jun 2019, David Kastrup wrote: > > nor conceptually TeX-like, despite the fact that it uses backslashes. > > It's a batch processing system with plain text input syntax. That makes > for workflows not unaccustomed to LaTeX users. By the way, it did LaTeX users are accustomed to writing macros in a Turing-complete language with, for instance, if statements. LilyPond has no equivalent concept to TeX macros: variable values in LilyPond are data, not code, and are completely evaluated when parsed and assigned. They always do exactly the same thing every time subsequently invoked, and cannot contain real conditionals or parameterized behaviour. All the programming-language functionality in LilyPond is shifted into "music functions" that can be applied to the dead data, but never used inline if they are to retain their programmable behaviour. Complete evaluation at parse time makes programming a much different experience, and not one likely to be familiar to a TeX or LaTeX user. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Migrating from commercial music notation software to free alternative
On Wed, 12 Jun 2019, David Kastrup wrote: > > LaTeX users are accustomed to writing macros in a Turing-complete language > > with, for instance, if statements. > > LaTeX or TeX users? I said LaTeX users because you did, but the statement is true about both. TeX users were the original topic of this thread. > TeX's macros are so peculiar because they rely on ad-hoc macro argument LilyPond's programming model is very different from TeX's, and will not be familiar to someone who comes in expecting to program LilyPond the same way as TeX. LilyPond is not a "TeX-based" or a "TeX-like" system. Your insistence that TeX is "peculiar" suggests that you think, as I do, that programming LilyPond is much different from programming TeX - which is what the original poster needs to know. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Links in PDF-Files
On Fri, 20 Sep 2019, sir.teddy.the.fi...@gmail.com wrote: > Why does lilypond add these links and is there a way to prevent it from > doing so? Use the "-dno-point-and-click" option on the command line when you run LilyPond to turn off these links. The links are intended to make it easier to open the relevant point in the source file when using an editor that supports that - they can be integrated with editors like Emacs. That's a pretty specialized use case, though, and I don't know why the feature is turned on by default. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Input syntax question
What characters are allowed in variable names? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Input syntax question
On Sun, 29 Sep 2019, Thomas Morley wrote: > > What characters are allowed in variable names? > > From NR: > "The name of a [LilyPond-]variable should have alphabetic characters > only; no numbers, underscores or dashes." Thanks. I had a hard time finding this in the manual. > Note the "yet"!! It may change in future versions. Is there a formal grammar of the Lilypond language anywhere, other than the source code itself? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Input syntax question
On Mon, 30 Sep 2019, Andrew Bernard wrote: > The grammar is in Appendix A of the Lilypond Contributor's Guide. Thanks. How about the definitions of the terminals, such as STRING and SYMBOL? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Input syntax question
On Mon, 30 Sep 2019, David Kastrup wrote: > The respective lines in lily/lexer.ll read > > A [a-zA-Z\200-\377] > SYMBOL{A}([-_]{A}|{A})* > COMMAND \\{SYMBOL} Interesting that this disagrees with the item from the Notation Reference cited elsewhere in the thread, which says hyphens and underscores aren't allowed. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating MP3 files
On Mon, 14 Oct 2019, Lisa C Lewis wrote: > It appears that LilyPond only creates MIDI output. Given that I need to > share the audio with other people who may not have MIDI players, is > there a means of generating MP3 files? If not, what do folks recommend > for converting MIDI to MP3? I've looked through the documentation, but > if it's in there I missed it. Creating MP3, or any digital-audio format, requires synthesizing the actual sounds of the notes. It's far outside the scope of what a music notation program does and no surprise Lilypond doesn't do it; Lilypond isn't even good at MIDI, and MIDI is much closer to scope. I usually use TiMidity++ (http://timidity.sourceforge.net/) to synthesize WAV files from Lilypond MIDI output, then LAME to encode the WAV files into MP3 (encoding MP3 would usually also be a separate step from the audio synthesis). With this or any software synth, the choice of a library of patches or samples is also quite important - probably more important to the final sound than the synthesis software itself. Most often, I use the "Nordic Upright Piano" soundfont which I licensed from Precisionsound; they appear to be selling it now at https://majesy.com/samples-sounds/nordic-upright-piano-v2-multiformat-krock.html but that wasn't the Web site through which I bought the product several years ago; I don't know the history there. There are free soundfonts available, and other commercial ones for sounds other than piano, but I don't have specific recommendations. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating MP3 files
On Tue, 15 Oct 2019, Martin Tarenskeen wrote: > On Mon, 14 Oct 2019, msk...@ansuz.sooke.bc.ca wrote: > > > There are free soundfonts available, and other commercial ones for sounds > > other than piano, but I don't have specific recommendations. > > You will need a General Midi (GM/GS/XG) compatible soundfont to play/convert > Midifiles with correct sounds if you have defined other instruments than just > piano (the default instrument) in your lilypond score. Not necessarily - you can remap the instrument numbers either in Lilypond or most synth software. I did that to use a non-GM organ soundfont with different instrument numbers for the different stops, in https://audio.northcoastsynthesis.com/?t=loquat . But it's true that using a soundfont with GM numbers will give you one less thing to think about, if the GM instruments are the ones you want to use. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Fyi: this list, lilypond-user, just had it's subject [tag] and footer removed
On Thu, 24 Oct 2019, sysad...@gnu.org wrote: > Any list administrator for this list is free to change these settings > back, instructions are below. I hope that it will be changed back. The subject tag is useful for automatic categorization of incoming messages. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Fyi: this list, lilypond-user, just had it's subject [tag] and footer removed
On Fri, 25 Oct 2019, Andrew Bernard wrote: > complex part of this, along with SPF and DKIM. The change that is being made > here is clearly necessary to me, and explains some of the list issues people > were having lately. Sadly, it's probably unintelligible to non-experts. I run a mail server too, and I think From: munging is a better solution. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
chord.ly to extract notes from chords breaks with new Guile
Back in 2015 people on the list helped me with extracting notes from chords, in this thread: https://lists.gnu.org/archive/html/lilypond-user/2015-09/msg00394.html The solution from 2015 has broken now, in the transition between versions 2.21.0 and 2.24.1. I think it's because of changes in Guile 2.2. I haven't had the opportunity to test with versions strictly between 2.21.0 and 2.24.1. My situation is that I have music containing chords which I want to play on a monophonic synthesizer, by generating separate MIDI tracks such that in each track there is only one note playing at a time. After recording the tracks separately I'll mix the audio files. So I'd like to have a function I can call that takes in music with multi-note chords and selects just one note from each chord. Making it a little more complicated, the number of notes in the chords varies, including some single notes that Lilypond may represent internally as different from "chords." I need to generate as many tracks as the maximum number of notes that will play simultaneously, but have silence in the extra tracks at times when there are fewer notes playing than there are tracks. So, for instance, if my input looks like { c4 4 4 } then I want to generate tracks that might look like { c4 c4 c4 } { r4 e4 e4 } { r4 r4 g4 } It's not important which tracks get which notes and which tracks get silence; all that matters is that the union of the output tracks should be the same notes that were in the input, with silence assigned to unused tracks. It would be nice if it could handle more complicated structures of overlapping notes like << { c2 } { d4 e4 } >> but the solution I've been using since 2015 doesn't, there are some foreseeable problems with doing that in the general case, and it's not my main concern right now. The main issue is that I want my existing files that work to continue working in more recent Lilypond. This is a near-dealbreaker for me using a more recent Lilypond at all - I could and might fix it by just sticking to 2.21.0 indefinitely - but I'd really like to also be able to override midiDrumPitches, which seems to be new in some version more recent than 2.21. Here's a small example showing the problem: \include "chord.ly" music = { 1 } { \extractNote #3 \music } In version 2.21.0 that produces a whole-note rest. In version 2.24.1 with Guile 2.2 it gives this error output: GNU LilyPond 2.24.1 (running Guile 2.2) Processing `test.ly' Parsing...ERROR: In procedure %resolve-variable: Unbound variable: #{ }# Lilypond 2.24.1 compiled with Guile 3.0.9 also gives this error. I attach the version of chord.ly I'm using, which I got from the 2015 discussion. I found these links helpful at that time and I think one of them contained the original for this version of chord.ly: http://gillesth.free.fr/Lilypond/chord/ http://www.lilypondforum.de/index.php?topic=2080.msg11479#msg11479 but those links are both dead now, making it difficult for me to figure out exactly which changes I applied to get it to work in 2015. The version currently in LSR snippet number 545 does not give the unbound variable error, but it is dated earlier, and it has the problem for which I started the 2015 thread: on an out-of-range index it just returns the last note (d in my example) instead of returning silence. The present error output seems to be specific to the case of extracting a note that doesn't exist, such as the third note of a two-note chord in my example. It works without error if I only ask for notes that exist. However, I can't really avoid giving an out-of-range index; being able to do that and get silence is a big part of the point of the exercise. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/%% version Y/M/D = 2015/03/23 %% LSR = http://lsr.di.unimi.it/LSR/Item?u=1&id=761 %% LSR = http://lsr.di.unimi.it/LSR/Item?u=1&id=545 %% for Lilypond 2.16 or higher. %% last major change in extract-note function : as \tuplet as now %% a 'duration property, we have to deal with this special case. %% by chord->note. You can now specified several numbers, to %% extract several notes at one time #(define (noteEvent? music) (eq? (ly:music-property music 'name) 'NoteEvent)) #(define (no-duration? music) (not (ly:duration? (ly:music-property music 'duration #(define (expand-q-chords music); for q chords : see chord-repetition-init.ly (expand-repeat-chords! (list 'rhythmic-event) music)) %% extractNote % #(define tagNotExtractNote (gensym)) #(use-modules (ice-9 receive)) %% for the use of receive #(define (chord->note chord n . args) "Return either the note n of chord chord, keeping articulations or if other numbers are specified in args, a chord with the matching notes." (receive (notes others) (partition noteEvent? (ly:music-property chord 'elements)) (if (null? notes) chord (let* ((len (l
Re: chord.ly to extract notes from chords breaks with new Guile
On Sat, 27 May 2023, Jean Abou Samra wrote: > Are you sure that this is the correct example? That the file chord.ly it > uses is the same as the one you sent? That LilyPond is the one you believe > and unpatched, etc. ? Yes, using the chord.ly file I attached to my message, extracted from the message as it came back through the mailing list, with the three-line input cut and pasted from my message as it came back through the mailing list, and the version of Lilypond I compiled from the sources in the file lilypond-2.24.1.tar.gz downloaded from the lilypond.org Web site, I get these messages: GNU LilyPond 2.24.1 (running Guile 2.2) Processing `test.ly' Parsing...ERROR: In procedure %resolve-variable: Unbound variable: #{ }# > I can't reproduce your problem (on Fedora); it compiles fine for me and > prints a single MM rest. Interesting. What's the provenance of your Lilypond executable - did you also compile from source, or use a Fedora package? I wonder if the issue could be with my Guile 2.2 installation, which I also compiled from sources. I'm using Slackware, which does not have a Guile 2.2 package, having skipped all the way to version 3. I had to install Guile 2.2 over top of that in order to get a version of Lilypond that would report itself as using Guile 2.2, but if the build was still partly using Slackware's packaged Guile 3.0 somehow, that could explain the difference in our results. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: chord.ly to extract notes from chords breaks with new Guile
On Sat, 27 May 2023, David Kastrup wrote: > which contains a delirious number of unbreakable spaces, code \xa0 > instead of \x20 as for a normal, breakable space. Thanks! Correcting these seems to have fixed the problem, at least for the moment. I don't know why the old version needed *some* of the non-breaking spaces to be changed to regular spaces and did not require this of *all* of them, nor why the new version would be different. But that's not important. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: chord.ly to extract notes from chords breaks with new Guile
On Mon, 29 May 2023, Gilles Thibault wrote: > chord.ly has been renamed to chordsAndVoices.ly (it deals also now with > Voices) > You can donwload it here : Thanks a lot! As far as I know, the new version works fine. The problem in the old version was just because of the non-breaking spaces in the lines I modified according to instructions from the mailing list. That was a problem I encountered back in 2015 too, and thought I had fixed then. My version of the file is unmodified since 2015; evidently some non-breaking spaces survived the earlier fix, and earlier versions of Lilypond ignored them. I don't know why the latest version had a problem with these characters given that earlier versions didn't, but I also don't know why earlier versions *didn't* have a problem with these particular non-breaking spaces when others in the same file caused a lot of trouble. I will say again, as I said in 2015, that I wish people would stop trying to use HTML for email. That's where the non-breaking spaces came from. Anyway, even the old version of chord.ly contained support for separating voices, which I hadn't previously touched but I investigated just recently in the hope of separating MIDI notes that don't have identical timing. That is, if my input is << { a1 } \\ { b2 2 } >> it would be nice to be able to separate it out into three separate outputs for separate MIDI channels, like: { a1 } { b2 c2 } { r2 d2 } Unfortunately, both the old chord.ly and new chordsAndVoices.ly code have the same problem with respect to voices that I encountered in 2015 with respect to notes within a chord: requesting a non-existent voice index returns the last voice instead of silence. That seems to be the intended behaviour of the code in your application, so it's not exactly a bug, but it isn't what I need. I think the really right answer for me is to not use Lilypond to do this note-separation at all, but to do postprocessing with other tools on the MIDI files generated by Lilypond instead. I'm more confident of really getting correct results from that in all the different cases of simultaneous notes, than I would be by trying to do the separation inside Lilypond. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: chord.ly to extract notes from chords breaks with new Guile
On Wed, 31 May 2023, Gilles Thibault wrote: > Not hardly tested but this should work : Thanks for looking at it further. I hate to impose on you because I've already decided to solve this problem in external postprocessing of the MIDI files, so I hope you won't put a lot of effort into trying to satisfy my use case with modifications to your script. I don't think doing it in Lilypond is really the right solution for me because to really solve it I need to automatically handle *all* cases of simultaneous notes. I need, at each point in time, to have at most one note per track, exactly one track per note, and silence in any leftover tracks, regardless of the voice/chord structure of the music. The code you provide works for the specific example I gave, where the desired silence comes from a note written as a single note instead of a chord, but there are many other cases (illustrating the problem with minimal examples). In particular: * change b2 to 2 and the b2 comes out in two tracks. Maybe it would never occur to me to write a one-note chord, but a similar issue can happen between two- and three-note chords, or anywhere the number of notes per chord in a voice is not always the same. * a one-voice passage added outside the << >> construct comes out in two tracks * if each of two voices sometimes contains two simultaneous notes, but only at most three notes are simultaneous overall, then I need to either use four output tracks, or carefully split and then merge to bring it down to three, and handling this kind of thing becomes steadily more complicated as the number of voices and simultaneous notes grows. Resolving these points and any other similar ones that may come up, seems like a lot of work. If an in-Lilypond solution means I need to do things like maintain the same number of Voice contexts throughout the entire piece of music, or think hard about which note/voice index needs to merge with which other one to minimize the overall number of tracks without ever having more than one note simultaneous in a track, then we quickly approach a point where it would be less work for me to just write out the intended output by hand and not have Lilypond calculate it at all. In external MIDI processing it's relatively easy: at every "Note on" message in chronological order, I can route the note to an unused track or else know unambiguously that I need more tracks. At every "Note off," the track in question becomes available again. The external code basically does the same thing that a polyphonic synthesizer would do, just with output to new MIDI tracks instead of directly to hardware voices. No need for separate handling of Lilypond's "single note," "chord," and "voice" concepts. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Doubling a note makes MIDI output louder
On Sun, 9 Jul 2023, Knute Snortum wrote: > I'm not sure exactly how one would deal with this problem, other than with > tags. Maybe \parenthesize could not produce MIDI output? Or is there a way Is that a problem? If these are two notes in different MIDI channels, then the MIDI output is just reflecting what you wrote - two notes played at once that happen to be the same pitch - and deleting one would be incorrect. If the MIDI output is really just a single "louder" note (what does that mean - higher velocity?) then it implies some deliberate detection of this case within LilyPond, which might reasonably be adjustable. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Doubling a note makes MIDI output louder
On Sun, 9 Jul 2023, Knute Snortum wrote: > In the MWE the instrument is a piano, so you wouldn't want the note to sound > louder than the surrounding notes, because the doubled note is played by > only one hand. But I can see this might be a problem if the two staves were > for two voices. Maybe you want it louder in that situation? That's why I LilyPond generates separate MIDI tracks, in separate channels, for the two staves, so as far as anything playing the MIDI file is concerned, it is not a "louder" note; it is two notes in unison. Nothing about a standard MIDI file indicates to the playing software that these two tracks happen to be the right and left hands on a single instrument. If you don't want the two notes to play at once, I think what needs to be changed is the fact that LilyPond is generating separate tracks per stave. You might be able to use \partcombine to collapse them into a single track and eliminate unisons. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Doubling a note makes MIDI output louder
On Sun, 9 Jul 2023, David Wright wrote: > players. But that's the problem here. When two real voices happen on > the same note, the result doesn't sound like one louder voice, yet > that's the effect you get from MIDI,¹ where the "two" voices are Not on *my* MIDI synthesizer. Two notes are two notes! I'm inclined to be concerned by this because I do a lot of doubling of notes between different MIDI channels. Each channel plays on a different patch, or in a separate monophonic recording run on the same patch, and a doubled note is quite different from a louder note. If LilyPond were to start automatically deleting notes because someone think's it's a bug for unisons to exist between MIDI tracks, it would make the pile of workarounds I already need to use to get decent MIDI out of LilyPond, that much worse. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Doubling a note makes MIDI output louder
On Sun, 9 Jul 2023, Knute Snortum wrote: > note out of the other hand. This is why I suggested that the MIDI performer > could ignore \parenthesize notes. Would this create a pile of workarounds > for you? Not as long as I don't use \parenthesize. But I think it's preferable not to have a presentation command ("print this in parentheses") with non-obvious semantic consequences ("don't include these notes in MIDI output"). Parentheses can mean many different things in different pieces of music; your situation is only one of those. Making remove-from-MIDI always the behaviour of parentheses, or the default unless overridden, would create Surprises! for anyone who tries to use parentheses for some other purpose and expects them to just be marks on the page. Better for "don't include this in MIDI" to be a separate command instead of a side effect of parentheses. Less good, but pragmatic because it doesn't require changing LilyPond, would be to use "tagging" to exclude the unwanted notes from the version of the music used to generate MIDI. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Merging dynamics with music
I'm trying to use a Dynamics context to put dynamics between the staves of a PianoStaff. As such, I've got my notes and my dynamics in two separate variables. For MIDI output, I'd like to merge the contents of the music variable and the dynamics variable and generate MIDI from the result. But I can't find a way to merge the two variables and have the dynamics really affect the MIDI velocity of the notes. Here's some code I've tried; I've also tried many much more complicated variations. Note that although the Dynamics context is part of the motivation for this question, the question is about merging music variables and the problem shows up even without the existence of a Dynamics context. MyMusic = { c'1 c'1 } MyDynamics = { s1\ppp s1\fff } \score { << \MyMusic \MyDynamics >> \layout { } \midi { } } After compiling that, I get a MIDI file in which the notes are just at the default velocity without any dynamics being applied. This code seems to be parallel to examples I've seen online of templates for use of the Dynamics context, and I've seen examples both on this list and elsewhere of people doing what seems to be exactly the same thing I'm doing, with << >> for combining the variables to generate MIDI output; but I haven't found any example of merging dynamics with notes that actually works with MIDI when I compile it myself. I wonder if something may have changed in a recent version of LilyPond such that older examples no longer work. I've also tried << { } \\ { } >>, partCombine, several different arrangements of explicitly instantiated Voices or Staffs, and so on. Although I can get the visual output to look good, nothing seems to work for applying the dynamics from one variable to the notes from another in a way that will really appear in MIDI output. What is the correct way to merge the variables in this situation? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Merging dynamics with music
On Sat, 16 Sep 2023, David Kastrup wrote: > Try > > \new Staff << \MyMusic \MyDynamics >> > > since otherwise the variables will end up in separate Staff contexts. With the following code, the notes in the MIDI file still are both at default velocity. Explicitly instantiating the Staff does make a difference in the visual output. MyMusic = { c'1 c'1 } MyDynamics = { s1\ppp s1\fff } \score { \new Staff << \MyMusic \MyDynamics >> \layout { } \midi { } } -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Merging dynamics with music
On Sat, 16 Sep 2023, David Kastrup wrote: > > With the following code, the notes in the MIDI file still are both at > > default velocity. Explicitly instantiating the Staff does make a > > difference in the visual output. > > > > MyMusic = { c'1 c'1 } > > MyDynamics = { s1\ppp s1\fff } > > > > \score { > > \new Staff << \MyMusic \MyDynamics >> > > \layout { } > > \midi { } > > } > > My mistake: Dynamic_performer by default lives at Voice level, so you'd > need \new Voice here in order to issue the dynamics on a level visible > to MIDI. Thank you. That works for the given example. However, with more complicated music that already contains multiple voices (as is typical of the piano music where a between-staff Dynamics context would be used in the first place), it doesn't work. For example: MyMusic = { << { c'1 c'1 } \\ { e'1 e'1 } >> } MyDynamics = { s1\ppp s1\fff } \score { \new Voice << \MyMusic \MyDynamics >> \layout { } \midi { } } With that code all the notes end up at default velocity. You mention that Dynamic_performer "lives at Voice level" by default. Is this a default I can override, and would that help? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Merging dynamics with music
On Sat, 16 Sep 2023, Knute Snortum wrote: > Try moving the Dynamic performer to the Staff level. Cutting and pasting this code produces two pages of error messages because it's full of "non-breaking space" characters which LilyPond can't process, but I was able to get the desired results by re-typing it. Thanks for your help. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Still failing to operate lilypond 2.20.0 64-bit version.
On Fri, 6 Oct 2023, Werner LEMBERG wrote: > Thanks. I think it's ghostscript – there are no pre-built packages > available either. While LilyPond doesn't link to it in normal builds, > gs is needed for converting LilyPond's EPS output files to PDF. In > other words, a MacPorts user still needs a compiler... If LilyPond doesn't link to gs but only execs it, then gs having an incompatible version of GPL from LilyPond's version should not render either binary undistributable, even together. GNU's position seems to be that exec is a boundary across which it's not necessary for licenses to be compatible. Of course, whether MacPorts's automated determination of distributability can capture this distinction, is another question. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Articulate has trouble with grace note at time signature change
This fails in 2.24.1 with messages about mid-measure time signature change and failed barcheck: \include "articulate.ly" \articulate { \time 4/4 c'1 | \time 3/2 \grace d'8 c'1. | } Succeeds if \articulate is not used. I can work around it by tagging MIDI and non-MIDI versions of the music, with the time signature change moved somewhere else in the MIDI version, but this becomes complicated given that my actual score has eight parallel variables at the point where it bites, all of which will need alternate versions. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Articulate has trouble with grace note at time signature change
On Wed, 22 Nov 2023, Werner LEMBERG wrote: > Please check the looong list of bugs related to `\articulate` whether > it has already been reported. Seems to be #3696, reported - by you - in 2013. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Hide chords
On Tue, 5 Dec 2023, Jan wrote: > What is the recommended method to “hide” chord names for a couple of > measures? For example, in the snipped below I’d like to hide the chords for > measures 5 to 8. Depending on exactly how you're generating the chord names in the first place, it may be easy to use spacer rests, as in: \new ChordNames { \chordmode { c1 | a1:m | s1 | g1 | } } -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Is there a property that would set all of the "above staff" text to "above chordnames"
On Mon, 1 Jan 2024, Kevin Cole wrote: > 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 placed > below the occasional text, and I was hoping that, rather than manually You can't really put the text in a Staff and have ChordNames appear between the text and the staff, because ChordNames is a context kind of like a staff in itself. Trying to position it in the middle of a Staff context is a recipe for annoyance. But if you're willing to define the text separately, you could create a Dynamics context and put your text there to get a similar visual effect. The nonstaff-nonstaff padding override can be varied to taste; without it, the text collides with the top of the ChordNames in an unsightly way. global = { \time 4/4 \key c \major } textMarkups = { s1^\markup \bold "CHORUS" | s1 | s1 | s1 | } chordNames = \chordmode { \global f2 d2:m | c4 s4 c8 g8:7 c4 | g4 c4 f4 c4 | g4 s4 g2:7| } melody = \relative c'' { \global \clef treble a2 f2 | g4 g4 g8[ f8] e4 | d4. e8 f4 e4 | d4 b4 g2 | } \score { << \new Dynamics \with { \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = #1 } { \textMarkups } \new ChordNames \chordNames \new Voice = "mel" { \melody } >> } -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Output PDF to stdout
On Thu, 4 Jan 2024, Volodymyr Prokopyuk wrote: > My motivation behind using lilypond in a pipeline is to speed up PDF > generation by avoiding storing intermediary files on disk. The pipeline I'd Is that issue real? In Linux and most other operating systems, intermediate "files" will be written to and read from the buffer cache at RAM speed and only later go to the disk in the background. The subsequent process that uses the file won't be waiting for the disk I/O to complete. Even if a pipe might theoretically be even faster than the buffer cache, the intermediate unoptimized PDF is unlikely to be the bottleneck step in generation of an optimized PDF. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Output PDF to stdout
On Fri, 5 Jan 2024, Dr. Arne Babenhauserheide wrote: > > intermediate "files" will be written to and read from the buffer cache at > > RAM speed and only later go to the disk in the background. > > That depends on the file system and its synchronization model. I once > sped up a script to control a cluster by more than factor 10 by avoiding > intermediate writes to the shared network filesystem of the cluster > nodes. That made the difference between 15 minutes and 30 seconds > runtime. I'm sure you're already aware of the important differences between that and the situation described in this thread. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: zero-duration s to hold marks
On Wed, 10 Jan 2024, Raphael Mankin wrote: > That strikes me as being a programmer's response, and I speak as a programmer > for over 50 years. Using <> works, but it is unintuitive. If s0 is more > intuitive then that should be considered for future inclusion. It's intuitive to me that s0 means a spacer rest of infinite duration, because it's one whole note divided by zero. And it opens the door to using 0 as a duration denominator for other things than "s", as in "c0" and "0", let alone constructions like "s0." which would seem to be a spacer of one and one half times infinite duration. I don't think it's a good idea to open those doors. There doesn't seem to be any way to allow zero as the duration denominator except as a unique exception; it cannot be done in a way that's consistent with other syntax. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Transpose from major to minor key
On Thu, 11 Jan 2024, Wol wrote: > You need to remember lilypond thinks in terms of pitch, not note names. Unlike > some (most?) other music software. So "\transpose g e" says "transpose EVERY > note up A TONE". I'm not sure it's quite right to say that Lilypond thinks in terms of pitch, not note names, because it selects the spelling of transposed notes based on the note names. For instance, \transpose c cis fis gives fisis , not g , whereas \transpose b, c fis gives g. The one-semitone transposition of the same note is different depending on the note names used to specify it. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Grandstaff multi-bar rest count shared between staves
On Wed, 17 Jan 2024, Martin Brown wrote: > To answer my own question, I've fudged this with: > \omit MultiMeasureRestNumber at the start of the bass line > \override MultiMeasureRestNumber.Y-offset = -5 at the start of the > treble line > but that seems a bit fragile. Eg. if the staves need to be separated more. > Any other solutions? Although still not a perfect solution, you may be able to make it less fragile by putting a Dynamics context between the two staves, adding the multi-measure rest engraver to that, and then hiding the actual rests there, to only show the numbers. I still have to add an offset adjustment to make this look decent, but I think the offset adjustment shouldn't change with the height of the things in the staves. The height of other things in the Dynamics context, if any, will be less variable. There are probably more elegant ways to do the overriding, such as defining a new context just for this purpose instead of modifying "Dynamics." But this is what I got from a quick experiment. \new PianoStaff << \new Staff { \omit MultiMeasureRestNumber \clef treble \compressMMRests { 1 | R1*10 | 1 | } } \new Dynamics { \hide MultiMeasureRest \override MultiMeasureRestNumber.Y-offset = -1 \compressMMRests { s1 | R1*10 | s1 | } } \new Staff { \omit MultiMeasureRestNumber \clef bass \compressMMRests { g1 | R1*10 | g1 | } } >> \layout { \context { \Dynamics \consists Multi_measure_rest_engraver } } -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: { } not sounding right.
On Fri, 19 Jan 2024, Werner LEMBERG wrote: > This is a limitation of MIDI: You can only have a single pitch bend > per time step per channel. LilyPond's rather primitive MIDI 1.0 > output provides no means to circumvent this limitation. I've sometimes gotten good use out of LilyPond code from others on the list, that splits chords into separate voices so that I can then put them in separate MIDI channels, both to allow separate pitch bend for microtonal pitch and to allow recording on a monophonic synthesizer. A couple of threads about it: https://lists.gnu.org/archive/html/lilypond-user/2015-09/msg00394.html https://lists.gnu.org/archive/html/lilypond-user/2023-05/msg00274.html It's advisable to read the entire threads, because there are multiple solutions proposed and errors corrected, with varying advantages and disadvantages. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. https://ansuz.sooke.bc.ca/
Re: Pitch inflection
On Tue, 30 Jan 2018, David Kastrup wrote: > > as closely as possible I don't want to substitute quarter-tone symbols. Is > > there a simple way to insert arrows in place of accidentals? Playback is > > not an issue. > > Quarter notes wouldn't work anyway since you'd not be able to > distinguish a quarter note up from e from a quarter note down from f. Really? The input { eih'1 feh'1 } seems to work for me, producing distinct "e half-sharp" and "f half-flat" notation even though in 24-EDO these are the same pitch. It seems like just replacing the "half-sharp" and "half-flat" symbols with up and down arrows would be enough to satisfy the original poster's request. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: OT: typewriter LaTeX package
On Thu, 15 Feb 2018, Urs Liska wrote: > Sorry for the OT post, but I just have to share this new LaTeX package: > http://www.ctan.org/pkg/typewriter > > I really hope I'll find an opportunity to use it soon:-) Cute. For the genuine typewriter feel, it's important for the between-sentences space to be twice the width of the between-words space; that may not be standard for proportional typesetting (even LaTeX's standard 1.33 factor is no longer popular) but the double-width sentence space was universal in typewritten texts when typewriters were common. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: OT: typewriter LaTeX package
On Thu, 15 Feb 2018, Urs Liska wrote: > > that may not be standard for proportional typesetting (even LaTeX's > > standard 1.33 factor is no longer popular) but the double-width sentence > > space was universal in typewritten texts when typewriters were common. > > > > Are you sure this is not related to language and culture? I can't recall It may be. I was talking about English-language typewritten texts. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: OT: typewriter LaTeX package
On Thu, 15 Feb 2018, Torsten Hämmerle wrote: > Let me assure you that Urs is right: in Germany, without any doubt, there is > no double space. > It says that there is only ONE space after punctuation marks according to > German standards. > Finally Associated Press Stylebook (!): "Use a single space after a period > at the end of a sentence." All present tense... there's no doubt that the narrow space is more common *today*, but typewritten documents in the typewriter era (which ended in roughly the 1980s) are not necessarily the same story. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: OT: typewriter LaTeX package
On Fri, 16 Feb 2018, Shane Brandes wrote: > Got it to work. Figured out you can change to what ever font you want > in the sty file. Lessening the the grayscale variability and some of > the other variables with the use of a historical font yields really > convincing period style documents. This is absolutely great. Really real typewritten documents wouldn't have every instance of every letter shifted independently at random as this package does, though. Instead, individual typewriters would have unique but systematic distortions. Maybe on my typewriter, each "e" would be a little lower than the baseline and each "T" would be tiled three degrees; and on your typewriter it would be some other distinctive pattern. These kinds of things were important in forensic analysis as a way of identifying which typewriter was used to produce a document. When it comes to fonts, at one point when I needed a nice-looking simulated typewriter font I ended up licensing Underwood Typewriter from Vintage Type, who used to be at vintagetype.com but now don't seem to be on the Web. I don't know if that means they're out of business. The site at vintagetype.co doesn't seem to be the same company. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: OT: typewriter LaTeX package
On Fri, 16 Feb 2018, Karlin High wrote: > Have you ever seen Luc Devroye's "On Snot and Fonts" website, with info on > over 70,000 fonts? Looks like he picked up the Vintage Type collection at some > point. Yes, I'm even listed in there myself. Great resource. Doesn't look like he has more recent information on Vintage Type, though. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Octave shifts in polyphonic setting
On Tue, 25 Sep 2018, Jogchum Reitsma wrote: > Restoring this from the first bars affected by adding or deleting apostrophes > or comma's, sometimes lead again to side effects. Rather frustrating... > > Is there a way to prevent this? Are you using relative mode? I only use absolute, myself; every pitch specifies its octave and they don't change depending on the cutting and pasting of other notes. I find that the annoyance of having to debug this kind of thing in relative mode outweighs the convenience of leaving out octaves on some pitches. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before tribes. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: 48 and 72 ET
On Thu, 9 Feb 2017, David Kastrup wrote: > I'll stick with my "that doesn't even make sense" verdict, thank you > very much. Don't ask the question if you're going to attack the answer. Your contributions to LilyPond development don't excuse you from practicing basic civility. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: 48 and 72 ET
On Fri, 10 Feb 2017, David Kastrup wrote: > enthused. Why wouldn't we want to have best practices pointed out and > promoted on the user list? Best practices do not include attacking other list users. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: 13th chord?
On Sat, 25 Feb 2017, Rob Torop wrote: > 13 chord would be rendered as C13 in Ignatzek notation. My question is - is > there a way for me to omit the "9" in the chord name? My experience is There's no "9" in the chord name "C13", so what are you really asking? Do you want to enter a chord name and get a C13 chord with no ninth (or, presumably, eleventh) in it - that is, the notes C E G Bb A? In that case, try \chordmode { c:13^9 } This is also the same thing as a seventh chord with added thirteenth, so you could use \chordmode { c:7.13 } Do you want to change the input syntax so that \chordmode { c:13 } will have the same effect currently achieved by \chordmode { c:13^9 } ? If so, that's probably a bad idea and it's unlikely anyone here will be eager to help you do it. You'd have to go find whatever code parses input in chord mode, and hack that. This would break compatibility between your customized version of LilyPond and files created to use chord mode with the released version. Do you want to enter these notes, by whatever means, and have the chord name that is displayed by a ChordNames context be "C13" and not something else, in particular, not mentioning the ninth? (The default naming scheme seems to be "C7 13".) In that case, you can use a chord name exception as described at http://lilypond.org/doc/v2.19/Documentation/notation/displaying-chords#Selected-Snippets-62 . -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: 13th chord?
On Sun, 26 Feb 2017, Wols Lists wrote: > I'm guessing lily is taking *in* his request for "C 13", converting it > into the chord, and then converting that chord *back* into what it > thinks is called "C 9 13". With the result that lily's output does *not* > match the user's input. Frustrating! Okay, I think I see the issue - it's the same problem everybody has with chord mode and ChordNames, which is that those two things are completely separate from each other despite the usual use case treating them as a single entity. \chordmode { c:13 } turns into \new ChordNames { } prints "C9 13" I agree it looks like a bug, but because of the separation between chord mode and ChordNames, each is going to point the finger at the other as being at fault, because each one is using its own rules which taken independently seem sensible. The real solution would be a thing like ChordNames that is actally a specialized markup mode and just *prints whatever is typed dammit*, with minimal formatting transformations (perhaps automatically putting numbers in superscript, and that's about all), instead of trying to convert to "music" and back. Probably the easiest thing to do is use an override on printing the chord, and just ignore the fact that the notes are wrong internally (which doesn't matter as long as the chord mode input is only used for ChordNames). Like so: chExceptionMusic = { 1-\markup { \super "13" } } chExceptions = #( append ( sequential-music-to-chord-exceptions chExceptionMusic #t) ignatzekExceptions) \new ChordNames { \set chordNameExceptions = #chExceptions \chordmode { c:13 } } -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: 13th chord?
On Sun, 26 Feb 2017, David Kastrup wrote: > To me it would seem that the default mode of operation should be for > them to have matched rules where feasible, in order to have least > element of surprise. I agree, but A. it may not be feasible in some important cases, and B. even matched rules wouldn't really solve the problem, because users would still have to explain to both the input and output systems their own preferred conversion between note sets and displayed chord symbols. (It doesn't help that the standard and traditional musical rules are *screwy* and the nonstandard rules many people want to use are even screwier.) Users want what they type to match what is displayed, even when it doesn't follow the default rules and possibly even when it doesn't follow any rules. For the common use case of chord mode being used solely to generate notes for ChordNames, and ChordNames getting its notes solely from chord mode, we don't really need the notes at all. Just turning the user's input directly into markup would make all the common problems with chords disappear. I've actually used lyrics to print chord names sometimes when I just couldn't get "proper" ChordNames contexts to do what I wanted. It seems like lyrics are 80% of the way to the markup idea I'm describing. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: 13th chord?
On Sun, 26 Feb 2017, Thomas Morley wrote: > If the chordNameFunction (ignatzek-chord-names) does not do what we > want, we should improve it, but not drop a plethora of > lily-functionality. I'm not proposing to "drop a plethora of lily-functionality" but only to provide something that will be useful in the very common case of people wanting to print chord names and wanting the output to match the input. The proposed new feature would not be a modification of chord mode nor of ChordNames, but a third thing separate from either of those two. I imagine it would make sense for most of its code to derive from the code currently used for lyrics, but that fact would preferably NOT be visible to users. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: 13th chord?
On Sun, 26 Feb 2017, Anthony Youngman wrote: > EXCEPT. > > This is *exactly* the scenario in which you will want my chord transposition > code, and that doesn't make sense in a lyrics scenario. Then they can use the existing code. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: 13th chord?
On Sun, 26 Feb 2017, Anthony Youngman wrote: > Replying to myself - remember, you said the user shouldn't notice any > difference. With my code, if you want to change the capo key, it's a I don't know what that refers to. Are you confusing me with someone else? -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: 13th chord?
On Sun, 26 Feb 2017, Wols Lists wrote: > > I don't know what that refers to. Are you confusing me with someone else? > > > "I imagine it would make sense for most of its code to derive from the > code currently used for lyrics, but that fact would preferably NOT be > visible to users." The difference between the new feature coming from lyrics code and the new feature being implemented in some other way should not be visible to users. The difference between using the new feature at all, and not using it, should absolutely be visible to users. That is the purpose of having it. -- Matthew Skala msk...@ansuz.sooke.bc.ca People before principles. http://ansuz.sooke.bc.ca/ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user