Re: repeat ottava
Gianmaria Lariwrites: > I have a fragment that needs to be repeated twice with alternate ending and > the second time one octave higher. The following is an example that would > be ok... > > \version "2.19.52" > > \score { > { > \mark "2nd time 8va" > \repeat volta 2 {c' d' e' f'} > \alternative {{a a a a}{b b b b}} > } > \layout {} > } > > > ...but I need to generate the midi too. What can I do? Let's just cheat. \version "2.19.52" \score { { \mark "2nd time 8va" \repeat volta 2 {c' d' e' f'} \alternative {{a a a a}{\transposition c'' b b b b \transposition c'}} } \layout {} \midi {} } Well, you probably want to have midi-expanded repeats with that, but you get the drift. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
repeat ottava
I have a fragment that needs to be repeated twice with alternate ending and the second time one octave higher. The following is an example that would be ok... \version "2.19.52" \score { { \mark "2nd time 8va" \repeat volta 2 {c' d' e' f'} \alternative {{a a a a}{b b b b}} } \layout {} } ...but I need to generate the midi too. What can I do? Should I avoid "repeat volta", use variable and a midi and layout score? This is what I did: \version "2.19.52" frag = {c' d' e' f'} alta = {a a a a} altb = {b b b b} music = { \mark "2nd time 8va" \repeat volta 2 \frag \alternative {\alta \altb} } \score { \music \layout {} } musicmidi = { \mark "2nd time 8va" \frag \alta \transpose c c' { \frag \altb } } \score { \musicmidi \layout {} } Does exist any better way to do it? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Suppressing warnings
Am 28.02.2017 um 03:13 schrieb Andrew Bernard: I have a warning '... crescendo too small...' which I want to ignore in the log output. Using this (at the top level): #(ly:expect-warning "crescendo too small") does nothing. How exactly do you suppress warnings? From trial and error, I think the string in #(ly:expect-warning "") needs to match the _beginning_ of the warning string, so I often use things like "no viable" (sc. "initial configuration found") HTH, Simon ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re:Vocal scores with extra staves
> > > Also, there appear to be unmatched << . Is closing >> implied, or is > > this just a short-cut example? > > The `>>` are there, but your email reader may interpreting them as a > quotation level (though there is no text in the quotation). Try copying > the whole email into a plain text editor and then deleting the top part > and footer that isn't in the code block. Klaus's email conveniently has > the `%--` lines to mark the beginning and end of the code block. > > Incidentally, this is may be why you're missing a `}` as well; the > "quotations" are separating things so that you're not copying the whole > code block. Your reply, for instance, in quoting Klaus's email doesn't > contain the whole code block. > -- > ? > Br. Samuel, OSB > > Thanks-- Mac mail was deleting the >> etc. The missing >> [right angle brackets] were causing the syntax errors of unexpected } [right curly bracket]. Copying to TextEdit didn't fix it. But when using G-mail on Chrome, everything came thru and copied and typeset successfully. Now I need to figure out an easy way to crop G-mail replies and put the reply text at the bottom! Joe Austin ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Bar counts and repeats in repetitive music
Jeffery, I'm trying to get my head around the code you sent me - it seems that real programmers (you and David both) don't write comments :) Displaying multiple bar numbers needs a bit more thought. Firstly, it has to be switchable off. One of my examples has a single bar repeated 16 times - I suspect the bar numbering would be wider than the music. Also, should the bar numbers be on the first bar of the repeated section (probably a good default), and if not, how does one specify which bar to number? At the moment, probably not worth while spending time on. Best regards, Peter mailto:lilyp...@ptoye.com www.ptoye.com - Wednesday, February 22, 2017, 3:00:51 PM, you wrote: > By the way, sorry I lost track of this thread, but I do think it is > just as well possible to reconstitute the bar number engraver to show > multiple numbers, like if you had a four bar phrase starting at 5 > repeated twice it could say "5, 9" instead of just "5". > It's an interesting problem, so if you are still looking for a > solution, give this thread a little bump and I'll have a swing at it. > Or if you found/find a way yourself, definitely post it! > Best, > Jeffery > On Wed, Feb 22, 2017 at 4:41 AM, Peter Toyewrote: >> Jeffery, >> I owe you a beer. Are you ever in the Salisbury (England) area? If not, take >> a holiday here. >> Best regards, >> Peter >> mailto:lilyp...@ptoye.com >> www.ptoye.com >> - ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Diminuendo goes over subdìseqyent rests
I mean that the diminu2 \! e4 \< endo goes from the its note through the first rest and its "point" ends on the second rest. I don't think it's correct and the result looks ugly to me. The code (an xml file written with Musescore) at that point is es1 \> \breathe | % 21 R1*2 | % 23 d2 \! e4 \< fis4 | % 24 what can I do? Thanks. -- View this message in context: http://lilypond.1069038.n5.nabble.com/Diminuendo-goes-over-subdiseqyent-rests-tp200578.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Vocal scores with extra staves
On Tue 28 Feb 2017 at 18:32:22 (+1100), Andrew Bromage wrote: > On 28/2/17 3:23 pm, David Wright wrote: > >Sorry. I was labouring under the misapprehension that you _wanted_ > >staves starting mid-page (as in your OP, but placed correctly between > >the upper voices and the piano), and that Klaus was advocating > >frenching the score instead. > Not really. Yes. Really. (That's a statement of fact about my mind.) > What I want is to bring a staff into existence for a small > amount of time, and that case is solved, but I was also interested > in the general case. Well, I don't have a clue whether that staff has to be brought into existence anywhere, or just at the beginning of a line; only that you want the number of staves to change from time to time. But I'm glad whatever you wanted is solved, whichever method you adopted. (I thought the big guns here might have commented on your syntax extension and where that syllable actually goes. I only brought a pea-shooter to bear on it.) > The general case is that you have a complex score with many varying > combinations of parts in unison on occasions, and you need to > reduce it down to a size such that the singers and the rehearsal > pianist have a fighting chance without turning a page every two seconds. > > Thankfully not something I have to do... Oh, I thought that's what you _did_ have to scale it up to, and that a G Finale was an example of your type of score. I can see that reducing the number of pages helps, but there's also consideration for the people who have to perform from this type of score (usually it's singers). How frequently are they going to have to switch between staves (and clefs)? Just as an example, the opening page of the Finale could have been set on two staves, but it's not worth the hassle as it's going to have to break into four at the third system anyway, because of the rhythmic and lyric differences. It's compromise all along. Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: \ottava without bracket
Hi Andrew, On Mon, Feb 27, 2017 at 6:52 PM, Andrew Bernardwrote: > Hi David, > > This is excellent and useful. Also works, of course, when using something > like \set Staff.ottavation = "8". > > Why not make this a snippet in LSR? > Sure, I will look it at some more, and submit. Ideally, I'd like to add something to the codebase. Best, David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: repeat ottava
>> I have a fragment that needs to be repeated twice with alternate ending and >> the second time one octave higher. The following is an example that would >> be ok... [] > Let's just cheat. > > \version "2.19.52" > > \score { > { > \mark "2nd time 8va" > \repeat volta 2 {c' d' e' f'} > \alternative {{a a a a}{\transposition c'' b b b b \transposition c'}} > } > \layout {} > \midi {} > } : It works with the alternative - b b b b - that gets correctly transposed but it doesn't with the repeat body - c' d' e' f' -. Do I miss anything? Thank you! g. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Bar counts and repeats in repetitive music
On Tue, Feb 28, 2017 at 6:56 AM, Peter Toyewrote: > Jeffery, > > I'm trying to get my head around the code you sent me - it seems that real > programmers (you and David both) don't write comments :) > > Displaying multiple bar numbers needs a bit more thought. Firstly, it has to > be switchable off. One of my examples has a single bar repeated 16 times - I > suspect the bar numbering would be wider than the music. What if, in that case, there was an option to display as "1, 2, 3 ... 15" or "1, 2, 3 - 15" or something like that (using arbitrary numbers there of course). I suggest this as an *option* because there may be some cases where you want to display all five, six or more bar numbers without ellipsis. > Also, should the > bar numbers be on the first bar of the repeated section (probably a good > default), and if not, how does one specify which bar to number? At the > moment, probably not worth while spending time on. > I actually think this is an interesting problem, and I would guess that you aren't the only LP'er who has wanted something like this before (or will in the future). This is either a matter of scheming up a new engraver or using markup. The latter will at least take less time, so I will see if I can come up with a convincing approach that way first. > Best regards, > > Peter > mailto:lilyp...@ptoye.com > www.ptoye.com -- Jeffery Shivers jefferyshivers.com soundcloud.com/jefferyshivers ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: repeat ottava
Gianmaria Lariwrites: >>> I have a fragment that needs to be repeated twice with alternate ending > and >>> the second time one octave higher. The following is an example that would >>> be ok... > [] >> Let's just cheat. >> >> \version "2.19.52" >> >> \score { >> { >> \mark "2nd time 8va" >> \repeat volta 2 {c' d' e' f'} >> \alternative {{a a a a}{\transposition c'' b b b b \transposition c'}} >> } >> \layout {} >> \midi {} >> } > > : > > It works with the alternative - b b b b - that gets correctly transposed > but it doesn't with the repeat body - c' d' e' f' -. Do I miss anything? Well, this was more a sketch of the functionality to use than a sane proposal. If you are going to use \expandRepeats, you'll likely want to order this as \score { { \mark "2nd time 8va" \repeat volta 2 {c' d' e' f'} \alternative {{a a a a \transposition c''}{b b b b \transposition c'}} } \layout {} \midi {} } instead, namely setting up the "transposition" for the next repeat at the end of the preceding alternative. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: \ottava without bracket
On Tue, Feb 28, 2017 at 10:09 AM, David Nalesnikwrote: > Hi Andrew, > > On Mon, Feb 27, 2017 at 6:52 PM, Andrew Bernard > wrote: >> Hi David, >> >> This is excellent and useful. Also works, of course, when using something >> like \set Staff.ottavation = "8". >> >> Why not make this a snippet in LSR? >> > > Sure, I will look it at some more, and submit. > > Ideally, I'd like to add something to the codebase. > A question: what is the expected behavior when an ottava crosses a line break? The code above will always print a bracket, for such a continuation. David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Diminuendo goes over subdìseqyent rests
Am 28.02.2017 um 13:36 schrieb Son_V: I mean that the diminu2 \! e4 \< endo goes from the its note through the first rest and its "point" ends on the second rest. I don't think it's correct and the result looks ugly to me. The code (an xml file written with Musescore) at that point is es1 \> \breathe | % 21 R1*2 | % 23 d2 \! e4 \< fis4 | % 24 what can I do? Thanks. That’s hardly Lily’s problem. The input code asks for a diminuendo that starts at the onset of bar 21 and ends at the onset of bar 24. And that’s what Lily will engrave. If the diminuendo should stop before the rest, write { es1\> R1*2\! } or { es1\> <>\! R1*2 } – the second one uses an empty chord (which has zero duration) to attach the ending of the \>, which might look more favourable in the code. Best, Simon ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Bar counts and repeats in repetitive music
Am 28.02.2017 um 12:56 schrieb Peter Toye: I'm trying to get my head around the code you sent me - it seems that real programmers (you and David both) don't write comments :) I figure that’s more a question of whether they have time and motivation to do so. Best practice would probably be writing enough comments that someone who is reasonably familiar with the language and context should understand it at first reading. Best, Simon ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Bar counts and repeats in repetitive music
Peter Toyewrites: > David and other, > > All of which makes me think that it's not really worth while pursuing > this development any further. As an ex-programmer (yes, I sometimes > did write comments, but in assembler you rather have to) How else would you keep track of cycle counts? .Z80 NAME('SCROLL') ENTRY SCRLFT,SCRRIG PUBLIC SCRX EXT STAGE,SHBTAB EXT DELAY EXT SCREEN,OUTCTL DSEG SCRLFT: LD IY,STAGE;14(20) LD HL,SCRX ;30 LD A,4 ;37 ADD A,(HL) ;44 LD (HL),A ;51 ADD A,44;58 LD L,A ;62 LD H,0 ;69 LD E,L ;73 LD D,H ;77 ADD HL,HL ;88 ADD HL,DE ;99 EX DE,HL ;103 ADD IY,DE ;118 LD A,12;125 LD (SPSAVE),SP ;145 LD SP,SCREEN+22;155 SCRL05: EX AF,AF' ;4 LD A,(IY) ;23 AND 31 ;30 ADD A,A ;34 LD C,A ;38 LD B,0 ;45 LD HL,SHBTAB ;55 ADD HL,BC ;66 LD E,(HL) ;73 INC HL ;79 LD D,(HL) ;86 LD C,4 ;93 SCRL10: LD A,70H ;7 OR C ;11 DEFWOUTCTL ;22 LD B,16;29 SCRL11: EX DE,HL ;4 LD E,(HL) ;11 INC HL ;17 LD D,(HL) ;24 INC HL ;30 EX DE,HL ;34 REPT11 EX (SP),HL ;35 DEC SP ;41 DEC SP ;47 ENDM;551 EX (SP),HL ;586 LD HL,22+40H ;596 ADD HL,SP ;607 LD SP,HL ;611 DJNZSCRL11 ;10008 SRL C ;10016 JR C,SCRL20;10023 / 30237 LD HL,-16*40H ;10033 ADD HL,SP ;10044 LD SP,HL ;10048 JP SCRL10 ;10058 SCRL20: LD A,70H DEFWOUTCTL EX AF,AF' ;30241 DEC A ;30245 INC IY ;30255 JP NZ,SCRL05 ;363335 SCRL21: LD SP,(SPSAVE) ;363373 LD A,182 JP DELAY Though I have to admit that this was from my youth, an age where you consider yourself and your memory immortal. DELAY is sort of a misnomer: it does not actually do any delay but tells the timing logic how much time a routine spent doing its job. Since we are talking about 363373 cycles on a 4MHz machine, the unit for "DELAY" would appear to be slices of 0.5ms. Scrolling by 16 pixels on a bitmapped display by using EX (SP),HL ;19 DEC SP ;25 DEC SP ;31 as the workhorse rather than LDI ;16 LDI ;32 may seem a bit overoptimizing but it leaves quite more registers available for loop control and stride adjustment and only takes 3 bytes instead of 4. Sorry for the distraction: your remark about the necessity of commenting assembly language triggered this memory. It turns out that basically the module moving player and monsters actually has bonafide comments in it (and it is not timing-critical so there are no cycle counts and no call of DELAY). A collaborator insisted on them. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: repeat ottava
On 28 February 2017 at 18:31, David Kastrupwrote: > > Gianmaria Lari writes: > > >>> I have a fragment that needs to be repeated twice with alternate ending > > and > >>> the second time one octave higher. The following is an example that would > >>> be ok... > > [] > >> Let's just cheat. > >> > >> \version "2.19.52" > >> > >> \score { > >> { > >> \mark "2nd time 8va" > >> \repeat volta 2 {c' d' e' f'} > >> \alternative {{a a a a}{\transposition c'' b b b b \transposition c'}} > >> } > >> \layout {} > >> \midi {} > >> } > > > > : > > > > It works with the alternative - b b b b - that gets correctly transposed > > but it doesn't with the repeat body - c' d' e' f' -. Do I miss anything? > > Well, this was more a sketch of the functionality to use than a sane > proposal. If you are going to use \expandRepeats, you'll likely want to > order this as > > \score { > { > \mark "2nd time 8va" > \repeat volta 2 {c' d' e' f'} > \alternative {{a a a a \transposition c''}{b b b b \transposition c'}} > } > \layout {} > \midi {} > } > > instead, namely setting up the "transposition" for the next repeat at > the end of the preceding alternative. just because you used in both your example the magic "\transposition" I would not say that your first example was just a "sketch" of what you did in your last example :) Anyway, really nice escamotage. I will try to avoid it anytime that's possible... but not more! Thanks!! ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: \ottava without bracket
Hi Harm, On Tue, Feb 28, 2017 at 1:02 PM, Thomas Morleywrote: > 2017-02-28 16:09 GMT+00:00 David Nalesnik : >> Hi Andrew, >> >> On Mon, Feb 27, 2017 at 6:52 PM, Andrew Bernard >> wrote: >>> Hi David, >>> >>> This is excellent and useful. Also works, of course, when using something >>> like \set Staff.ottavation = "8". >>> >>> Why not make this a snippet in LSR? >>> >> >> Sure, I will look it at some more, and submit. >> >> Ideally, I'd like to add something to the codebase. >> >> Best, >> David > > > Hi David, > > I was working on a patch introducing ottavaText as a context-property. > Maybe we could coordinate or at least avoid doing work twice. I don't think this would conflict with anything I may try. I'd just be modifying the print function. > > I'll attach what I've done so far. > It's not finished yet: I'd like to polish it and add entries in NR and > Changes, probably worth a regtest as well. > Sure, go ahead! It will be much more convenient storing texts in a context property. There's a comment in lily/ottava-bracket.cc about the desirability of being able to switch between longer and shorter texts based on available space: Maybe that could be part of the overall plan. > > P.S. > Did you notice > https://sourceforge.net/p/testlilyissues/issues/5064/#23bb > ? No, I hadn't seen it. Thanks for pointing this out to me! I'm not certain what the best way to fix this is. (I added a comment to the issue tracker.) Best, David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is there any way to use dynamics as prefixes?
2017-02-28 20:37 GMT+01:00: > On 02/28/17 20:14, David Kastrup wrote: >> But if you prefer the latter, just start your music file with >> >> "("=<>( > > > What is this, Perl? Nope. See declarations-init.ly for the original: "(" = #(make-span-event 'SlurEvent START) David's suggestion simply redefines it. See the output of: %% original "(" = #(make-span-event 'SlurEvent START) \void \displayMusic ( \void \displayLilyMusic ( %% redefined "("=<>( \void \displayMusic ( \void \displayLilyMusic ( Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
merging different voices
Hello list, This is my first post here and I’m fairly new to Lilypond, but I need some help. I am using Lilypond to compose, and I need to merge 4 scores into one. All four scores have the same 6 instruments and time signature (4/4), and all rhythms fall into the same grid of 16th notes. What I imagine by ‘merging’ is something like superimposing pixels (multiply, add, substract, divide) but applying this to the 16th-note ‘pixel’. Is this something that can be done within Lilypond? Any suggestion would be really appreciated! Thanks! Fede ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is there any way to use dynamics as prefixes?
caag...@gmail.com writes: > On 02/28/17 20:14, David Kastrup wrote: >> Well, but slurs can start at the same note where another slur ends, and >> `c'4( d')( e')' is a lot clearer to me than `(c'4 (d') d')' > > I can honestly say I've never seen that, and I can't really imagine > how that'd even be played. I agree that that looks like some sort of > weird nesting, which isn't too great. > >> But if you prefer the latter, just start your music file with >> >> "("=<>( > > What is this, Perl? It reassigns a new meaning to "(", and the new meaning is <> (the empty chord) with an opening slur attached (the old meaning is taken before "(" gets redefined). >> and you are all set. At one point of time, LilyPond worked like that, >> and it wasn't really working all that well. > > Might be better to just get used to it, then. Would probably help if > Vim's lilypond highlighting didn't suck. > >> Incidentally, the empty chord <> is helpful for your example as well: >> >> <>\mp >> \notes >> \notes >> <>\ff >> \notes >> ... > > That seems quite useful, yes. AsI'm guessing it basically creates an > empty zero-length chord and attaches stuff to that. Yes. > how come the dynamics look like they're attached to the next note > instead of before it? Because the chord is zero-length. And because the musical timing of articulations is at the start of the notes they are attached to rather than at their end since all synchronization happens when an event _starts_. So <>\ff starts the \ff at the preceding note's end and the following note's start, and this works out as placing it in the same position as the following note. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: merging different voices
Hi Fede, welcome to LilyPond! Am 28.02.2017 um 23:06 schrieb Federico Camara Halac: > Hello list, > > This is my first post here and I’m fairly new to Lilypond, but I need some > help. I am using Lilypond to compose, and I need to merge 4 scores into one. > All four scores have the same 6 instruments and time signature (4/4), and all > rhythms fall into the same grid of 16th notes. > > What I imagine by ‘merging’ is something like superimposing pixels (multiply, > add, substract, divide) but applying this to the 16th-note ‘pixel’. Do you mean you have four scores that have some kind of similar "outline" or formal structure and you want to process them along the lines of (to mention just one example) "I want a sound at this 16th note if there is a sound in all four scores at that point" or similar kinds of operations? > > Is this something that can be done within Lilypond? Any suggestion would be > really appreciated! It is difficult to tell what you actually want to achieve. But in general I would say: yes, this kind of stuff should definitely be good to do with LilyPond. But I wouldn't expect it to be "beginner-level". But much depends on what you really need. It *may* be that all you need is one complicated Scheme function - and then there are good chances that someone finds the challenge interesting and helps you on this list. Good luck Urs > > Thanks! > > Fede > > > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user -- u...@openlilylib.org https://openlilylib.org http://lilypondblog.org ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is there any way to use dynamics as prefixes?
> > > This also applies to slurs - `(c'4 d' e' f')` is a lot clearer to me > > than `c'4( d' e' f)`. Well, but slurs can start at the same note where another slur ends, and > `c'4( d')( e')' is a lot clearer to me than `(c'4 (d') d')' > Just a curiosity David, have you ever considered this other syntax(: c'4( d')( e') -> c'4()d'()e' c'4( d' e' f) -> c'4( d' e') f ? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is there any way to use dynamics as prefixes?
Gianmaria Lariwrites: >> >> > This also applies to slurs - `(c'4 d' e' f')` is a lot clearer to me >> > than `c'4( d' e' f)`. > > Well, but slurs can start at the same note where another slur ends, and >> `c'4( d')( e')' is a lot clearer to me than `(c'4 (d') d')' >> > > Just a curiosity David, have you ever considered this other syntax(: > > c'4( d')( e') -> c'4()d'()e' > c'4( d' e' f) -> c'4( d' e') f > > ? It falls apart once you try using in-chord slurs. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Bar counts and repeats in repetitive music
On Tue, Feb 28, 2017 at 12:02 PM, Simon Albrechtwrote: > Am 28.02.2017 um 12:56 schrieb Peter Toye: > > I'm trying to get my head around the code you sent me - it seems that real > programmers (you and David both) don't write comments :) > > > I figure that’s more a question of whether they have time and motivation to > do so. > Best practice would probably be writing enough comments that someone who is > reasonably familiar with the language and context should understand it at > first reading. > Well, time is an issue. Also an issue is the feeling that a good solution requires functionality which isn't (so far as I know) part of LilyPond. (It would be nice to be able to get info about the unfolded music when it's folded -- i.e., the bar numbers Peter is after.) And that I shouldn't be coopting the MeasureCounter grob. Also relevant is the fact that this code requires a lot of familiarity with LilyPond internals. Certainly a comment here and there is useful, and I'm remiss, but you would still have to know how to write a Scheme engraver. Best, David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Is there any way to use dynamics as prefixes?
I think it's rather weird that you write `c'4\ff d'` instead of `\ff c'4 d'`. Other constructs such as `\tempo` and `\mark` are before the notes they affect - why aren't dynamics? For a more practical example, playing the same thing multiple times with different dynamics with prefix dynamics would be easy: ``` notes = {c'4 d' e' f'} \mp \notes \notes \ff \notes ``` Doing the same with suffix dynamics would be rather messy - especially not adding any dynamic mark at the second instance. This also applies to slurs - `(c'4 d' e' f')` is a lot clearer to me than `c'4( d' e' f)`. (This is the first time I ever use a mailing list, so please tell me if I'm doing anything horribly wrong.) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: \ottava without bracket
2017-02-28 16:09 GMT+00:00 David Nalesnik: > Hi Andrew, > > On Mon, Feb 27, 2017 at 6:52 PM, Andrew Bernard > wrote: >> Hi David, >> >> This is excellent and useful. Also works, of course, when using something >> like \set Staff.ottavation = "8". >> >> Why not make this a snippet in LSR? >> > > Sure, I will look it at some more, and submit. > > Ideally, I'd like to add something to the codebase. > > Best, > David Hi David, I was working on a patch introducing ottavaText as a context-property. Maybe we could coordinate or at least avoid doing work twice. I'll attach what I've done so far. It's not finished yet: I'd like to polish it and add entries in NR and Changes, probably worth a regtest as well. Cheers, Harm P.S. Did you notice https://sourceforge.net/p/testlilyissues/issues/5064/#23bb ? From dfa574353db72775a028f172da6f5c5009c5f69d Mon Sep 17 00:00:00 2001 From: Thomas Morley Date: Tue, 28 Feb 2017 18:48:27 + Subject: [PATCH] Introduce context-property ottavaText --- ly/engraver-init.ly | 7 +++ scm/define-context-properties.scm | 2 ++ scm/define-music-callbacks.scm| 13 +++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 693f9eb..41665df 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -768,6 +768,13 @@ automatically when an output definition (a @code{\\score} or topLevelAlignment = ##t timing = ##t + + ottavaText = +#'((2 . "15ma") + (1 . "8va") + (0 . #f) + (-1 . "8vb") + (-2 . "15mb")) } diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm index 75f1807..dd362fe 100644 --- a/scm/define-context-properties.scm +++ b/scm/define-context-properties.scm @@ -494,6 +494,8 @@ any effect the note would have had on accidentals in other voices.") (ottavation ,markup? "If set, the text for an ottava spanner. Changing this creates a new text spanner.") + (ottavaText ,list? "An alist containing pairs of ottava-number and markup. +Used to get the text for @code{OttavaBracket}.") (output ,ly:music-output? "The output produced by a score-level translator during music interpretation.") diff --git a/scm/define-music-callbacks.scm b/scm/define-music-callbacks.scm index 5cc1db1..d8150cb 100644 --- a/scm/define-music-callbacks.scm +++ b/scm/define-music-callbacks.scm @@ -77,12 +77,13 @@ to be used by the sequential-iterator" (list (context-spec-music (make-apply-context (lambda (context) - (let ((offset (* -7 octavation)) -(string (assoc-get octavation '((2 . "15ma") -(1 . "8va") -(0 . #f) -(-1 . "8vb") -(-2 . "15mb") + (let* ((offset (* -7 octavation)) + (ottava-label-list + (ly:context-property context 'ottavaText)) + (string + (if (pair? ottava-label-list) + (assoc-get octavation ottava-label-list) + #f))) (set! (ly:context-property context 'middleCOffset) offset) (set! (ly:context-property context 'ottavation) string) (ly:set-middle-C! context -- 2.1.4 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is there any way to use dynamics as prefixes?
Hi, 2017-02-28 19:53 GMT+01:00: > I think it's rather weird that you write `c'4\ff d'` instead of `\ff c'4 > d'`. Other constructs such as `\tempo` and `\mark` are before the notes they > affect - why aren't dynamics? Here's a little misunderstanding. \mark and \tempo are music-functions not affecting a certain note directly, whereas dynamics and slurs are indeed part of the 'articulations property of a 'NoteEvent. Why postfix-syntax? It's a design-decision, made long time before I was around here. Maybe others can comment on this. > For a more practical example, playing the same thing multiple times with > different dynamics with prefix dynamics would be easy: > > ``` > notes = {c'4 d' e' f'} > > \mp > \notes > \notes > \ff > \notes > ``` > > Doing the same with suffix dynamics would be rather messy - especially not > adding any dynamic mark at the second instance. Try: notes = { c'4 d' e' f' } { <>\mp \notes \notes <>\ff \notes } > > This also applies to slurs - `(c'4 d' e' f')` is a lot clearer to me than > `c'4( d' e' f)`. You'll get used to it very soon. > (This is the first time I ever use a mailing list, so please tell me if I'm > doing anything horribly wrong.) If you have concerns about your behaviour on this list, I recommend to read: http://www.catb.org/~esr/faqs/smart-questions.html Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is there any way to use dynamics as prefixes?
On 02/28/17 20:14, David Kastrup wrote: Well, but slurs can start at the same note where another slur ends, and `c'4( d')( e')' is a lot clearer to me than `(c'4 (d') d')' I can honestly say I've never seen that, and I can't really imagine how that'd even be played. I agree that that looks like some sort of weird nesting, which isn't too great. But if you prefer the latter, just start your music file with "("=<>( What is this, Perl? and you are all set. At one point of time, LilyPond worked like that, and it wasn't really working all that well. Might be better to just get used to it, then. Would probably help if Vim's lilypond highlighting didn't suck. Incidentally, the empty chord <> is helpful for your example as well: <>\mp \notes \notes <>\ff \notes ... That seems quite useful, yes. AsI'm guessing it basically creates an empty zero-length chord and attaches stuff to that, how come the dynamics look like they're attached to the next note instead of before it? Is it because that would be silly? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is there any way to use dynamics as prefixes?
On 02/28/17 20:26, Thomas Morley wrote: Hi, 2017-02-28 19:53 GMT+01:00: I think it's rather weird that you write `c'4\ff d'` instead of `\ff c'4 d'`. Other constructs such as `\tempo` and `\mark` are before the notes they affect - why aren't dynamics? Here's a little misunderstanding. \mark and \tempo are music-functions not affecting a certain note directly, whereas dynamics and slurs are indeed part of the 'articulations property of a 'NoteEvent. That makes sense. The engraver itself wouldn't care that dynamics change the following notes itself; the midi converter just interprets it that way. Why postfix-syntax? It's a design-decision, made long time before I was around here. Maybe others can comment on this. For a more practical example, playing the same thing multiple times with different dynamics with prefix dynamics would be easy: ``` notes = {c'4 d' e' f'} \mp \notes \notes \ff \notes ``` Doing the same with suffix dynamics would be rather messy - especially not adding any dynamic mark at the second instance. Try: notes = { c'4 d' e' f' } { <>\mp \notes \notes <>\ff \notes } As I said to David Kastrup, that seems very useful. This also applies to slurs - `(c'4 d' e' f')` is a lot clearer to me than `c'4( d' e' f)`. You'll get used to it very soon. I guess so. Changing it would only confuse other people trying to read my scores. (This is the first time I ever use a mailing list, so please tell me if I'm doing anything horribly wrong.) If you have concerns about your behaviour on this list, I recommend to read: http://www.catb.org/~esr/faqs/smart-questions.html Thanks, I'll check that out. Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is there any way to use dynamics as prefixes?
caag...@gmail.com writes: > I think it's rather weird that you write `c'4\ff d'` instead of `\ff > c'4 d'`. Other constructs such as `\tempo` and `\mark` are before the > notes they affect - why aren't dynamics? > > For a more practical example, playing the same thing multiple times > with different dynamics with prefix dynamics would be easy: > > ``` > notes = {c'4 d' e' f'} > > \mp > \notes > \notes > \ff > \notes > ``` > > Doing the same with suffix dynamics would be rather messy - especially > not adding any dynamic mark at the second instance. > > This also applies to slurs - `(c'4 d' e' f')` is a lot clearer to me > than `c'4( d' e' f)`. Well, but slurs can start at the same note where another slur ends, and `c'4( d')( e')' is a lot clearer to me than `(c'4 (d') d')' But if you prefer the latter, just start your music file with "("=<>( and you are all set. At one point of time, LilyPond worked like that, and it wasn't really working all that well. Incidentally, the empty chord <> is helpful for your example as well: <>\mp \notes \notes <>\ff \notes ... -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Bar counts and repeats in repetitive music
David and other, All of which makes me think that it's not really worth while pursuing this development any further. As an ex-programmer (yes, I sometimes did write comments, but in assembler you rather have to) it's just a bit frustrating not to be able to work it out by myself. What you and Jeffery have cooked up is more than adequate for my immediate needs. For which many thanks again. Best regards, Peter mailto:lilyp...@ptoye.com www.ptoye.com - Tuesday, February 28, 2017, 6:32:53 PM, you wrote: > On Tue, Feb 28, 2017 at 12:02 PM, Simon Albrecht> wrote: >> Am 28.02.2017 um 12:56 schrieb Peter Toye: >> I'm trying to get my head around the code you sent me - it seems that real >> programmers (you and David both) don't write comments :) >> I figure that’s more a question of whether they have time and motivation to >> do so. >> Best practice would probably be writing enough comments that someone who is >> reasonably familiar with the language and context should understand it at >> first reading. > Well, time is an issue. Also an issue is the feeling that a good > solution requires functionality which isn't (so far as I know) part of > LilyPond. (It would be nice to be able to get info about the unfolded > music when it's folded -- i.e., the bar numbers Peter is after.) And > that I shouldn't be coopting the MeasureCounter grob. > Also relevant is the fact that this code requires a lot of familiarity > with LilyPond internals. Certainly a comment here and there is > useful, and I'm remiss, but you would still have to know how to write > a Scheme engraver. > Best, > David___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: merging different voices
On Tue, Feb 28, 2017 at 5:06 PM, Federico Camara Halacwrote: > Hello list, > > This is my first post here and I’m fairly new to Lilypond, but I need some > help. I am using Lilypond to compose, and I need to merge 4 scores into one. > All four scores have the same 6 instruments and time signature (4/4), and all > rhythms fall into the same grid of 16th notes. > > What I imagine by ‘merging’ is something like superimposing pixels (multiply, > add, substract, divide) but applying this to the 16th-note ‘pixel’. > Just to echo what Urs wrote, it is unclear what exactly you want. Can you provide a small snippet of code (http://lilypond.org/tiny-examples.html) or a (small size) image or anything else to maybe illustrate what you want? If you really want to do this arithmetic-y stuff (btw, about that: do you mean multiply, add, etc. the *pitches* only, or the rhythms/dynamics too, or something else?), I am guessing that would require quite a hefty procedure, though it certainly is possible (also already said by Urs). I wonder if you mean that you want to get the average or median pitch for each *grid* cell. Or maybe you have a specific algorithm in mind? > Is this something that can be done within Lilypond? Any suggestion would be > really appreciated! > > Thanks! > > Fede > > > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user -- Jeffery Shivers jefferyshivers.com soundcloud.com/jefferyshivers ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user