Valentin Villenave <valen...@villenave.net> writes: > On 1/29/19, Davide Bonetti <d...@davidebonetti.it> wrote: >> Ok, now it works well! > > Greetings everybody, > > David K. raised an interesting question with regard to the > \invertChords function: > https://codereview.appspot.com/365840043/#msg18 > > Basically (IIUC), he’s thinking that > > \invertChords 1 <c' e' g' b' d'' f''> > > should ideally result in > > <e' g' b' d'' f'' c'''> > > rather than > > <e' g' b' c'' d'' f''> > > (as the current implementation produces). > > Any thoughts?
David Kastrup did not think anything like that. While it seems like an actually quite worthwhile thought, my concern in the review rather was that with the c'' ending up in the middle of the result chord, it will come up earlier for another octavation in higher-numbered inversions than the f'' would. So my idea rather was to not use repeatedly a 2nd inversion for the sake of generating higher inversions but rather figure out the notes to be octavated from the initial chord and then octavate all of them at once, not disturbing their relative order. What you flatteringly call "my" thought would additionally maintain "circular" order of the pitches, basically rotating pitches and then octavating as needed to make sure that later pitches don't end up before earlier pitches. That could end up saner and it would actually work in repeated application of \raiseNote without requiring rewriting the internals of \invertChords . My objection was more addressing a mathematical/programming inconsistency rather than bothering with musical sense. But addressing this from the musical end, regarding its actual effect rather than its logical ramifications, might be a saner approach. Maybe the cleanest in a musical sense would be if an "inversion" split the set of pitches into two, the ones preceding the inversion point and the ones afterwards and then raise the octaves of the preceding pitches en bloc such that the first inverted pitch becomes higher than the last non-inverted pitch. That would not be exactly like repeated application of \raiseNote (which could in theory end up "flattening" more than one interval happening to be larger than an octave) but probably be the most "musically" correct and predictable way to do this. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user