Re: Function or command to omit only certain accidentals of a chord?

2018-10-28 Thread Pedro Pessoa
Hello Jan! I'm just testing out EE and I've come across the need to adress a noteHead tweak in a note inside a chord. Looking for a solution, I came to this post. Is this implemented? -- Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

Re: Function or command to omit only certain accidentals of a chord?

2018-02-03 Thread Stefano Troncaro
Thank you Thomas, that's very helpful! 2018-02-03 12:10 GMT-03:00 Thomas Morley : > 2018-02-03 15:44 GMT+01:00 Stefano Troncaro : > > Hi Thomas, thank you for your corrections! > > > > If I may ask, where are functions like event-chord-pitches

Re: Function or command to omit only certain accidentals of a chord?

2018-02-03 Thread Thomas Morley
2018-02-03 15:44 GMT+01:00 Stefano Troncaro : > Hi Thomas, thank you for your corrections! > > If I may ask, where are functions like event-chord-pitches documented? A lot of definitions in .scm-files are not documented. You may try the code attached to

Re: Function or command to omit only certain accidentals of a chord?

2018-02-03 Thread Stefano Troncaro
Hi Thomas, thank you for your corrections! If I may ask, where are functions like event-chord-pitches documented? I have only found a list of functions with their name starting with "ly:". I assumed those were named that way to differentiate Lilypond exclusive functions from Scheme's own, but it

Re: Function or command to omit only certain accidentals of a chord?

2018-02-03 Thread Thomas Morley
2018-02-03 3:52 GMT+01:00 Stefano Troncaro : > After a lot of stumbling around I finally managed to expand Jan-Peters' > function so that it can modify more than one note in a given chord. I > attached it so its available for anyone interested in using it. Hi Stefano,

Re: Function or command to omit only certain accidentals of a chord?

2018-02-02 Thread Stefano Troncaro
Thank you for your help everyone! After a lot of stumbling around I finally managed to expand Jan-Peters' function so that it can modify more than one note in a given chord. I attached it so its available for anyone interested in using it. On the other hand, I too think that the real solution

Re: Function or command to omit only certain accidentals of a chord?

2018-02-02 Thread Kieren MacMillan
Hi David (et al.), > I think it would make a whole lot more sense to teach the Edition > Engraver how to mark/identify and tweak single items. +1 At the risk of opening a serious can-o'-worms… I would love for you (David K.) — who has the best Lilypond-fundamentals programming mind I know — to

Re: Function or command to omit only certain accidentals of a chord?

2018-02-02 Thread David Kastrup
Jan-Peter Voigt writes: > Hello Harm, Stéfano, > > I always underestimate the usability of before/after-line-breaking ... > Based on Harms code I scratched a music-function to conditionally omit > the accidental. This one can be used with the EE. > It smells a bit hacky, but it

Re: Function or command to omit only certain accidentals of a chord?

2018-02-02 Thread Jan-Peter Voigt
Am 02.02.2018 um 17:55 schrieb David Kastrup: Jan-Peter Voigt writes: Hello Harm, Stéfano, I always underestimate the usability of before/after-line-breaking ... Based on Harms code I scratched a music-function to conditionally omit the accidental. This one can be used with

Re: Function or command to omit only certain accidentals of a chord?

2018-02-02 Thread Jan-Peter Voigt
Hello Harm, Stéfano, I always underestimate the usability of before/after-line-breaking ... Based on Harms code I scratched a music-function to conditionally omit the accidental. This one can be used with the EE. It smells a bit hacky, but it seems to work and is extendable for other use

Re: Function or command to omit only certain accidentals of a chord?

2018-02-02 Thread Jan-Peter Voigt
Hello Harm, Stéfano, I always underestimate the usability of before/after-line-breaking ... Based on Harms code I scratched a music-function to conditionally omit the accidental. This one can be used with the EE. It smells a bit hacky, but it seems to work and is extendable for other use

Re: Function or command to omit only certain accidentals of a chord?

2018-02-02 Thread Jan-Peter Voigt
Hello Harm, Stéfano, I always underestimate the usability of before/after-line-breaking ... Based on Harms code I scratched a music-function to conditionally omit the accidental. This one can be used with the EE. It smells a bit hacky, but it seems to work and is extendable for other use

Re: Function or command to omit only certain accidentals of a chord?

2018-02-02 Thread Caagr98
I'm not sure if EE supports ApplyOutputEvents, but you could try something like this: ⋘ \applyOutput Voice.Accidental #(let ((n 1)) (lambda (grob ctx1 ctx2) (if (= n 0) (ly:grob-set-property! grob 'stencil #f)) (set! n (1- n % Will omit the N-th

Re: Function or command to omit only certain accidentals of a chord?

2018-02-02 Thread Thomas Morley
2018-02-02 3:55 GMT+01:00 Stefano Troncaro : > @Thomas > I was not aware that it was possible to write a function inside of a > parameter of a grob, and that before-line-breaking and after-line-breaking > served this purpose. The documentation describes them as booleans

Re: Function or command to omit only certain accidentals of a chord?

2018-02-01 Thread Stefano Troncaro
@Jan-Peter > > *this is a feature I long to implement for quite some time. This means it > is not possible with the EE right now. The following ideas came up to > provide a solution: 1. add IDs to certain elements and allow addressing > elements b ID. 2. Add tweaks with a predicate, e.g. at

Re: Function or command to omit only certain accidentals of a chord?

2018-02-01 Thread Thomas Morley
2018-02-01 16:59 GMT+01:00 Stefano Troncaro : > Ideally, I wanted a function > that I could use with the edition-engraver to tweak target elements inside > chords. I framed the question around accidentals in the post above, but > ultimately I hoped to be able to use the

Re: Function or command to omit only certain accidentals of a chord?

2018-02-01 Thread David Kastrup
Stefano Troncaro writes: >> *But you also can use stuff like \once \accidentalStyle forget I think to >> similar effect.* >> > > Thank you for the suggestion. Unfortunately, if you read my reply to > Caarg98 you'll notice that I'm looking for something more flexible.

Re: Function or command to omit only certain accidentals of a chord?

2018-02-01 Thread Jan-Peter Voigt
Hello Stéfano, this is a feature I long to implement for quite some time. This means it is not possible with the EE right now. The following ideas came up to provide a solution: 1. add IDs to certain elements and allow addressing elements b ID. 2. Add tweaks with a predicate, e.g. at moment

Re: Function or command to omit only certain accidentals of a chord?

2018-02-01 Thread Stefano Troncaro
@Caagr98 > > > *If you could be a bit more specific about your goal (hiding all sharps? > Hiding accidentals on even-indexed notes? Hiding accidentals specifically > on cis?), that would make it possible to make a more specific function for > your goals. (Note that this function can only be used

Re: Function or command to omit only certain accidentals of a chord?

2018-01-31 Thread David Kastrup
Stefano Troncaro writes: > Hello again everyone! > > Suppose I have the following example: > > \version "2.19.80"\language "english" > command = { > %What should go here to omit the sharp while keeping the natural?} > \score { > \new Staff { > \new Voice

Re: Function or command to omit only certain accidentals of a chord?

2018-01-31 Thread Caagr98
In that case, you could use something like this: ⋘ \version "2.19.80" nth = #(define-music-function (n tweak mus) (integer? ly:music? ly:music?) (single tweak (list-ref (ly:music-property mus 'elements) n)) mus) { \nth 1 \omit Accidental % Remember, zero-indexed } ⋙ If you could be

Re: Function or command to omit only certain accidentals of a chord?

2018-01-31 Thread Stefano Troncaro
I just tried it, but unfortunately it appears to only work when used inside the chord, and I need to find a way to do it from outside. 2018-01-31 17:39 GMT-03:00 Caagr98 : > You could try \single instead of \once, as in cs,>. > > On 01/31/18 21:27, Stefano Troncaro wrote: > >

Re: Function or command to omit only certain accidentals of a chord?

2018-01-31 Thread Caagr98
You could try \single instead of \once, as in . On 01/31/18 21:27, Stefano Troncaro wrote: > Hello again everyone! > > Suppose I have the following example: > > \version "2.19.80" \language "english" command = { %What should go here to > omit the sharp while keeping the natural? } \score {

Function or command to omit only certain accidentals of a chord?

2018-01-31 Thread Stefano Troncaro
Hello again everyone! Suppose I have the following example: \version "2.19.80"\language "english" command = { %What should go here to omit the sharp while keeping the natural?} \score { \new Staff { \new Voice \relative c'' { \key b \minor \accidentalStyle modern \partial 4