Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-21 Thread David Kastrup
antlists  writes:

> On 19/03/2021 16:43, H. S. Teoh wrote:
>> It's somewhat mitigated by inserting octave checks every so often (say,
>> at the start of every section), so that when it does go wrong, there's a
>> warning, and the problem only propagates up to the next octave check
>> rather than the rest of the piece.
>
> :-)
>
> And Han Wen wrote the original octave check for me! Because I think I
> had exactly the problem Kieren is moaning about - I put a fragment of
> music in a variable, and because it started and finished over a 5th
> apart, I had great difficulty getting the phrase to repeat
> correctly. That was back in the 2.4/2.6 days ...

Ah, so you are at fault that

\relative { c=4 }

is valid music.

-- 
David Kastrup



Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-21 Thread antlists

On 19/03/2021 16:43, H. S. Teoh wrote:

It's somewhat mitigated by inserting octave checks every so often (say,
at the start of every section), so that when it does go wrong, there's a
warning, and the problem only propagates up to the next octave check
rather than the rest of the piece.


:-)

And Han Wen wrote the original octave check for me! Because I think I 
had exactly the problem Kieren is moaning about - I put a fragment of 
music in a variable, and because it started and finished over a 5th 
apart, I had great difficulty getting the phrase to repeat correctly. 
That was back in the 2.4/2.6 days ...


Cheers,
Wol



Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-19 Thread David Kastrup
Kieren MacMillan  writes:

> Hi all,
>
>>> imho the near universality of keyboard competence defines Western
>>> Music as "can be played on a piano" and has severely damaged our
>>> understanding of what music actually is. Musicians like me who
>>> can't play piano are very rare ...
>
> As a musical theatre director, college music faculty instructor,
> composer, and performer (on multiple instruments), I can say with high
> confidence that you are mistaken: musicians who can’t play piano
> include at least 50% of the players in my pit bands, 80% of the music
> theatre students I teach, most of my young (pre-college) composition
> students, and a good 1/3 of the singers I accompany. If we qualify
> further with “can plunk out a linear melody on the piano reasonably in
> time, but nothing more than that”, the percentage is even higher.
>
>>> And why would a copyist be able to play keyboard?
>> Or not.  There's no reason for them to be mutually exclusive.
>
> Agreed. That being said, of all the (multiple dozens of) professional
> copyists I know, I know of only one who doesn’t play keyboard at least
> “reasonably well” (perhaps coincidentally, he’s a fabulous guitarist).
>
>> \fixed should make extremely high or low parts much easier.
>
> It does… but it also suffers from the same cut-and-paste problem (that
> word “IMO”) as \relative.

Maybe we should offer an input alternative (or something one depends on
the editor/MIDI converter to supply) to make the equivalences

c¹ c'
c² c''
c³ c'''
c⁴ c
c⁵ c'
c⁶ c''
c₁ c,
c₂ c,,
c₃ c,,,

That would be sorta Helmholtz-ish and would make the octave markers less
disruptive for reading and manipulating the source.  Could be done just
as "syntax highlighting" or as actual entry option.

Of course as actual entry option it would cause some interference with
the "identifiers can contain any non-ASCII unicode characters anywhere"
mantra.  Up to now, only ASCII letters are syntactically special.

-- 
David Kastrup



Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-19 Thread H. S. Teoh
On Fri, Mar 19, 2021 at 12:16:49PM -0400, Kieren MacMillan wrote:
[...]
> > Probably the biggest problem I encounter with \relative is when I
> > enter some music and then extract a section of it into a variable
> > for use somewhere else and having the original shift octaves
> > somewhere in the middle.  Then I have to search for the shift and
> > correct it.
> 
> That was the straw that broke my camel’s back so many years ago. I
> find it particularly bad if you try to compose or arrange directly in
> Lilypond (as opposed to simply transcribing or
> engraving-from-written-MS): write the first section, write the third
> section, then write the second section and the third section “becomes
> wrong”; fix that; try to cut-and-paste a chunk from Section 2 into
> Section 3, and both the new section *and* the rest of the piece
> “become wrong”; fix that; etc. When this plays out at higher
> resolution, I find it endlessly maddening (and flow-killing).
[...]

It's somewhat mitigated by inserting octave checks every so often (say,
at the start of every section), so that when it does go wrong, there's a
warning, and the problem only propagates up to the next octave check
rather than the rest of the piece.  That's what I do, anyway -- I also
compose directly in Lilypond. Octave checks are also the first warnings
that come up, so my usual practice is to interrupt Lilypond as soon as I
see an octave check failure, fix it, and repeat until no more warnings
come up.

Of course, I know your stance has been very clear all these years, so
I'm not going to try to convince you.  :-)  But just wanted to say that
there *are* ways to mitigate the problem, and that I find \relative
still extremely useful in tonal music.


T

-- 
Error: Keyboard not attached. Press F1 to continue. -- Yoon Ha Lee, CONLANG



Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-19 Thread Kieren MacMillan
Hi all,

>> imho the near universality of keyboard competence defines Western Music as 
>> "can be played on a piano" and has severely damaged our understanding of 
>> what music actually is. Musicians like me who can't play piano are very rare 
>> ...

As a musical theatre director, college music faculty instructor, composer, and 
performer (on multiple instruments), I can say with high confidence that you 
are mistaken: musicians who can’t play piano include at least 50% of the 
players in my pit bands, 80% of the music theatre students I teach, most of my 
young (pre-college) composition students, and a good 1/3 of the singers I 
accompany. If we qualify further with “can plunk out a linear melody on the 
piano reasonably in time, but nothing more than that”, the percentage is even 
higher.

>> And why would a copyist be able to play keyboard?
> Or not.  There's no reason for them to be mutually exclusive.

Agreed. That being said, of all the (multiple dozens of) professional copyists 
I know, I know of only one who doesn’t play keyboard at least “reasonably well” 
(perhaps coincidentally, he’s a fabulous guitarist).

> \fixed should make extremely high or low parts much easier.

It does… but it also suffers from the same cut-and-paste problem (that word 
“IMO”) as \relative.

> Probably the biggest problem I encounter with \relative is when I enter some 
> music and then extract a section of it into a variable for use somewhere else 
> and having the original shift octaves somewhere in the middle.  Then I have 
> to search for the shift and correct it.

That was the straw that broke my camel’s back so many years ago. I find it 
particularly bad if you try to compose or arrange directly in Lilypond (as 
opposed to simply transcribing or engraving-from-written-MS): write the first 
section, write the third section, then write the second section and the third 
section “becomes wrong”; fix that; try to cut-and-paste a chunk from Section 2 
into Section 3, and both the new section *and* the rest of the piece “become 
wrong”; fix that; etc. When this plays out at higher resolution, I find it 
endlessly maddening (and flow-killing).

Perhaps if list-ers had come to my rescue back then in the (wonderful!) way 
they do for newbies now, I wouldn’t have thrown \relative out entirely, and my 
view of \relative might now be more generous… Or perhaps incremental 
improvements have been made to all the related functionality (\transpose, 
\relative, quote and cue stuff, etc.) so that it’s objectively less frustrating 
for people (like me) who regularly work with massive scores (50 staves x 100s 
of measures, transposing instruments including many multi-instrumentalists, 
etc.) and reuse lots of material (parts and scores, multiple formats of output, 
cueing/quoting as well as cutting-and-pasting, etc.). Whatever the reason is, 
it seems like every time I’m working in \relative mode (usually when trying to 
help someone on the list), something comes up which reminds me why I use 
\absolute.

I’m glad that many people like \relative, and I continue to hope that nobody 
falls into the same frustrating \relative pit(s) that I did.

And thus ends my last-ever evangelistic post or response on this topic.  =)

Cheers,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info




Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-17 Thread Paul Scott



On 3/17/21 1:45 PM, antlists wrote:

On 17/03/2021 08:23, Michael Gerdau wrote:
I don't have any of the show stopper Kieren is so evangelistic about 
and very clearly find \relative easier to enter via a normal keyboard 
by a long shot. Entering all those "'" (requires SHIFT on a german 
keyboard) and "," is not at all fluent.


Well, I'm a "hunt-n-peck" one-fingered pianist, so I guess I'd find 
using a midi keyboard MUCH harder than a computer one (as a guitarist, 
I found that was great for improving my typing skills :-)
Having read Kieren's method of using midi to enter the pitches and later 
adding the durations I may let the idea of a midi keyboard go.


imho the near universality of keyboard competence defines Western 
Music as "can be played on a piano" and has severely damaged our 
understanding of what music actually is. Musicians like me who can't 
play piano are very rare ...


And why would a copyist be able to play keyboard?

Or not.  There's no reason for them to be mutually exclusive.


I also find reading \relative much easier but that my be depending on 
what you're used to.



likewise

I seldom use transpose and I know of no case where I have nested 
transpose. With unnested transpose I have not yet had a problem. And 
frescobaldi does very easily transform from \relative to \absolute, 
should I ever need it.


Well, as a trombonist who plays in both brass and concert bands (and 
used to play in an orchestra), I use transpose all the time, and never 
had any trouble.


Therefor my conclusion is:
Kieren surely has good reason to prefer \absolute, but deriving that 
\relative is inferior and should be avoided is overdoing it IMO.


Agreed. Okay, my instrument wouldn't use much by way of octave modifiers,

Bass clef instruments is where I just started switching to \absolute.

but I'd hate to be writing a piccolo trumpet part ...


\fixed should make extremely high or low parts much easier.

I think remembering \fixed and the challenges of editing mistakes in 
\relative is convincing me to switch to absolute. Probably the biggest 
problem I encounter with \relative is when I enter some music and then 
extract a section of it into a variable for use somewhere else and 
having the original shift octaves somewhere in the middle.  Then I have 
to search for the shift and correct it.


Stay safe and well,

Paul





Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-17 Thread Knute Snortum
On Tue, Mar 16, 2021 at 5:39 PM Mogens Lemvig Hansen  wrote:
>
> I would like to forward another argument for the use of \relative.
>
> I have used Lilypond for several years, but I am certainly not a professional 
> musician or music typesetter.  The music I set is not overly complicated - 
> usually up to five of six (vocal) voices on up to maybe six pages.  I seem 
> unable to remember which octave is c' through c''.  Memorizing this is likely 
> simpler than memorizing that the derivative of arctan(x) is 1/(1+x²), but 
> while the latter to me is rock solid, the former is a fleeting breath.  
> Therefore I always end up taking a wild guess for the first note of my 
> \relative; once that note has been corrected, the rest is mostly right.  
> Using \absolute would, for me, be a nightmare of wrong octaves.

I use the attached PDF to help me remember absolute pitches in
LIlyPond.  I've attached it (and the source file that produced it) in
case it helps you.

--
Knute Snortum


note-chart.pdf
Description: Adobe PDF document
\version "2.22.0"

{ 
  c4_"C" g_"G" c'_"C'" g'_"G'" |
  c''4^"C''" g''^"G''" c'''^"C'''" g'''^"G'''" |
  \clef bass
  c,,4_"C,," g,,_"G,," c,_"C," g,_"G," |
  c4_"C" g^"G" c'^"C'" g'^"G'" |
}

Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-17 Thread antlists

On 17/03/2021 08:23, Michael Gerdau wrote:

I don't have any of the show stopper Kieren is so evangelistic about and very clearly find 
\relative easier to enter via a normal keyboard by a long shot. Entering all those "'" 
(requires SHIFT on a german keyboard) and "," is not at all fluent.


Well, I'm a "hunt-n-peck" one-fingered pianist, so I guess I'd find 
using a midi keyboard MUCH harder than a computer one (as a guitarist, I 
found that was great for improving my typing skills :-)


imho the near universality of keyboard competence defines Western Music 
as "can be played on a piano" and has severely damaged our understanding 
of what music actually is. Musicians like me who can't play piano are 
very rare ...


And why would a copyist be able to play keyboard?


I also find reading \relative much easier but that my be depending on what 
you're used to.


likewise


I seldom use transpose and I know of no case where I have nested transpose. 
With unnested transpose I have not yet had a problem. And frescobaldi does very 
easily transform from \relative to \absolute, should I ever need it.


Well, as a trombonist who plays in both brass and concert bands (and 
used to play in an orchestra), I use transpose all the time, and never 
had any trouble.


Therefor my conclusion is:
Kieren surely has good reason to prefer \absolute, but deriving that \relative 
is inferior and should be avoided is overdoing it IMO.


Agreed. Okay, my instrument wouldn't use much by way of octave 
modifiers, but I'd hate to be writing a piccolo trumpet part ...


Cheers,
Wol



Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-17 Thread David Kastrup
Paul Scott  writes:

> On 3/16/21 3:58 PM, David Kastrup wrote:
>> Paul Scott  writes:
>>
>> I am a copyist, not a composer.  I currently don’t have a MIDI
>> keyboard. I enter everything through Emacs without a mouse for pitch,
>> therefore haven’t considered tools like Frescobaldi so far.
>> I have been using \relative for many years and am aware of the problems.
>>
>> Because of this discussion I have just started using \absolute for
>> bass clef parts and I just noticed \fixed which I will start
>> experimenting with.  Any other suggestions for my situation as
>> described above?
>>
>> I will consider getting a small MIDI keyboard which would probably
>> lead to experimenting with Frescobaldi.
>> Ah, but Emacs' MIDI input mode deals better with chorded notes.
>
>
> Any suggestions for small inexpensive MIDI keyboards?

Huh.  I have some basic keyboard here (61 keys?) that I essentially
never used.  If you are looking to use it for note entry (rather than
any direct music-making), the advice is to confine yourself to a number
of keys you are likely to tolerate sitting on the table along with the
computer and dealing with using one hand.

When I do note entry with MIDI these days, I tend to put my FR-1b on the
table and just use the keyboard (right-hand) section.  The Roland FR-1b
is a 3-octave chromatic button accordion, so the keyboard section is
actually considerably smaller than a 3-octave piano keyboard would be.

-- 
David Kastrup



Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-17 Thread Michael Gerdau
> > 3. The *single* serious argument against absolute music — that it requires 
> > extra typing [of apostrophes and commas] — is essentially eliminated by 
> > using an IDE like Frescobaldi: using MIDI input means I avoid typing note 
> > code (including octavation symbols) almost entirely, and the transposition 
> > functions let me instantaneously re-octavate large sections of code if 
> > that’s ever required (which it basically never is). I believe we should be 
> > encouraging users to use tools like Frescobaldi — because I believe their 
> > coding lives would be made easier in *so* many ways — and the “crutch” of 
> > \relative means there’s less incentive to do so in the early stages of the 
> > learning curve (which is exactly when habits, good or bad, tend to be 
> > formed).
> 
> Using variables for pieces longer than two bars is probably more
> crucial than teaching beginners the intricacies of using \transpose
> inline.
> 
> I’ve been using MIDI for years and still use \relative. I mostly work
> with vocal music and find it easier to read, and to me, propagating an
> octave error to the end of the piece is a feature rather than a bug.
> Frescobaldi happily processes \relative music as easily as it does
> \absolute music.
> 
> If I sent a score to Kieran, the first thing he would spend 20 seconds
> converting it to \absolute in Frescobaldi :-)

I'd like to add my +1 to this.

I don't have any of the show stopper Kieren is so evangelistic about and very 
clearly find \relative easier to enter via a normal keyboard by a long shot. 
Entering all those "'" (requires SHIFT on a german keyboard) and "," is not at 
all fluent.

I also find reading \relative much easier but that my be depending on what 
you're used to.

I seldom use transpose and I know of no case where I have nested transpose. 
With unnested transpose I have not yet had a problem. And frescobaldi does very 
easily transform from \relative to \absolute, should I ever need it.

Therefor my conclusion is:
Kieren surely has good reason to prefer \absolute, but deriving that \relative 
is inferior and should be avoided is overdoing it IMO.

Kind regards,
Michael

PS: When I get a LP file with all \absolute, the first thing I do is spend 20 
seconds to convert it all to \relative in frscobaldi :D
-- 
Michael Gerdau email: m...@qata.de
GPG-keys available on request or at public keyserver



Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-16 Thread Vaughan McAlley
On Sun, 14 Mar 2021 at 23:54, Kieren MacMillan
 wrote:
> 3. The *single* serious argument against absolute music — that it requires 
> extra typing [of apostrophes and commas] — is essentially eliminated by using 
> an IDE like Frescobaldi: using MIDI input means I avoid typing note code 
> (including octavation symbols) almost entirely, and the transposition 
> functions let me instantaneously re-octavate large sections of code if that’s 
> ever required (which it basically never is). I believe we should be 
> encouraging users to use tools like Frescobaldi — because I believe their 
> coding lives would be made easier in *so* many ways — and the “crutch” of 
> \relative means there’s less incentive to do so in the early stages of the 
> learning curve (which is exactly when habits, good or bad, tend to be formed).

Using variables for pieces longer than two bars is probably more
crucial than teaching beginners the intricacies of using \transpose
inline.

I’ve been using MIDI for years and still use \relative. I mostly work
with vocal music and find it easier to read, and to me, propagating an
octave error to the end of the piece is a feature rather than a bug.
Frescobaldi happily processes \relative music as easily as it does
\absolute music.

If I sent a score to Kieran, the first thing he would spend 20 seconds
converting it to \absolute in Frescobaldi :-)

Vaughan



Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-16 Thread Karlin High
On Tue, Mar 16, 2021 at 7:36 PM Paul Scott  wrote:

> Any suggestions for small inexpensive MIDI keyboards?
>

I have an M-AUDIO Keystation 49e. Current version:



Also available in 61-key and 88-key versions, entire product family here:



Note it's strictly a midi input device. It cannot make any sound whatsoever
by itself.

When I was using it most, I had a free version of the Bome Midi Translator
software...



...to map unused MIDI-keys to text-keystrokes, and SpeedyMIDI for recording
the input:



Then I used midi2ly on the results.
-- 
Karlin High
Missouri, USA


RE: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-16 Thread Mogens Lemvig Hansen
I would like to forward another argument for the use of \relative.
I have used Lilypond for several years, but I am certainly not a professional 
musician or music typesetter.  The music I set is not overly complicated - 
usually up to five of six (vocal) voices on up to maybe six pages.  I seem 
unable to remember which octave is c' through c''.  Memorizing this is likely 
simpler than memorizing that the derivative of arctan(x) is 1/(1+x²), but while 
the latter to me is rock solid, the former is a fleeting breath.  Therefore I 
always end up taking a wild guess for the first note of my \relative; once that 
note has been corrected, the rest is mostly right.  Using \absolute would, for 
me, be a nightmare of wrong octaves.

Regards,
Mogens

From: Paul Scott
Sent: March 16, 2021 15:56
To: Kieren MacMillan
Cc: David Kastrup; lilypond-user@gnu.org
Subject: Re: why Kieren is a \relative evangelist [was “Re: Nested 
transposition"]



> 3. The *single* serious argument against absolute music — that it requires 
> extra typing [of apostrophes and commas] — is essentially eliminated by using 
> an IDE like Frescobaldi: using MIDI input means I avoid typing note code 
> (including octavation symbols) almost entirely, and the transposition 
> functions let me instantaneously re-octavate large sections of code if that’s 
> ever required (which it basically never is). I believe we should be 
> encouraging users to use tools like Frescobaldi — because I believe their 
> coding lives would be made easier in *so* many ways — and the “crutch” of 
> \relative means there’s less incentive to do so in the early stages of the 
> learning curve (which is exactly when habits, good or bad, tend to be formed).

I am a copyist, not a composer.  I currently don’t have a MIDI keyboard. I 
enter everything through Emacs without a mouse for pitch, therefore haven’t 
considered tools like Frescobaldi so far.
I have been using \relative for many years and am aware of the problems.

Because of this discussion I have just started using \absolute for bass clef 
parts and I just noticed \fixed which I will start experimenting with.  Any 
other suggestions for my situation as described above?  

I will consider getting a small MIDI keyboard which would probably lead to 
experimenting with Frescobaldi.

Thanks for any other thoughts.

> 
> Making other people’s (especially newbies’) lives easier *is* ultimately what 
> I’m trying to do.

Agreed! 

Paul






Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-16 Thread Paul Scott



On 3/16/21 3:58 PM, David Kastrup wrote:

Paul Scott  writes:

I am a copyist, not a composer.  I currently don’t have a MIDI
keyboard. I enter everything through Emacs without a mouse for pitch,
therefore haven’t considered tools like Frescobaldi so far.
I have been using \relative for many years and am aware of the problems.

Because of this discussion I have just started using \absolute for
bass clef parts and I just noticed \fixed which I will start
experimenting with.  Any other suggestions for my situation as
described above?

I will consider getting a small MIDI keyboard which would probably
lead to experimenting with Frescobaldi.
Ah, but Emacs' MIDI input mode deals better with chorded notes.



Any suggestions for small inexpensive MIDI keyboards?

Paul








Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-16 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> but Emacs' MIDI input mode deals better with chorded notes.
>
> It does?
> I find Frescobaldi’s “chord mode” works wonderfully.
> How does Emacs handle chorded notes, and what makes it better?

It doesn't confuse legato with chords.  Last time I checked Frescobaldi,
it was pretty awful with legato in chord mode.

Of course it is also convenient for me as an accordion player that I can
record one rendition in a keyboard macro and then replay it several
times, with Emacs listening to different MIDI channels each time.

-- 
David Kastrup



Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-16 Thread Kieren MacMillan
Hi David,

> but Emacs' MIDI input mode deals better with chorded notes.

It does?
I find Frescobaldi’s “chord mode” works wonderfully.
How does Emacs handle chorded notes, and what makes it better?

Thanks,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info




Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-16 Thread David Kastrup
Paul Scott  writes:

>> 3. The *single* serious argument against absolute music — that it
>> requires extra typing [of apostrophes and commas] — is essentially
>> eliminated by using an IDE like Frescobaldi: using MIDI input means
>> I avoid typing note code (including octavation symbols) almost
>> entirely, and the transposition functions let me instantaneously
>> re-octavate large sections of code if that’s ever required (which it
>> basically never is). I believe we should be encouraging users to use
>> tools like Frescobaldi — because I believe their coding lives would
>> be made easier in *so* many ways — and the “crutch” of \relative
>> means there’s less incentive to do so in the early stages of the
>> learning curve (which is exactly when habits, good or bad, tend to
>> be formed).
>
> I am a copyist, not a composer.  I currently don’t have a MIDI
> keyboard. I enter everything through Emacs without a mouse for pitch,
> therefore haven’t considered tools like Frescobaldi so far.
> I have been using \relative for many years and am aware of the problems.
>
> Because of this discussion I have just started using \absolute for
> bass clef parts and I just noticed \fixed which I will start
> experimenting with.  Any other suggestions for my situation as
> described above?
>
> I will consider getting a small MIDI keyboard which would probably
> lead to experimenting with Frescobaldi.

Ah, but Emacs' MIDI input mode deals better with chorded notes.

-- 
David Kastrup



Re: why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-16 Thread Paul Scott



> 3. The *single* serious argument against absolute music — that it requires 
> extra typing [of apostrophes and commas] — is essentially eliminated by using 
> an IDE like Frescobaldi: using MIDI input means I avoid typing note code 
> (including octavation symbols) almost entirely, and the transposition 
> functions let me instantaneously re-octavate large sections of code if that’s 
> ever required (which it basically never is). I believe we should be 
> encouraging users to use tools like Frescobaldi — because I believe their 
> coding lives would be made easier in *so* many ways — and the “crutch” of 
> \relative means there’s less incentive to do so in the early stages of the 
> learning curve (which is exactly when habits, good or bad, tend to be formed).

I am a copyist, not a composer.  I currently don’t have a MIDI keyboard. I 
enter everything through Emacs without a mouse for pitch, therefore haven’t 
considered tools like Frescobaldi so far.
I have been using \relative for many years and am aware of the problems.

Because of this discussion I have just started using \absolute for bass clef 
parts and I just noticed \fixed which I will start experimenting with.  Any 
other suggestions for my situation as described above?  

I will consider getting a small MIDI keyboard which would probably lead to 
experimenting with Frescobaldi.

Thanks for any other thoughts.

> 
> Making other people’s (especially newbies’) lives easier *is* ultimately what 
> I’m trying to do.

Agreed! 

Paul





Re: MIDI input [was Re: Nested transposition]

2021-03-14 Thread Silvain Dupertuis

Hello everyone,

As I do not have any midi keyboard,
I have programmed for myself a web-piano-keyboard-entry (HTML-CSS-JavaScript).
I use regularly for Lilypond - it combined different syntax, does Lylipond in 
relative mode.
Actually, if was to be used for other systems also.

You can find the file there 
, download and open 
in any browser.
The comments are in French, but I can easily make an English version if it is useful for 
anyone.
You have to choose/confirm the type of syntax and the key and then click on notes and 
duration on the keyboard and duration symbols...


Of course, you get one voice only, but it is easier that writing the names of 
notes...

And again, I did not have any problem using \relative x y { ... } syntax...

Hope it can be useful.
Silvain


Le 14.03.21 à 16:53, Ralph Palmer a écrit :
On Sat, Mar 13, 2021 at 9:14 PM Kieren MacMillan > wrote:


Hi Carl!

>> My music entry is done 99% by MIDI input, so I type almost no commas or 
apostrophes.
> Can you tell me how you do your MIDI input?  I'd like to do that, but I 
don't have
a good workflow for it.

1. I use Frescobaldi.


Wow. I missed this somehow. I can see why you use absolute values exclusively, Kieren. 
I'm almost exclusively transcribing and transposing fiddle tunes. I do a lot of entry 
from sheet music, and do a lot of proofreading, then transposing. Not terribly 
complicated, but valuable to me. Relative entry works much better for me than absolute 
entry. I can input the tune in treble clef, proofread it, and transpose to alto clef 
with fewer than 10 keystrokes.


All the best,

Ralph

--
Ralph Palmer
Brattleboro, VT
USA
(he, him, his)
palmer.r.vio...@gmail.com 



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org 


Re: MIDI input [was Re: Nested transposition]

2021-03-14 Thread Ralph Palmer
On Sun, Mar 14, 2021 at 12:41 PM Kieren MacMillan <
kieren_macmil...@sympatico.ca> wrote:

> Hi Ralph,
>
> >> 1. I use Frescobaldi.
> >
> > Wow. I missed this somehow. I can see why you use absolute values
> exclusively, Kieren. I'm almost exclusively transcribing and transposing
> fiddle tunes. I do a lot of entry from sheet music, and do a lot of
> proofreading, then transposing. Not terribly complicated, but valuable to
> me. Relative entry works much better for me than absolute entry. I can
> input the tune in treble clef, proofread it, and transpose to alto clef
> with fewer than 10 keystrokes.
>
> Have you tried Frescobaldi and MIDI entry?
>

No, I'm afraid not. I never learned a keyboard instrument, and I don't
think I have the time at present to add that to my list. I really do
understand why absolute values would work very well with MIDI input.

All the best, and thanks for all you do to help others on this list, Kieren,

Ralph


-- 
Ralph Palmer
Brattleboro, VT
USA
(he, him, his)
palmer.r.vio...@gmail.com


Re: MIDI input [was Re: Nested transposition]

2021-03-14 Thread Kieren MacMillan
Hi Ralph,

>> 1. I use Frescobaldi.
> 
> Wow. I missed this somehow. I can see why you use absolute values 
> exclusively, Kieren. I'm almost exclusively transcribing and transposing 
> fiddle tunes. I do a lot of entry from sheet music, and do a lot of 
> proofreading, then transposing. Not terribly complicated, but valuable to me. 
> Relative entry works much better for me than absolute entry. I can input the 
> tune in treble clef, proofread it, and transpose to alto clef with fewer than 
> 10 keystrokes.

Have you tried Frescobaldi and MIDI entry? I do a lot of transcriptions and 
transpositions as well — usually for musical theatre pit musicians (e.g., 
multi-instrumental** wind players) — and I find it really easy to play the 
[absolute] part in from the original (usually transposed!) part, proofread, and 
then use Frescobaldi’s transposition tool to change the code to concert pitch 
for all work going forward.

I’m not here to tell you that you *need* to change your workflow — it sounds 
like you’ve got one that really works well for you, which is great! I just want 
to make sure that anyone reading this thread in the future knows that 
transcribing and transposing can also be done really easily in absolute mode.

Cheers,
Kieren.

** Lilypond still doesn’t really handle multi-instrumental parts very well, but 
that’s an issue for a whole separate thread.  ;)


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info




Re: MIDI input [was Re: Nested transposition]

2021-03-14 Thread Ralph Palmer
On Sat, Mar 13, 2021 at 9:14 PM Kieren MacMillan <
kieren_macmil...@sympatico.ca> wrote:

> Hi Carl!
>
> >> My music entry is done 99% by MIDI input, so I type almost no commas or
> apostrophes.
> > Can you tell me how you do your MIDI input?  I'd like to do that, but I
> don't have a good workflow for it.
>
> 1. I use Frescobaldi.
>

Wow. I missed this somehow. I can see why you use absolute values
exclusively, Kieren. I'm almost exclusively transcribing and transposing
fiddle tunes. I do a lot of entry from sheet music, and do a lot of
proofreading, then transposing. Not terribly complicated, but valuable to
me. Relative entry works much better for me than absolute entry. I can
input the tune in treble clef, proofread it, and transpose to alto clef
with fewer than 10 keystrokes.

All the best,

Ralph

-- 
Ralph Palmer
Brattleboro, VT
USA
(he, him, his)
palmer.r.vio...@gmail.com


why Kieren is a \relative evangelist [was “Re: Nested transposition"]

2021-03-14 Thread Kieren MacMillan
Hi Davids,

>> One might wonder why the subject of \relative, a textual input
>> method, should concern you so much.

1. I lament how much struggle I went through for the decade that I used 
\relative, and how much struggle I see other newbies go through — posting about 
it, over and over — because they are using it. I personally believe that 
struggle is totally unnecessary. It’s worth noting the relative [ha!] dearth of 
posts about absolute music giving anyone trouble when transposing, reusing 
code, etc.

2. The obstacles and confusion generated by the use of \relative compound 
quickly when one uses Lilypond for more complicated scores, or tries to reuse 
code (ostensibly to increase efficiency), etc. We are (I thought?) trying to 
make Lilypond *more* user-friendly, not *less*. It frustrates me when I see 
newbies being led up the already-not-easy early learning curve via the 
\relative path, because I know that most of those who get beyond simple scores 
will hit these \relative-only problems, and that will [unnecessarily!] make it 
seem like Lilypond is “even more complicated and fussy” than they first 
imagined.

3. The *single* serious argument against absolute music — that it requires 
extra typing [of apostrophes and commas] — is essentially eliminated by using 
an IDE like Frescobaldi: using MIDI input means I avoid typing note code 
(including octavation symbols) almost entirely, and the transposition functions 
let me instantaneously re-octavate large sections of code if that’s ever 
required (which it basically never is). I believe we should be encouraging 
users to use tools like Frescobaldi — because I believe their coding lives 
would be made easier in *so* many ways — and the “crutch” of \relative means 
there’s less incentive to do so in the early stages of the learning curve 
(which is exactly when habits, good or bad, tend to be formed).

Perhaps “back then”, if someone had clearly explained how to get around some of 
the bigger problems (e.g., by always making sure there’s a \relative inside 
\transpose), I might not have been driven to such a point of frustration by 
\relative that I found no alternative but to abandon it and become an \absolute 
evangelist…? That being said, the fact that it’s STILL clearly a problem YET 
ANOTHER decade later apparently justifies my choice.

> a majority of traffic on this list is generated by people doing
> their best to be helpful, making other people's lives easier.
> 
> Is there a reason you think that this isn't what Kieren is doing?

Making other people’s (especially newbies’) lives easier *is* ultimately what 
I’m trying to do.

Cheers,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info




Re: Nested transposition

2021-03-14 Thread David Kastrup
David Wright  writes:

> On Sat 13 Mar 2021 at 09:21:07 (-0500), Kieren MacMillan wrote:
>> Hi Elaine,
>> 
>> > That may be so, but you likely pay for it every day by typing out
>> extra commas and apostrophes.
>> 
>> My music entry is done 99% by MIDI input, so I type almost no commas
>> or apostrophes.
>> ;)
>
> I'm happy to see that you have optimised your chosen input method.
> One might wonder why the subject of \relative, a textual input
> method, should concern you so much.

Uh, a majority of traffic on this list is generated by people doing
their best to be helpful, making other people's lives easier.

Is there a reason you think that this isn't what Kieren is doing?

-- 
David Kastrup



Re: Nested transposition

2021-03-13 Thread David Wright
On Sat 13 Mar 2021 at 09:21:07 (-0500), Kieren MacMillan wrote:
> Hi Elaine,
> 
> > That may be so, but you likely pay for it every day by typing out extra 
> > commas and apostrophes.
> 
> My music entry is done 99% by MIDI input, so I type almost no commas or 
> apostrophes.
> ;)

I'm happy to see that you have optimised your chosen input method.
One might wonder why the subject of \relative, a textual input
method, should concern you so much.

Cheers,
David.



Re: Nested transposition

2021-03-13 Thread David Wright
On Sat 13 Mar 2021 at 11:18:52 (+0100), Lukas-Fabian Moser wrote:
> Am 13.03.21 um 02:16 schrieb Valentin Petzel:
> > As far as I know transpose should only really be used with absolute pitches,
> > as it would be quite impossible to do it otherwise. Think of it like this:
> > Say we are in relative mode and have c' f. Then f will be above c. If you 
> > then
> > do c' \transpose f a f, then the transposed a would be above the c – so it
> > would need an octave indication. But the octave the music has to be put into
> > depends of the previous note. So a single transpose function cannot provide
> > this.
> While that is true, I think your next two remarks are overgeneralisations:
> > So, always use absolute pitch with transpose!
> 
> \transpose and \relative live happily together as long as \transpose
> is _outside_, so it's fine to use
> 
> \transpose c d \relative e' { ... }.
> 
> In particular, it's no problem to \transpose a complete score, no
> matter what combination of absolute and relative note entry is used in
> the score.
> 
> So, I propose to rephrase your rule to:
> 
> - "Avoid using \transpose inside of \relative" ("and if you have to,
> remember to issue a new \relative block inside the \transpose").

The problem with inventing arbitrary rules is that they don't
necessarily teach the real reason behind them.

It's perfectly correct to say that what is given to transpose,
its "argument", ie the … … … in   \transpose X Y { … … …  },
has to be absolute.

It doesn't matter whether … … … is any or all of:

.  a sequence of absolute pitches (ie deliberately written that way),

.  \relative [P] { some music in relative pitch notation }

.  \fixed Z { some music in fixed octave pitch notation }

and that is because each of these constructions yields an expression
with absolute pitches.

But we were being pedantic, apparently, so I would point out one thing.
Although you might write   music = { a c' e' a' }   and say
that the expression is absolute music, it *is*, but only if
you avoid placing \music in inappropriate positions in the score.

If you want to exercise an abundance of caution, as we say today,
you should really write   music = \absolute { a c' e' a' }
so that you can place \music anywhere.

> And of course there's
> 
> - MacMillan's strengthening: "Avoid using \relative altogether" :-).
> (I don't agree but understand his rationale; I think it's a matter of
> weighing up the pros and cons.)
> 
> In my experience, there are few use cases for transposition inside
> \relative except for precisely the case situation the OP described:

Even here, there is no reason not to close the \relative
section so that the \transpose command is not inside it.
There is no trailing material (shown by ••• •••
in https://lists.gnu.org/archive/html/lilypond-user/2021-03/msg00118.html)
which might conceivably depend on not closing the section. Thus:

Elaine's final:

\transpose c a, {
  \relative {
c'4 d e f g a b c
\transpose as bf \relative {
  cs'4 ds es fs gs as bs cs
}
  } ← remove from here
}

restructured:

\transpose c a, {
  \relative {
c'4 d e f g a b c
  } ← to here
  \transpose as bf \relative {
cs'4 ds es fs gs as bs cs
  }
}

> Enharmonic respelling of a complete passage, most often needed in
> situations where a whole-score \transpose creates awkward key
> signatures for some sections of the score. This happens quite often
> when engraving Kunstlieder, for example, because with them it's common
> to issue the same piece in various transposed versions. I did an
> edition of Norbert Burgmüller's "Wie der Tag mir schleichet" last
> year,
> https://imslp.org/wiki/5_Lieder%2C_Op.12_(Burgm%C3%BCller%2C_Norbert)
> last year, and I remember having to wrestle quite a lot with
> enharmonic respellings for that one...

Cheers,
David.



MIDI input [was Re: Nested transposition]

2021-03-13 Thread Kieren MacMillan
Hi Carl!

>> My music entry is done 99% by MIDI input, so I type almost no commas or 
>> apostrophes.
> Can you tell me how you do your MIDI input?  I'd like to do that, but I don't 
> have a good workflow for it.

1. I use Frescobaldi.

2. I’ve set keyboard shortcuts (F18 and F19) for starting and stopping MIDI 
capture.

3. Because of the way my code is structured — variables for each voice, every 
measure on a new line, duration repetitions used wherever possible, etc. — I 
try to play out as many measures as possible in a single capture/“performance” 
(often dozens or even hundreds of measures!), playing each note which is 
new/distinct or begins a measure. Then I start at the top of the capture stream 
and insert durations and line breaks.

It’s an astonishingly fast workflow, actually — whereas before I started using 
MIDI input I estimate my input speed was less than ½ that of my top Finale 
input speed (ca. 2001, when I finally threw that app in the dustbin), now I 
think I probably exceed the very fastest I could ever get notes into Finale.

Hope that helps! If you have any more questions, let me know.

Cheers,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info




Re: Nested transposition

2021-03-13 Thread Carl Sorensen


On 3/13/21, 7:21 AM, "lilypond-user on behalf of Kieren MacMillan" 
 wrote:

My music entry is done 99% by MIDI input, so I type almost no commas or 
apostrophes.
;)

Can you tell me how you do your MIDI input?  I'd like to do that, but I don't 
have a good workflow for it.

Thanks,

Carl
 



Re: Nested transposition

2021-03-13 Thread Peter Toye
My experience is exactly the opposite. I use the computer keyboard for input, 
and as most of the music is for piano, which spans several octaves outside the 
staves, absolute entry is a serious PITA. For vocal music, there aren't usually 
many wide skips, so again relative notation uses fewer keystrokes.

I'm sorry that this request has degenerated into a theological dispute as to 
the relative merits of \relative and \absolute. Both of them support different 
ways of working, and it's a question of which suits whom.

Best regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

> Message: 5
> Date: Sat, 13 Mar 2021 09:21:07 -0500
> From: Kieren MacMillan 
> To: Flaming Hakama by Elaine 
> Cc: Lilypond-User Mailing List 
> Subject: Re: Nested transposition
> Message-ID: 
> Content-Type: text/plain;   charset=utf-8

> Hi Elaine,

>> That may be so, but you likely pay for it every day by typing out extra 
>> commas and apostrophes.

> My music entry is done 99% by MIDI input, so I type almost no commas or 
> apostrophes.
> ;)

> Cheers,
> Kieren.
> 

> Kieren MacMillan, composer (he/him/his)
> ‣ website: www.kierenmacmillan.info
> ‣ email: kie...@kierenmacmillan.info




> --

Re: Nested transposition

2021-03-13 Thread Kieren MacMillan
Hi Elaine,

> That may be so, but you likely pay for it every day by typing out extra 
> commas and apostrophes.

My music entry is done 99% by MIDI input, so I type almost no commas or 
apostrophes.
;)

Cheers,
Kieren.


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info




Re: Nested transposition

2021-03-13 Thread ebenezer
I don't have the expertise of the rest of you, but the first thing I did 
with Lilypond was give \relative the elbow. It just seemed like a 
nightmare way to compose. Ditto duration persistence. All for the sake 
of saving a few keystrokes?


Re: the manuals/guides where \relative is introduced as the way to 
compose using LP. Presumably, this has come about because most LPers 
find this easier, but I for one would have loved an "LP Guide for 
Non-relativists". And a guide with all the context in place, too!


That said, LP is an amazing piece of s/w and the community second to 
none. Without the help of this list I would have struggled to have my 
scores as easy to manage as they are today. Thank you!


On 2021-03-13 02:22, Kieren MacMillan wrote:

oof
this thread reminds me why I gave up using \relative over a decade ago and 
never looked back

Kieren


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info







Re: Nested transposition

2021-03-13 Thread Valentin Petzel
I'm sorry, I worded that badly. I did not mean the note C#, but the scale or 
harmonic concept of C# major, that is, C#, D#, E#, F#, G#, A#, B#. While C# can 
be reached in C major, it usually belongs harmonically to A major or A dom 
major, which is quite close to C major.
But Db major is quite common, as you said, it is the base of the neapolitan 6th 
chord.

And yes, it is very well possible to get to C# major from a C major context, 
but it is usually not very common. Usually you need a good reason, and my point 
is that this particular problem is caused by the uncommon choice of C# over Db.

Anyway. Even if you have relative inside of transpose, I've found that it seems 
to cause problems with having multiple voices. And then, relative music is very 
instable anyway, so I suggest using Frescobaldi's conversion feature to write 
in relative, but to make is absolute when you are done.

Cheers,
Valentin

13.03.2021 11:18:56 Lukas-Fabian Moser :

> Am 13.03.21 um 02:16 schrieb Valentin Petzel:
>> As far as I know transpose should only really be used with absolute pitches,
>> as it would be quite impossible to do it otherwise. Think of it like this:
>> Say we are in relative mode and have c' f. Then f will be above c. If you 
>> then
>> do c' \transpose f a f, then the transposed a would be above the c – so it
>> would need an octave indication. But the octave the music has to be put into
>> depends of the previous note. So a single transpose function cannot provide
>> this.
> While that is true, I think your next two remarks are overgeneralisations:
>> So, always use absolute pitch with transpose!
> 
> \transpose and \relative live happily together as long as \transpose is 
> _outside_, so it's fine to use
> 
> \transpose c d \relative e' { ... }.
> 
> In particular, it's no problem to \transpose a complete score, no matter what 
> combination of absolute and relative note entry is used in the score.
> 
> So, I propose to rephrase your rule to:
> 
> - "Avoid using \transpose inside of \relative" ("and if you have to, remember 
> to issue a new \relative block inside the \transpose").
> 
> And of course there's
> 
> - MacMillan's strengthening: "Avoid using \relative altogether" :-). (I don't 
> agree but understand his rationale; I think it's a matter of weighing up the 
> pros and cons.)
> 
> In my experience, there are few use cases for transposition inside \relative 
> except for precisely the case situation the OP described: Enharmonic 
> respelling of a complete passage, most often needed in situations where a 
> whole-score \transpose creates awkward key signatures for some sections of 
> the score. This happens quite often when engraving Kunstlieder, for example, 
> because with them it's common to issue the same piece in various transposed 
> versions. I did an edition of Norbert Burgmüller's "Wie der Tag mir 
> schleichet" last year, 
> https://imslp.org/wiki/5_Lieder%2C_Op.12_(Burgm%C3%BCller%2C_Norbert) last 
> year, and I remember having to wrestle quite a lot with enharmonic 
> respellings for that one...
> 
>> And by the way: Lilypond transposes you example correctly. Your main problem
>> is that usually there should not be a C# in C tonality. Usually it is easier
>> to go from C to Db, which is a minor 2nd instead of an augmented prime.
> 
> I disagree that C# is an improbable note in C tonality.
> 
> In classical ("Mozartian") harmony, a C# arises in all situations where a 
> secondary dominant to ii is used, which occurs as soon as you write a 
> step-wise sequence from I to ii (or the other way around). For example, the 
> ubiquitous "fonte" model 
> (http://openmusictheory.com/schemataContinuationPatterns) automatically 
> creates a C# when used in c major.
> 
> But since of course also a Db may arise easily in a C tonality (the most 
> obvious example being as a Neapolitan Sixth), I'd argue that C#/Db is not a 
> good example of an unconditional enharmonic spelling preference in C 
> tonality. But such examples do exist of course: There are enharmonic 
> spellings that seem improbable in C tonality at least before late 19th 
> century music. My candidates would be Fb, Cb, Gb and A#, E#, B# (as well as 
> all pitches using double accidentals), whereas for all pitches occuring 
> between those in circle-of-fifths ordering, to wit
> 
> Db, Ab, Eb, Bb, {C major scale}, F#, C#, G#, D#,
> 
> it's quite easy to construct very natural occurrences in standard c major/c 
> minor tonality. And in chromatic neighbouring note situations I even wouldn't 
> be terribly surprised to find Gb or A# in a C-tonal context.
> 
> Lukas



Re: Nested transposition

2021-03-13 Thread Silvain Dupertuis

I have nearly always used relative pitches.
I always use variables to build up the music in a logical way.
Transpose always worked right for me.

As for enharmonic transposition, it does work well
Here is an example :

 m = \relative c' { \key des \major des4 es f as des2. r4}

 \score {

   {

   \m

   \transpose des cis \m

   }

 }

There might be a way to write a function which would transpose in way so that
when transposing music with different keys,
if a part happens to have more than 6 or 7 flats or sharps
it will apply enharmonic transposition...

Le 13.03.21 à 02:16, Valentin Petzel a écrit :

As far as I know transpose should only really be used with absolute pitches,
as it would be quite impossible to do it otherwise. Think of it like this:
Say we are in relative mode and have c' f. Then f will be above c. If you then
do c' \transpose f a f, then the transposed a would be above the c – so it
would need an octave indication. But the octave the music has to be put into
depends of the previous note. So a single transpose function cannot provide
this.

So, always use absolute pitch with transpose!

And by the way: Lilypond transposes you example correctly. Your main problem
is that usually there should not be a C# in C tonality. Usually it is easier
to go from C to Db, which is a minor 2nd instead of an augmented prime.

Cheers,
Valentin



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Nested transposition

2021-03-13 Thread Lukas-Fabian Moser

Am 13.03.21 um 02:16 schrieb Valentin Petzel:

As far as I know transpose should only really be used with absolute pitches,
as it would be quite impossible to do it otherwise. Think of it like this:
Say we are in relative mode and have c' f. Then f will be above c. If you then
do c' \transpose f a f, then the transposed a would be above the c – so it
would need an octave indication. But the octave the music has to be put into
depends of the previous note. So a single transpose function cannot provide
this.

While that is true, I think your next two remarks are overgeneralisations:

So, always use absolute pitch with transpose!


\transpose and \relative live happily together as long as \transpose is 
_outside_, so it's fine to use


\transpose c d \relative e' { ... }.

In particular, it's no problem to \transpose a complete score, no matter 
what combination of absolute and relative note entry is used in the score.


So, I propose to rephrase your rule to:

- "Avoid using \transpose inside of \relative" ("and if you have to, 
remember to issue a new \relative block inside the \transpose").


And of course there's

- MacMillan's strengthening: "Avoid using \relative altogether" :-). (I 
don't agree but understand his rationale; I think it's a matter of 
weighing up the pros and cons.)


In my experience, there are few use cases for transposition inside 
\relative except for precisely the case situation the OP described: 
Enharmonic respelling of a complete passage, most often needed in 
situations where a whole-score \transpose creates awkward key signatures 
for some sections of the score. This happens quite often when engraving 
Kunstlieder, for example, because with them it's common to issue the 
same piece in various transposed versions. I did an edition of Norbert 
Burgmüller's "Wie der Tag mir schleichet" last year, 
https://imslp.org/wiki/5_Lieder%2C_Op.12_(Burgm%C3%BCller%2C_Norbert) 
last year, and I remember having to wrestle quite a lot with enharmonic 
respellings for that one...



And by the way: Lilypond transposes you example correctly. Your main problem
is that usually there should not be a C# in C tonality. Usually it is easier
to go from C to Db, which is a minor 2nd instead of an augmented prime.


I disagree that C# is an improbable note in C tonality.

In classical ("Mozartian") harmony, a C# arises in all situations where 
a secondary dominant to ii is used, which occurs as soon as you write a 
step-wise sequence from I to ii (or the other way around). For example, 
the ubiquitous "fonte" model 
(http://openmusictheory.com/schemataContinuationPatterns) automatically 
creates a C# when used in c major.


But since of course also a Db may arise easily in a C tonality (the most 
obvious example being as a Neapolitan Sixth), I'd argue that C#/Db is 
not a good example of an unconditional enharmonic spelling preference in 
C tonality. But such examples do exist of course: There are enharmonic 
spellings that seem improbable in C tonality at least before late 19th 
century music. My candidates would be Fb, Cb, Gb and A#, E#, B# (as well 
as all pitches using double accidentals), whereas for all pitches 
occuring between those in circle-of-fifths ordering, to wit


Db, Ab, Eb, Bb, {C major scale}, F#, C#, G#, D#,

it's quite easy to construct very natural occurrences in standard c 
major/c minor tonality. And in chromatic neighbouring note situations I 
even wouldn't be terribly surprised to find Gb or A# in a C-tonal context.


Lukas




Re: Nested transposition

2021-03-12 Thread David Wright
On Fri 12 Mar 2021 at 16:30:07 (-0800), Flaming Hakama by Elaine wrote:
> It seems we can't be too pedantic here.
> 
> Based on the OP's situation,
> one can imaging that the original piece might have looked like:
> 
> \relative {
> c'4 d e f g a b c
> cs, ds es fs gs as bs cs
> }
> 
> Then the attempt to transpose down a 3rd:
> 
> \transpose c a, {
> \relative {
> c'4 d e f g a b c
> cs, ds es fs gs as bs cs
> }
> }
> 
> 
> Then--and here is the crucial part--they decided to break up the original
> \relative into two expressions, so they could transpose one of them
> enharmonically.
> 
> Before applying the enharmonic transposition,
> here is what the new structure would look like:
> 
> \relative {
> c'4 d e f g a b c
> { cs, ds es fs gs as bs cs }
> }
> 
> Note that the inner { } is treated as a continuation of the first relative
> expression.  This can be seen in two ways:  the first { cs, } is in the
> octave of middle C and not two octaves below, which is what \fixed { cs, }
> would be.  Likewise, the ds is a step above cs, not a 7th below.

(\absolute, presumably, not \fixed.)

> However, this is lazy, since it is not explicitly saying the inner { } is
> relative, it is relying on the fact that it is nested in a relative
> expression.
> 
> So, you run into problems when you add the \transpose before it, or do any
> number of other things with it, like cut & paste into other expressions, or
> call other functions with it as an argument.
> 
> The \transpose function now views the { } expression as fixed, and it is no
> longer relative to the context of the containing \relative { }
> 
> 
> The non-lazy approach would be to supply the \relative when breaking up
> this expression.
> 
> We can debate about whether using the default \relative { } versus
> \relative c { } is better, but that is besides the point.
> 
> The main point is that you need to start a new \relative expression, and
> when you do so, you need to specify the octave of the first note again,
> since it is no longer relative to the previous note.
> 
> So, for breaking up the first expression into two, you would want either of
> these:
> 
> \relative {
> c'4 d e f g a b c
> \relative { cs'4 ds es fs gs as bs cs }
> }
> 
> \relative c' {
> c4 d e f g a b c
> \relative c' { cs4 ds es fs gs as bs cs }
> }

It's a fascinating narrative, full of excuses/reasons for how the OP
got to what they posted, but to say that I would want to write, a priori,
either of the snippets above is — unlikely, IMHO. (ameliorated.)
It's certainly not, as you said: "best practice".

As for { … } being a "lazy" construction, it's quite usual to group
relative notes in braces for various reasons without the necessity to
relative-ise each group separately. For example, repeats,
alternatives, tuplets, etc.

The point is that you know what's coming, transpose, …

> That is all that is needed, to be able to add \tranpsose and have it work
> properly.  The transposition works as intended, once you make sure the
> notes you are transposing are defined correctly.

… and it's only the \transpose which means you have to write the notes
in that manner for them to be "defined correctly".

> \transpose c a, {
> \relative {
> c'4 d e f g a b c
> \transpose as bf \relative { cs'4 ds es fs gs as bs cs }
> }
> }

That's a very roundabout way of stating that music inside \transpose { }
is interpreted as absolute. It's only on page 4 of NR, not buried away
somewhere. The mistake was that the OP either forgot or did not know this,
not laziness in "breaking up an expression".

> The core issue here is that a relative expression was broken up lazily.
> Then when used as the argument to \transpose, it was silently and
> inadvertently cast to a fixed expression.
> 
> The key takeaway is to be explicit when breaking up relative expressions.
> 
> I don't think there is anything wrong with \transpose.

Of course there isn't anything wrong with it. But if you want to use
relative input inside it, you just have to put it inside \relative { }.
There's even an example on page 4 showing this.

The only thing I would add to that example (either within it or extra)
is a reminder about the pitches of these trailing notes • :

\relative { … … … \transpose { = = = } ••• ••• }

which are interpreted as if:

\relative { … … …  ••• ••• }

On Fri 12 Mar 2021 at 21:22:01 (-0500), Kieren MacMillan wrote:
> oof
> this thread reminds me why I gave up using \relative over a decade ago and 
> never looked back

Just couldn't stop yourself.

Cheers,
David.



Re: Nested transposition

2021-03-12 Thread Flaming Hakama by Elaine
On Fri, Mar 12, 2021, 6:22 PM Kieren MacMillan <
kieren_macmil...@sympatico.ca> wrote:

> oof
> this thread reminds me why I gave up using \relative over a decade ago and
> never looked back
>
> Kieren


That may be so, but you likely pay for it every day by typing out extra
commas and apostrophes.

Once I adopted this simple practice of being explicit about \relative, I
have not encountered any problems in years.

Relative music entry is not broken, or difficult. It just requires a bare
minimum of coding etiquette.


Elaine


Re: Nested transposition

2021-03-12 Thread Kieren MacMillan
oof
this thread reminds me why I gave up using \relative over a decade ago and 
never looked back

Kieren


Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: kie...@kierenmacmillan.info




Re: Nested transposition

2021-03-12 Thread Valentin Petzel
As far as I know transpose should only really be used with absolute pitches, 
as it would be quite impossible to do it otherwise. Think of it like this:
Say we are in relative mode and have c' f. Then f will be above c. If you then 
do c' \transpose f a f, then the transposed a would be above the c – so it 
would need an octave indication. But the octave the music has to be put into 
depends of the previous note. So a single transpose function cannot provide 
this.

So, always use absolute pitch with transpose!

And by the way: Lilypond transposes you example correctly. Your main problem 
is that usually there should not be a C# in C tonality. Usually it is easier 
to go from C to Db, which is a minor 2nd instead of an augmented prime.

Cheers,
Valentin

signature.asc
Description: This is a digitally signed message part.


Re: Nested transposition

2021-03-12 Thread Flaming Hakama by Elaine
It seems we can't be too pedantic here.

Based on the OP's situation,
one can imaging that the original piece might have looked like:

\relative {
c'4 d e f g a b c
cs, ds es fs gs as bs cs
}

Then the attempt to transpose down a 3rd:

\transpose c a, {
\relative {
c'4 d e f g a b c
cs, ds es fs gs as bs cs
}
}


Then--and here is the crucial part--they decided to break up the original
\relative into two expressions, so they could transpose one of them
enharmonically.

Before applying the enharmonic transposition,
here is what the new structure would look like:

\relative {
c'4 d e f g a b c
{ cs, ds es fs gs as bs cs }
}

Note that the inner { } is treated as a continuation of the first relative
expression.  This can be seen in two ways:  the first { cs, } is in the
octave of middle C and not two octaves below, which is what \fixed { cs, }
would be.  Likewise, the ds is a step above cs, not a 7th below.

However, this is lazy, since it is not explicitly saying the inner { } is
relative, it is relying on the fact that it is nested in a relative
expression.

So, you run into problems when you add the \transpose before it, or do any
number of other things with it, like cut & paste into other expressions, or
call other functions with it as an argument.

The \transpose function now views the { } expression as fixed, and it is no
longer relative to the context of the containing \relative { }


The non-lazy approach would be to supply the \relative when breaking up
this expression.

We can debate about whether using the default \relative { } versus
\relative c { } is better, but that is besides the point.

The main point is that you need to start a new \relative expression, and
when you do so, you need to specify the octave of the first note again,
since it is no longer relative to the previous note.

So, for breaking up the first expression into two, you would want either of
these:

\relative {
c'4 d e f g a b c
\relative { cs'4 ds es fs gs as bs cs }
}

\relative c' {
c4 d e f g a b c
\relative c' { cs4 ds es fs gs as bs cs }
}


That is all that is needed, to be able to add \tranpsose and have it work
properly.  The transposition works as intended, once you make sure the
notes you are transposing are defined correctly.

\transpose c a, {
\relative {
c'4 d e f g a b c
\transpose as bf \relative { cs'4 ds es fs gs as bs cs }
}
}


The core issue here is that a relative expression was broken up lazily.
Then when used as the argument to \transpose, it was silently and
inadvertently cast to a fixed expression.

The key takeaway is to be explicit when breaking up relative expressions.

I don't think there is anything wrong with \transpose.


Elaine Alt
415 . 341 .4954   "*Confusion is
highly underrated*"
ela...@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


>


Re: Nested transposition

2021-03-12 Thread David Wright
On Fri 12 Mar 2021 at 11:08:34 (-0800), Flaming Hakama by Elaine wrote:
> > Am Fr., 12. März 2021 um 11:35 Uhr schrieb Peter Toye:
> >
> > I am trying to engrave a transposed song. It's written without key
> > signature but is very tonal. It starts in C and ends in C#. I want to
> > transpose it down a minor third. The part in C is fine, but the part in C#
> > ends up as A## and there are far too many double-sharps for it to be
> > performable.
> >
> > I found the 'minimal accidental' snippet but that looks as if it messes up
> > the tonality - a mixture of A sharp and B flat.
> >
> > I tried the code below, which get the note names right but the octaves go
> > completely wrong. Is this a bug? It would be a useful feature if it could
> > be corrected.
> >
> > \version "2.22.0"
> >
> > \language "english"
> >
> > {
> >   \transpose c a,
> >   \relative {
> > c'4 d e f g a b c
> > \transpose as bf
> > {cs, ds es fs gs as bs cs}
> >
> >   }
> > }
> 
> %{
> 
> The main issue here is that you are using \relative in a lax way.

IMHO in the wrong way.

> Which is to say, in your example,
> the overall expression uses relative,
> but you don't specify an octave.
> 
> This means you are using the default.
> Which may be fine, but it can help to be explicit,

It's completely explicit. The pitch of the first note
is interpreted as an absolute pitch.

> and this also gives you a way to fix octaves quickly.

I would agree that it's a method of reusing a sequence
of notes at different pitches, by using what I called
"floating pitches" in my earlier post. But with a literal
expression, like \relative { g e d c }, fixing the octave
is just as easily done by \relative { g' e d c } as by
\relative c' { g e d c }  →  \relative c'' { g e d c }.

I would maintain that it's easier to check   { g'   by eye
than the   c' { g   and   c'' { g   constructs, both of
which involve a mental calculation.

> Next, the expression you are trying to transpose
> is also not clearly defined what octave it is in.

It's perfectly clear. The pitch of the first note,
and all the others, is the absolute pitch as written.

> You are relying on it matching the octave of the
> previous expression.

It's not a matter of relying on something that you might
get right or wrong, depending on your skill. It will
never work.

> Best practice for anything being sent to a function
> is to define the octave of the music expression,
> and likewise the duration of the first note.
> 
> So, this:
> 
> \relative {
> c'4 d e f g a b c
> \transpose as bf
> {cs, ds es fs gs as bs cs}

    this is in absolute pitches
> }
> 
> Would be more carefully notated as:
> 
> \relative c' {
> c4 d e f g a b c
> \transpose as bf \relative c' {
> cs4 ds es fs gs as bs cs
   this is in relative pitches
> }
> }

Care and first notes don't come into it if the structure is wrong.

By using larger intervals, the difference between absolute and
relative interpretations becomes impossible to overlook.

The attached illustrates some LP-interpreting in action.
I used floating notes to show their complications with the first
two examples. The rest are really to show how \relative treats
things included within it. I haven't bothered to show a \relative
contained inside \transpose { … } as Christian had already covered
that.

Cheers,
David.
music = { c' f' c'' c' }

\markup { "“floating notes” set as is: c' f' c'' c'" }

{
  \music
}

\markup { "“floating notes” interpreted as \\relative to first note" }

\relative {
  \music
}

\markup { "“floating notes” re-octavated by \\relative c," }

\relative c, {
  \music
}

\markup { "“floating notes” interpreted as \\absolute by \\transpose c c" }

\transpose c c \music

\markup { "“floating notes” interpreted as \\absolute by \\transpose c f" }

\transpose c f \music

\markup { "“floating notes” interpreted twice by one \\relative, which is blind 
to the transposed section in the middle" }

\relative {
  \music
  \transpose c c \music
  \music
}


reldef.pdf
Description: Adobe PDF document


Re: Nested transposition

2021-03-12 Thread David Kastrup
David Wright  writes:

> On Fri 12 Mar 2021 at 11:52:36 (+), Peter Toye wrote:
>> Thanks Christian. Not sure why that happens (bug?) but that works fine. 
>
> The problem (not a bug) is that you can't re-apply \relative
> processing to absolute pitches.
>
> \relative { … } applies the rules of relative pitch notation, an
> *input* method, to { … } and yields a CHUNK of absolute pitches.
>
> \transpose X Y { ••• } yields a CHUNK of transposed absolute pitches
> from already absolute pitches.
>
> \transpose X Y { ••• \relative { … } ••• } does both the above in turn,
> but working from the *inside*. So after the \relative is processed, all
> of { ••• [:CHUNK:] ••• } consists of absolute pitches to be transposed.
>
> \relative { … … [:CHUNK:] … … [:CHUNK:] … … } applies the rules of
> relative pitch notation to all the … pieces in *one* logical sequence,
> treating the pitches inside the CHUNKs as invisible because they,
> working from the inside, have each had their pitches frozen already
> by the same rules as above.
>
> Note particularly that any [:CHUNK:] could itself be a \relative { … },
> which is separately processed first. (It's recursive.)
>
> One good thing—you haven't used any floating pitches, as in
> tune = { c d e c d e f d }. That can complicate matters.

I've considered giving the result of \transpose a make-relative hook
that would work by first inverting the transposition, then applying
\relative, and then applying the transposition back again.  That would
require keeping score of what transposition has been applied.  And it
woul become a complete mess with nested transpositions, and possibly
even a \transpose command in between.

In the end, just letting \transpose produce absolute music that is
impervious to \relative seemed like the saner option.

-- 
David Kastrup



Re: Nested transposition

2021-03-12 Thread Flaming Hakama by Elaine
> Am Fr., 12. März 2021 um 11:35 Uhr schrieb Peter Toye  >:
>
> I am trying to engrave a transposed song. It's written without key
> signature but is very tonal. It starts in C and ends in C#. I want to
> transpose it down a minor third. The part in C is fine, but the part in C#
> ends up as A## and there are far too many double-sharps for it to be
> performable.
>
> I found the 'minimal accidental' snippet but that looks as if it messes up
> the tonality - a mixture of A sharp and B flat.
>
> I tried the code below, which get the note names right but the octaves go
> completely wrong. Is this a bug? It would be a useful feature if it could
> be corrected.
>
> \version "2.22.0"
>
> \language "english"
>
> {
>   \transpose c a,
>   \relative {
> c'4 d e f g a b c
> \transpose as bf
> {cs, ds es fs gs as bs cs}
>
>   }
> }
>
>
> Regards,
>
> Peter
> mailto:lilyp...@ptoye.com 
> www.ptoye.com
>

%{

The main issue here is that you are using \relative in a lax way.

Which is to say, in your example,
the overall expression uses relative,
but you don't specify an octave.

This means you are using the default.
Which may be fine, but it can help to be explicit,
and this also gives you a way to fix octaves quickly.

Next, the expression you are trying to transpose
is also not clearly defined what octave it is in.
You are relying on it matching the octave of the
previous expression.

Best practice for anything being sent to a function
is to define the octave of the music expression,
and likewise the duration of the first note.

So, this:

\relative {
c'4 d e f g a b c
\transpose as bf
{cs, ds es fs gs as bs cs}
}

Would be more carefully notated as:

\relative c' {
c4 d e f g a b c
\transpose as bf \relative c' {
cs4 ds es fs gs as bs cs
}
}

The problem goes away when you follow this practice.
This will also fix many other oddities when using \relative in other
contexts.

%}

\version "2.22.0"

\language "english"

\relative c' {
c4 d e f g a b c
\mark "original without transpose"
{
cs, ds es fs gs as bs cs
}
}

\relative c' {
c4 d e f g a b c
\mark "best practice without transpose"
\relative c' {
cs4 ds es fs gs as bs cs4
}
}


\relative c' {
c4 d e f g a b c
\mark "original, with tranpose"
\transpose as bf {
cs, ds es fs gs as bs cs
}
}

\relative c' {
c4 d e f g a b c
\mark "best practice with transpose"
\transpose as bf \relative c' {
cs4 ds es fs gs as bs cs
}
}


Elaine Alt
415 . 341 .4954   "*Confusion is
highly underrated*"
ela...@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Re: Nested transposition

2021-03-12 Thread Peter Toye
David (and others),

Thanks to all - I hadn't checked the NR before trying it out. Usually I'm 
transposing an entire score where this issue doesn't apply. Stupid me.

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

-
Friday, March 12, 2021, 4:49:31 PM, David Wright wrote:

> On Fri 12 Mar 2021 at 11:52:36 (+), Peter Toye wrote:
>> Thanks Christian. Not sure why that happens (bug?) but that works fine. 

> The problem (not a bug) is that you can't re-apply \relative
> processing to absolute pitches.

> \relative { … } applies the rules of relative pitch notation, an
> *input* method, to { … } and yields a CHUNK of absolute pitches.

> \transpose X Y { ••• } yields a CHUNK of transposed absolute pitches
> from already absolute pitches.

> \transpose X Y { ••• \relative { … } ••• } does both the above in turn,
> but working from the *inside*. So after the \relative is processed, all
> of { ••• [:CHUNK:] ••• } consists of absolute pitches to be transposed.

> \relative { … … [:CHUNK:] … … [:CHUNK:] … … } applies the rules of
> relative pitch notation to all the … pieces in *one* logical sequence,
> treating the pitches inside the CHUNKs as invisible because they,
> working from the inside, have each had their pitches frozen already
> by the same rules as above.

> Note particularly that any [:CHUNK:] could itself be a \relative { … },
> which is separately processed first. (It's recursive.)

> One good thing—you haven't used any floating pitches, as in
> tune = { c d e c d e f d }. That can complicate matters.

>> Friday, March 12, 2021, 10:59:03 AM, Christian Masser wrote:

>> It seems that \transpose treats the block of notes following it as absolute 
>> notes. If you adapt that line to explicit relative notation it probably 
>> yields the result you're aspiring.

>> \version "2.22.0"

>> \language "english"

>> {
>>   \transpose c a,
>>   \relative {
>> c'4 d e f g a b c
>> \transpose cs df
>> \relative {cs' ds es fs gs as bs cs}
>>   }
>> }

>> Am Fr., 12. März 2021 um 11:35 Uhr schrieb Peter Toye :

>> I am trying to engrave a transposed song. It's written without key signature 
>> but is very tonal. It starts in C and ends in C#. I want to transpose it 
>> down a minor third. The part in C is fine, but the part in C# ends up as A## 
>> and there are far too many double-sharps for it to be performable.

>> I found the 'minimal accidental' snippet but that looks as if it messes up 
>> the tonality - a mixture of A sharp and B flat.

>> I tried the code below, which get the note names right but the octaves go 
>> completely wrong. Is this a bug? It would be a useful feature if it could be 
>> corrected.

>> \version "2.22.0"

>> \language "english"

>> {
>>   \transpose c a,
>>   \relative {
>> c'4 d e f g a b c
>> \transpose as bf
>> {cs, ds es fs gs as bs cs}
>>
>>   }  
>> }

> Cheers,
> David.

Re: Nested transposition

2021-03-12 Thread David Wright
On Fri 12 Mar 2021 at 11:52:36 (+), Peter Toye wrote:
> Thanks Christian. Not sure why that happens (bug?) but that works fine. 

The problem (not a bug) is that you can't re-apply \relative
processing to absolute pitches.

\relative { … } applies the rules of relative pitch notation, an
*input* method, to { … } and yields a CHUNK of absolute pitches.

\transpose X Y { ••• } yields a CHUNK of transposed absolute pitches
from already absolute pitches.

\transpose X Y { ••• \relative { … } ••• } does both the above in turn,
but working from the *inside*. So after the \relative is processed, all
of { ••• [:CHUNK:] ••• } consists of absolute pitches to be transposed.

\relative { … … [:CHUNK:] … … [:CHUNK:] … … } applies the rules of
relative pitch notation to all the … pieces in *one* logical sequence,
treating the pitches inside the CHUNKs as invisible because they,
working from the inside, have each had their pitches frozen already
by the same rules as above.

Note particularly that any [:CHUNK:] could itself be a \relative { … },
which is separately processed first. (It's recursive.)

One good thing—you haven't used any floating pitches, as in
tune = { c d e c d e f d }. That can complicate matters.

> Friday, March 12, 2021, 10:59:03 AM, Christian Masser wrote:
> 
> It seems that \transpose treats the block of notes following it as absolute 
> notes. If you adapt that line to explicit relative notation it probably 
> yields the result you're aspiring.
> 
> \version "2.22.0"
> 
> \language "english"
> 
> {
>   \transpose c a,
>   \relative {
> c'4 d e f g a b c
> \transpose cs df
> \relative {cs' ds es fs gs as bs cs}
>   }
> }
> 
> Am Fr., 12. März 2021 um 11:35 Uhr schrieb Peter Toye :
> 
> I am trying to engrave a transposed song. It's written without key signature 
> but is very tonal. It starts in C and ends in C#. I want to transpose it down 
> a minor third. The part in C is fine, but the part in C# ends up as A## and 
> there are far too many double-sharps for it to be performable.
> 
> I found the 'minimal accidental' snippet but that looks as if it messes up 
> the tonality - a mixture of A sharp and B flat.
> 
> I tried the code below, which get the note names right but the octaves go 
> completely wrong. Is this a bug? It would be a useful feature if it could be 
> corrected.
> 
> \version "2.22.0"
> 
> \language "english"
> 
> {
>   \transpose c a,
>   \relative {
> c'4 d e f g a b c
> \transpose as bf
> {cs, ds es fs gs as bs cs}
>
>   }  
> }

Cheers,
David.



Re: Nested transposition

2021-03-12 Thread Silvain Dupertuis

Here is a proposal
(without language = "english" => I use is and es for sharp and flat)
(using variables and transpose once from c to c sharp and once from c to b flat)
and using relative c' to ensure proper treatment of octaves.

I do not know if it helps, but it work for me with your example :

\version "2.20.0"

musicA = {

    \relative c' {

  \clef treble

  \key c \major

  c'4 d e f g a b c

    }

}




musicB = \relative c' {

  \clef bass

  \key c \major

  c, d e f g a b c

    }




musicAB = {

  \musicA

  \transpose a ais { \musicB }

  }

  


musicAC = {

  \musicA

  \transpose c des { \musicB }

  }

\markup { "from c to c sharp => a to a sharp (3 sharps to 10 sharps!)" }

\score {

  {

    \musicA

    \musicB

    \break

    \musicAB

  }

}

\markup { "from c to d double-flat => a to b flat (3 sharps to 2 [=12-10] 
flats"}

\score {

  {

    \break

    \transpose c a, { \musicAB }

    \musicAC

    \break

    \transpose c a, { \musicAC }




  }

}


Le 12.03.21 à 11:28, Peter Toye a écrit :
Nested transposition I am trying to engrave a transposed song. It's written without key 
signature but is very tonal. It starts in C and ends in C#. I want to transpose it down 
a minor third. The part in C is fine, but the part in C# ends up as A## and there are 
far too many double-sharps for it to be performable.


I found the 'minimal accidental' snippet but that looks as if it messes up the tonality 
- a mixture of A sharp and B flat.


I tried the code below, which get the note names right but the octaves go completely 
wrong. Is this a bug? It would be a useful feature if it could be corrected.


\version "2.22.0"

\language "english"

{
  \transpose c a,
  \relative {
    c'4 d e f g a b c
    \transpose as bf
    {cs, ds es fs gs as bs cs}

  }
}


Regards,

Peter
mailto:lilyp...@ptoye.com <mailto:lilyp...@ptoye.com>
www.ptoye.com <http://www.ptoye.com> 



--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>


Re: Nested transposition

2021-03-12 Thread Peter Toye
Thanks Christian. Not sure why that happens (bug?) but that works fine. 

Best regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

-
Friday, March 12, 2021, 10:59:03 AM, Christian Masser wrote:


Hi Peter!

It seems that \transpose treats the block of notes following it as absolute 
notes. If you adapt that line to explicit relative notation it probably yields 
the result you're aspiring.

\version "2.22.0"

\language "english"

{
  \transpose c a,
  \relative {
c'4 d e f g a b c
\transpose cs df
\relative {cs' ds es fs gs as bs cs}
  }
}

All the best,
Christian

Am Fr., 12. März 2021 um 11:35 Uhr schrieb Peter Toye :

I am trying to engrave a transposed song. It's written without key signature 
but is very tonal. It starts in C and ends in C#. I want to transpose it down a 
minor third. The part in C is fine, but the part in C# ends up as A## and there 
are far too many double-sharps for it to be performable.

I found the 'minimal accidental' snippet but that looks as if it messes up the 
tonality - a mixture of A sharp and B flat.

I tried the code below, which get the note names right but the octaves go 
completely wrong. Is this a bug? It would be a useful feature if it could be 
corrected.

\version "2.22.0"

\language "english"

{
  \transpose c a,
  \relative {
c'4 d e f g a b c
\transpose as bf
{cs, ds es fs gs as bs cs}
   
  }  
}

 
Regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

Re: Nested transposition

2021-03-12 Thread Christian Masser
Hi Peter!

It seems that \transpose treats the block of notes following it as absolute
notes. If you adapt that line to explicit relative notation it probably
yields the result you're aspiring.

\version "2.22.0"

\language "english"

{
  \transpose c a,
  \relative {
c'4 d e f g a b c
\transpose cs df
\relative {cs' ds es fs gs as bs cs}
  }
}

All the best,
Christian

Am Fr., 12. März 2021 um 11:35 Uhr schrieb Peter Toye :

> I am trying to engrave a transposed song. It's written without key
> signature but is very tonal. It starts in C and ends in C#. I want to
> transpose it down a minor third. The part in C is fine, but the part in C#
> ends up as A## and there are far too many double-sharps for it to be
> performable.
>
> I found the 'minimal accidental' snippet but that looks as if it messes up
> the tonality - a mixture of A sharp and B flat.
>
> I tried the code below, which get the note names right but the octaves go
> completely wrong. Is this a bug? It would be a useful feature if it could
> be corrected.
>
> \version "2.22.0"
>
> \language "english"
>
> {
>   \transpose c a,
>   \relative {
> c'4 d e f g a b c
> \transpose as bf
> {cs, ds es fs gs as bs cs}
>
>   }
> }
>
>
> Regards,
>
> Peter
> mailto:lilyp...@ptoye.com 
> www.ptoye.com
>


Nested transposition

2021-03-12 Thread Peter Toye
I am trying to engrave a transposed song. It's written without key signature 
but is very tonal. It starts in C and ends in C#. I want to transpose it down a 
minor third. The part in C is fine, but the part in C# ends up as A## and there 
are far too many double-sharps for it to be performable.

I found the 'minimal accidental' snippet but that looks as if it messes up the 
tonality - a mixture of A sharp and B flat.

I tried the code below, which get the note names right but the octaves go 
completely wrong. Is this a bug? It would be a useful feature if it could be 
corrected.

\version "2.22.0"

\language "english"

{
  \transpose c a,
  \relative {
c'4 d e f g a b c
\transpose as bf
{cs, ds es fs gs as bs cs}

  }  
}

 
Regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

Re: drawing a range reguardless of transposition

2019-11-29 Thread Sandro Santilli
On Fri, Nov 29, 2019 at 10:28:04AM +0100, Sandro Santilli wrote:

> Uhm, I might be still not getting the 2.18.2 compatibility, as this
> is what I get:
> 
>   warning: type check for `color' failed; value `# Music((origin . #) (void . #t))((name .  Music) 
> (types general-music)) > ' must be of type `color'
> 
> When using:
> 
>   altoRange = \override NoteHead.color = \highlightPitches outside 
> \altoDesignedWrittenRange

Ok, I was misusing it. Had to be (and it works):

  altoRange = \highlightPitches outside \altoDesignedWrittenRange

--strk;



Re: drawing a range reguardless of transposition

2019-11-29 Thread Sandro Santilli
On Thu, Nov 28, 2019 at 10:40:17AM -0800, Aaron Hill wrote:
> On 2019-11-28 9:27 am, Sandro Santilli wrote:
> > On Mon, Nov 25, 2019 at 04:40:12AM -0800, Aaron Hill wrote:
> > > On 2019-11-25 2:26 am, Sandro Santilli wrote:
> > > > I'm trying, for backward compatibility, to keep that
> > > > highlightOutOfRange function, is that possible ?
> > > 
> > > What compatibility are you needing?
> > 
> > As I've used the old function in existing scores, I'd like
> > to avoid changing them all to use the new function. That's
> > the kind of compatibility I'd be needing.
> 
> Forgive me, but did I not invent that function only two weeks ago?  How busy
> have you been to have used it in so many scores?!  (:

$ git grep -c highlightOutOfRange
Sidewinder/sidewinder.ly:4
SoDancoSamba/sodancosamba.ly:4
Summertime/summertime.ly:4

> But, really, it should involve little more than a find-and-replace to
> convert the older usage to the newer.  Here's a bash script to do the work:

Uhm, I might be still not getting the 2.18.2 compatibility, as this
is what I get:

  warning: type check for `color' failed; value `#) (void . #t))((name .  Music) 
(types general-music)) > ' must be of type `color'

When using:

  altoRange = \override NoteHead.color = \highlightPitches outside 
\altoDesignedWrittenRange

Top lines of the highlightPitches are:

  highlightPitches = #(define-music-function
(parser location color method music)
((color? red) symbol? ly:music?)

--strk;



Re: drawing a range reguardless of transposition

2019-11-28 Thread Aaron Hill

On 2019-11-28 9:27 am, Sandro Santilli wrote:

On Mon, Nov 25, 2019 at 04:40:12AM -0800, Aaron Hill wrote:

On 2019-11-25 2:26 am, Sandro Santilli wrote:
> I'm trying, for backward compatibility, to keep that
> highlightOutOfRange function, is that possible ?

What compatibility are you needing?


As I've used the old function in existing scores, I'd like
to avoid changing them all to use the new function. That's
the kind of compatibility I'd be needing.


Forgive me, but did I not invent that function only two weeks ago?  How 
busy have you been to have used it in so many scores?!  (:


But, really, it should involve little more than a find-and-replace to 
convert the older usage to the newer.  Here's a bash script to do the 
work:



#!/usr/bin/env bash
sed 's/\\override\s\+NoteHead\.color\s*=\s*\\highlightOutOfRange\s\+\('\
'#\(([^)]\+)\|\S*\)\s*\)\?\([a-z,'"'"']\+\s\+[a-z,'"'"']\+\)/\\highlig'\
'htPitches \1outside { \3 }/g' $1


Given an example input fragment...


\override NoteHead.color = \highlightOutOfRange #(x11-color 'tomato) c' 
c''
\new Voice \with { \override NoteHead.color = \highlightOutOfRange #red 
c' c'' }
\relative c' { c d \once \override NoteHead.color = \highlightOutOfRange 
c' c'' e f }



...the script outputs the following:


\highlightPitches #(x11-color 'tomato) outside { c' c'' }
\new Voice \with { \highlightPitches #red outside { c' c'' } }
\relative c' { c d \once \highlightPitches outside { c' c'' } e f }


But since sed works on a line-by-line basis, it will not be able to 
detect cases when you have spread the \override across multiple lines.



-- Aaron Hill



Re: drawing a range reguardless of transposition

2019-11-28 Thread Sandro Santilli
On Mon, Nov 25, 2019 at 04:40:12AM -0800, Aaron Hill wrote:
> On 2019-11-25 2:26 am, Sandro Santilli wrote:
> > I'm trying, for backward compatibility, to keep that
> > highlightOutOfRange function, is that possible ?
> 
> What compatibility are you needing?

As I've used the old function in existing scores, I'd like
to avoid changing them all to use the new function. That's
the kind of compatibility I'd be needing.

> Please let me know if I am overlooking a critical detail in your use case
> where my newer function would not be fit for purpose.

My new use case is perfectly served by the new function

--strk;



Re: drawing a range reguardless of transposition

2019-11-25 Thread Aaron Hill

On 2019-11-25 2:26 am, Sandro Santilli wrote:

I'm trying, for backward compatibility, to keep that
highlightOutOfRange function, is that possible ?


What compatibility are you needing?

I intended \highlightPitches to be a significant upgrade to my earlier 
\highlightOutOfRange, which I would no longer recommend using.


Of course, it is not a drop-in replacement, as there were several 
significant changes in its interface and usage:



% original %
\override NoteHead.color = \highlightOutOfRange c' c''

% new %
\highlightPitches outside { c' c'' }


Of note, the \override is now encapsulated within the new music 
function; and when specifying multiple pitches, they must be enclosed in 
curly braces.


Yet it is that second change in interface that ultimately permits what 
you had requested:



% requested (though invalid) syntax %
instrumentRange = c' c''
\override NoteHead.color = \highlightOutOfRange \instrumentRange

% realized syntax %
instrumentRange = { c' c'' }
\highlightPitches outside \instrumentRange


Please let me know if I am overlooking a critical detail in your use 
case where my newer function would not be fit for purpose.



-- Aaron Hill



Re: drawing a range reguardless of transposition

2019-11-24 Thread Aaron Hill

On 2019-11-24 2:40 am, Sandro Santilli wrote:

Like, the following does _not_ work:

  altoDesignedWrittenRange = bes g'''
  \override NoteHead.color = \highlightOutOfRange 
\altoDesignedWrittenRange


The function would need to be modified to support syntax like that.

I took some time to generalize a few things and add some additional 
usability.  Consider the following updated version:



\version "2.19.83"

highlightPitches = #(define-music-function
  (color method music)
  ((color? red) symbol? ly:music?)
  "Applies the specified @var{color} to a @code{NoteHead} and its
associated @code{Accidental} when the pitch lies within the range
defined by @var{method} and @var{music}. Supported methods are
@code{below}, @code{above}, @code{outside}, and @code{inside}.
Notes within @var{music} may appear in any order. Pitches are
compared given their respective distance to Middle C."
  (define (pitch-tones\new Staff \with { \highlightPitches #magenta outside { fes' bis' } } 
\melody

\new Staff \with { \highlightPitches inside { bis' fes' } } \melody


Note that code above is almost compatible with 2.18.2.  You should only 
need to modify the declaration of the function to explicitly accept the 
parser and location arguments as required in the older version:



% ...
highlightPitches = #(define-music-function
  (parser location color method music)
  ((color? red) symbol? ly:music?)
% ...


When using this new function, you can choose to define the note range in 
a variable or simply wrap up the whole thing:



% ...
instrumentRange = { c' c'' }
highlightOutOfRange = \highlightPitches outside \instrumentRange
{ g''4 \once \highlightOutOfRange g'' g'' }



-- Aaron Hill

Re: drawing a range reguardless of transposition

2019-11-24 Thread Sandro Santilli
On Fri, Nov 15, 2019 at 12:42:46PM +0100, Sandro Santilli wrote:
> On Fri, Nov 15, 2019 at 12:20:51PM +0100, Michael Käppler wrote:
> >
> > melodyRange = \override NoteHead.color = \highlightOutOfRange e' b'
> 
> And this is great to build that library, thanks !

I'm building that library, using info from
http://www.orchestralibrary.com/reftables/rang.html
and wondering how I could (scheme question, I guess) define the 2
parameters passed to "highlightOutOfRange" function as variables.

Like, the following does _not_ work:

  altoDesignedWrittenRange = bes g'''
  \override NoteHead.color = \highlightOutOfRange \altoDesignedWrittenRange

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Fri, Nov 15, 2019 at 12:20:51PM +0100, Michael Käppler wrote:
> Why not put it in the underlying "input" then?
> 
> melody = {
>     \override NoteHead.color = \highlightOutOfRange e' b'
>    \relative c' {  c4 d e f }
> }

Yep, that works

> You could even define a shortcut for this:
> 
> melodyRange = \override NoteHead.color = \highlightOutOfRange e' b'

And this is great to build that library, thanks !

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Michael Käppler

Why not put it in the underlying "input" then?

melody = {
    \override NoteHead.color = \highlightOutOfRange e' b'
   \relative c' {  c4 d e f }
}

You could even define a shortcut for this:

melodyRange = \override NoteHead.color = \highlightOutOfRange e' b'

melody = {
   \melodyRange
   \relative c' {  c4 d e f }
}



Am 15.11.2019 um 12:09 schrieb Sandro Santilli:

On Fri, Nov 15, 2019 at 12:00:09PM +0100, Michael Käppler wrote:


\score {
   <<
     \new Staff \with {
   instrumentName = #"Voice"

     } {
   \new Voice = "vocal" \with {
     \override NoteHead.color = \highlightOutOfRange e' b'
   } { \notes }

     }

     \new Staff \with {
   instrumentName = #"Alto"
     } {
   \new Voice = "sax" \with {
     \override NoteHead.color = \highlightOutOfRange a e'
   } { \transpose c g, \notes }
     }

     \new Staff \with {
   instrumentName = #"Trumpet"
     } {
   \new Voice = "trp" \with {
     \override NoteHead.color = \highlightOutOfRange g' f''
   } { \transpose c b \notes }
     }
   >>

The thing is I'm writing multiple scores with the same parts
replicated (some with all 3 voices, some with just 2 voices)
so I'd like to avoid the duplication of ranges. A range is
specific to an instrument so I'd like to specify that in the
header for each instrument, reguardless of score...

--strk;






Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Fri, Nov 15, 2019 at 12:09:27PM +0100, Sandro Santilli wrote:
> 
> The thing is I'm writing multiple scores with the same parts
> replicated (some with all 3 voices, some with just 2 voices)
> so I'd like to avoid the duplication of ranges. A range is
> specific to an instrument so I'd like to specify that in the
> header for each instrument, reguardless of score...

Actually, I'm thinking I'd build a database of available ranges
for instruments and players / singers, so that when a score
is intended for playing by known people I'd just reference
their names in the score...

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Fri, Nov 15, 2019 at 12:00:09PM +0100, Michael Käppler wrote:

> \score {
>   <<
>     \new Staff \with {
>   instrumentName = #"Voice"
> 
>     } {
>   \new Voice = "vocal" \with {
>     \override NoteHead.color = \highlightOutOfRange e' b'
>   } { \notes }
> 
>     }
> 
>     \new Staff \with {
>   instrumentName = #"Alto"
>     } {
>   \new Voice = "sax" \with {
>     \override NoteHead.color = \highlightOutOfRange a e'
>   } { \transpose c g, \notes }
>     }
> 
>     \new Staff \with {
>   instrumentName = #"Trumpet"
>     } {
>   \new Voice = "trp" \with {
>     \override NoteHead.color = \highlightOutOfRange g' f''
>   } { \transpose c b \notes }
>     }
>   >>

The thing is I'm writing multiple scores with the same parts
replicated (some with all 3 voices, some with just 2 voices)
so I'd like to avoid the duplication of ranges. A range is
specific to an instrument so I'd like to specify that in the
header for each instrument, reguardless of score...

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Michael Käppler

notes = \relative c' { c d e f g a b c }

\score {
  <<
    \new Staff \with {
  instrumentName = #"Voice"

    } {
  \new Voice = "vocal" \with {
    \override NoteHead.color = \highlightOutOfRange e' b'
  } { \notes }

    }

    \new Staff \with {
  instrumentName = #"Alto"
    } {
  \new Voice = "sax" \with {
    \override NoteHead.color = \highlightOutOfRange a e'
  } { \transpose c g, \notes }
    }

    \new Staff \with {
  instrumentName = #"Trumpet"
    } {
  \new Voice = "trp" \with {
    \override NoteHead.color = \highlightOutOfRange g' f''
  } { \transpose c b \notes }
    }
  >>
  \layout { }
}

Am 15.11.2019 um 11:25 schrieb Sandro Santilli:

On Fri, Nov 15, 2019 at 10:45:45AM +0100, Michael Käppler wrote:

While I would strongly suggest that you update to the latest development
version, which can regarded
as very stable, this would work with 2.18.2:

Thanks, this works!
Can I specify a different override for different
voices by name ? Ie: I have these voices:

   \new Staff \with {
 instrumentName = #"Voice"
   } {
 \new Voice = "vocal" { \melody }
   }

   \new Staff \with {
 instrumentName = #"Alto"
   } {
 \transpose c a
 \new Voice = "sax" { \melody_alto }
   }

   \new Staff \with {
 instrumentName = #"Trumpet"
   } {
 \transpose c d
 \new Voice = "trp" { \melody_trp }
   }

--strk;






Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Fri, Nov 15, 2019 at 10:45:45AM +0100, Michael Käppler wrote:
> While I would strongly suggest that you update to the latest development
> version, which can regarded
> as very stable, this would work with 2.18.2:

Thanks, this works!
Can I specify a different override for different
voices by name ? Ie: I have these voices:

  \new Staff \with {
instrumentName = #"Voice"
  } {
\new Voice = "vocal" { \melody }
  }

  \new Staff \with {
instrumentName = #"Alto"
  } {
\transpose c a
\new Voice = "sax" { \melody_alto }
  }

  \new Staff \with {
instrumentName = #"Trumpet"
  } {
\transpose c d
\new Voice = "trp" { \melody_trp }
  }

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Thu, Nov 14, 2019 at 06:02:40PM +0100, k...@aspodata.se wrote:
> Sandro:
> > In order to determine if I'm writing something that can
> > be played by an instrument, is there a way to display
> > on the score the supported range by that instrument ?
> > 
> > I'd like to have something that doesn't change when I
> > transpose, so to know if transpositions are possible
> > at all...
> 
> The other way around, search for "ambitus" in the manual to see how to 
> make lilypond print out the range used.

Thanks, "ambitus" works great for a start.
Next step would be automatic checking if the ambitus is within
an instrument capability, which the coloring hint by Aaron should
help with, if I handle to make it work :)

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Michael Käppler

While I would strongly suggest that you update to the latest development
version, which can regarded
as very stable, this would work with 2.18.2:

% LilyBin
\version "2.18.2"

highlightOutOfRange = #(define-scheme-function
  (parser location color lower upper)
  ((color? red) ly:pitch? ly:pitch?)
  (lambda (grob)
    (let* ((cause (ly:grob-property grob 'cause))
    (pitch (ly:event-property cause 'pitch)))
  (if (or (ly:pitch
On Thu, Nov 14, 2019 at 09:09:16AM -0800, Aaron Hill wrote:


\layout {
   \context { \Voice
 \override NoteHead.color = \highlightOutOfRange c' c''
   }
}

I like the highlighting idea! Is it compatible at all with 2.18.2 ?

It seems not to be: http://lilybin.com/166vv7/1

   Parsing.../usr/share/lilypond/2.18.2/scm/ly-syntax-constructors.scm:56:23: 
In expression (apply (ly:music-function-extract fun) parser ...):
   /usr/share/lilypond/2.18.2/scm/ly-syntax-constructors.scm:56:23: Wrong number of 
arguments to #

--strk;







Re: drawing a range reguardless of transposition

2019-11-15 Thread Sandro Santilli
On Thu, Nov 14, 2019 at 09:09:16AM -0800, Aaron Hill wrote:

> \layout {
>   \context { \Voice
> \override NoteHead.color = \highlightOutOfRange c' c''
>   }
> }

I like the highlighting idea! Is it compatible at all with 2.18.2 ?

It seems not to be: http://lilybin.com/166vv7/1

  Parsing.../usr/share/lilypond/2.18.2/scm/ly-syntax-constructors.scm:56:23: In 
expression (apply (ly:music-function-extract fun) parser ...):
  /usr/share/lilypond/2.18.2/scm/ly-syntax-constructors.scm:56:23: Wrong number 
of arguments to #

--strk;



Re: drawing a range reguardless of transposition

2019-11-15 Thread Malte Meyn




Am 14.11.19 um 18:09 schrieb Aaron Hill:

On 2019-11-14 8:53 am, Sandro Santilli wrote:

In order to determine if I'm writing something that can
be played by an instrument, is there a way to display
on the score the supported range by that instrument ?

I'd like to have something that doesn't change when I
transpose, so to know if transpositions are possible
at all...


You could do something like this:


\version "2.19.83"

highlightOutOfRange = #(define-scheme-function
   (color lower upper)
   ((color? red) ly:pitch? ly:pitch?)
   (grob-transformer 'color (lambda (grob orig)
     (let* ((cause (ly:grob-property grob 'cause))
     (pitch (ly:event-property cause 'pitch)))
   (if (or (ly:pitch

Nice! This should be added at least to the snippet repository if not to 
vanilla LilyPond. I don’t know whether many people would use it but it’s 
a small addition and AFAIK this feature is present in every other 
engraving software I know …




Re: drawing a range reguardless of transposition

2019-11-14 Thread Aaron Hill

On 2019-11-14 8:53 am, Sandro Santilli wrote:

In order to determine if I'm writing something that can
be played by an instrument, is there a way to display
on the score the supported range by that instrument ?

I'd like to have something that doesn't change when I
transpose, so to know if transpositions are possible
at all...


You could do something like this:


\version "2.19.83"

highlightOutOfRange = #(define-scheme-function
  (color lower upper)
  ((color? red) ly:pitch? ly:pitch?)
  (grob-transformer 'color (lambda (grob orig)
(let* ((cause (ly:grob-property grob 'cause))
(pitch (ly:event-property cause 'pitch)))
  (if (or (ly:pitch

Re: drawing a range reguardless of transposition

2019-11-14 Thread karl
Sandro:
> In order to determine if I'm writing something that can
> be played by an instrument, is there a way to display
> on the score the supported range by that instrument ?
> 
> I'd like to have something that doesn't change when I
> transpose, so to know if transpositions are possible
> at all...

The other way around, search for "ambitus" in the manual to see how to 
make lilypond print out the range used.

Regards,
/Karl Hammar




drawing a range reguardless of transposition

2019-11-14 Thread Sandro Santilli
In order to determine if I'm writing something that can
be played by an instrument, is there a way to display
on the score the supported range by that instrument ?

I'd like to have something that doesn't change when I
transpose, so to know if transpositions are possible
at all...

--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   https://strk.kbt.io/services.html



Re: Transposition

2018-01-10 Thread David Kastrup
Tom van der Hoeven <t...@vanderhoeven.biz> writes:

> Kieren and Noeck,
> Thanks for the answers.
> I worked already with the function \transpose and that works excellent.
> My question concerned the use of the tag \transposition.
> I wondered why it was used for two specific cases and not for the
> general case.

\transpose changes the pitch of a passage, \transposition declares the
relation between written pitch (which is not changed) and sounding pitch
(used in quotes and Midi generation).

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Transposition

2018-01-10 Thread Tom van der Hoeven

Kieren and Noeck,
Thanks for the answers.
I worked already with the function \transpose and that works excellent.
My question concerned the use of the tag \transposition.
I wondered why it was used for two specific cases and not for the 
general case.

Given both answers it seems that I haven't overlooked anything.
I am not looking for a new scheme function.
In the example of Kieren it is not clear to me what the added value is 
of \transition in trapII and trapIII


Tom
---
Hi Tom,

I have a piece of music written in different transpositions.
I want to transform it to a piece in one transposition.


Likely, a nice Scheme function or engraver could work that out for you. 
Unfortunately, that's beyond my [essentially non-existent] Scheme-fu…

In the absence of that type of solution, perhaps something like this would work 
for you?

\version "2.19.80"

trapI = \relative c' { a }
trapII = \relative c' { \transposition f' c e g f bes }
trapIII = \relative c' { \transposition bes' c e }

{
  \trapI
  \trapII
  \trapIII
}

{
  \trapI
  \transpose c f, \trapII
  \transpose c bes, \trapIII
}

Ultimately, I would recommend always trying to enter your music in concert 
pitch, if possible — you can use tools like Frescobaldi to make this easier.

Hope this helps!
Kieren.


Op 9-1-2018 om 21:34 schreef Noeck:

Hi Tom,

many people confuse \transposition with \transpose. They have different
use cases. Hopefully, \transpose will help you:

http://lilypond.org/doc/v2.19/Documentation/notation/changing-multiple-pitches.html#transpose

Cheers,
Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Transposition

2018-01-09 Thread Kieren MacMillan
Hi Tom,

> I have a piece of music written in different transpositions. 
> I want to transform it to a piece in one transposition. 

Likely, a nice Scheme function or engraver could work that out for you. 
Unfortunately, that's beyond my [essentially non-existent] Scheme-fu…

In the absence of that type of solution, perhaps something like this would work 
for you?

\version "2.19.80"

trapI = \relative c' { a }
trapII = \relative c' { \transposition f' c e g f bes }
trapIII = \relative c' { \transposition bes' c e }

{
  \trapI
  \trapII
  \trapIII
}

{
  \trapI
  \transpose c f, \trapII
  \transpose c bes, \trapIII
}

Ultimately, I would recommend always trying to enter your music in concert 
pitch, if possible — you can use tools like Frescobaldi to make this easier.

Hope this helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Transposition

2018-01-09 Thread Noeck
Hi Tom,

many people confuse \transposition with \transpose. They have different
use cases. Hopefully, \transpose will help you:

http://lilypond.org/doc/v2.19/Documentation/notation/changing-multiple-pitches.html#transpose

Cheers,
Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Transposition

2018-01-09 Thread Tom van der Hoeven

I have a piece of music written in different transpositions.

I want to transform it to a piece in one transposition.

I have found \transposition to indicate the transposition of the 
subsequent notes.


trap = \relative c'{ a \transposition f'  c e g f bes \transposition 
bes' c e}


It is used for Midi and quotations, where the music is based on the 
concert pitch


I could not find a general command to bring a piece to the common 
concert pitch.


Something like AAA = \ctransform{trap} where AAA can be used in a \score

It seems the functionality is there, so I must have overlooked something.



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


RE: Transposition

2018-01-06 Thread mogens
I think you want \transpose
http://lilypond.org/doc/v2.18/Documentation/notation/changing-multiple-pitches#transpose

Regards,
Mogens

From: Tom van der Hoeven
Sent: Saturday, January 6, 2018 13:16
To: lilypond-user@gnu.org
Subject: Transposition

I have a piece of music written in different transpositions.

I want to transform it to a piece in one transposition.

I have found \transposition to indicate the transposition of the 
subsequent notes.

trap = \relative c'{ a \transposition f'  c e g f bes \transposition 
bes' c e}

It is used for Midi and quotations, where the music is based on the 
concert pitch

I could not find a general command to bring a piece to the common 
concert pitch.

Something like AAA = \ctransform{trap} where AAA can be used in a \score

It seems the functionality is there, so I must have overlooked something.




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Transposition

2018-01-06 Thread Tom van der Hoeven

I have a piece of music written in different transpositions.

I want to transform it to a piece in one transposition.

I have found \transposition to indicate the transposition of the 
subsequent notes.


trap = \relative c'{ a \transposition f'  c e g f bes \transposition 
bes' c e}


It is used for Midi and quotations, where the music is based on the 
concert pitch


I could not find a general command to bring a piece to the common 
concert pitch.


Something like AAA = \ctransform{trap} where AAA can be used in a \score

It seems the functionality is there, so I must have overlooked something.




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-18 Thread David Kastrup
Thomas Morley  writes:

> 2017-12-18 16:08 GMT+01:00 Kieren MacMillan :
>
>> I suppose I could use single variables more if Lilypond had better
>> "at runtime" methods of reusing material (e.g., inline variable
>> definition)
>
> Have a look at
> https://lilypondforum.de/index.php/topic,195.msg1231.html#msg1231
> Though, I have no clue about the consequences...

A number of things wrong with it.  For one, it's not well-defined just
when the variable is available.  For another, there is no point in using
a string? argument when you actually need a symbol? argument.  And worst
of all, the command does not bother creating a copy, so any destructive
manipulations on one variable (like \relative, \transpose, and others)
will magically appear in the other variable.

Not particularly enthused about the side effect in the middle of music
either: people might expect \tag to have an effect on whether or not
some sequence is defined in some branch, but it won't.  But that's not
all that dissimilar to surprises about \relative and \tag .

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-18 Thread Kieren MacMillan
Hi Harm,

> Have a look at
> https://lilypondforum.de/index.php/topic,195.msg1231.html#msg1231

Ooh! It even works outside of the parent variable (as would be absolutely 
necessary in my usage):

%%%  SNIPPET BEGINS
\version "2.19.80"

tee = #(define-music-function (name mus) (string? ly:music?)
  (ly:parser-define! (string->symbol name) mus)
  mus)

testing_this = {
  g'1
  \repeat volta 2 \tee MusicRi {
c''1
e''1_\markup \halign #-1.5 "Fine"
  }
  \repeat volta 2 {
g''1
d''1_\markup \halign #-0.2 \column {
 \right-align "D.S. al Fine" \right-align "e poi"
}
  }
  \MusicRi
}

another_test = {
  R1
  \MusicRi
  R1*2
  \MusicRi
}

\score {
  <<
\new Staff \testing_this
\new Staff \another_test
  >>
}
%%%  SNIPPET ENDS

> Though, I have no clue about the consequences...

Hmmm… It would be nice to hear from others about whether this construction 
makes sense, is "safe", etc.
Certainly the ability to define variables "in-line" would be a bit of a 
game-changer for my Lily-coding.

Thanks!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-18 Thread Thomas Morley
2017-12-18 16:08 GMT+01:00 Kieren MacMillan :

> I suppose I could use single variables more if Lilypond had better "at 
> runtime" methods of reusing material (e.g., inline variable definition)

Have a look at
https://lilypondforum.de/index.php/topic,195.msg1231.html#msg1231
Though, I have no clue about the consequences...

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-18 Thread Wol's lists

On 18/12/17 15:08, Kieren MacMillan wrote:

Hi Saul,


\resetRelativeOctave belongs IMO always as part of the definition of a music 
expression, ideally on the line directly preceding note entry.

Agreed.

Until it's a repeated phrase, but not necessarily the same octave. iirc 
(as I said it's a long time ago) this phrase kept cropping up in the music.


Horses for courses, and I think I didn't put \resetRelativeOctave in the 
variable itself because it didn't work for some reason.


Cheers,
Wol

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-18 Thread Kieren MacMillan
Hi David,

> This is, in part, a result of our documentation being so granular.

True.

> Putting it another way: I doubt that many of the issues with \relative rear 
> their heads in the examples in the docs. 

So true. And thus newbies aren't really [explicitly] taught how to use relative 
mode correctly (e.g., “as early as possible”), so when they start to engrave 
anything more complex than the simple doc examples, they run into problems 
(hence all the questions posted to the list).

> A discussion of the pros and cons of each method with examples could be 
> appropriate in perhaps the LM, or in 
> http://lilypond.org/doc/v2.19/Documentation/notation/writing-pitches

Agreed.

Best,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-18 Thread Kieren MacMillan
Hi Saul,

> \resetRelativeOctave belongs IMO always as part of the definition of a music 
> expression, ideally on the line directly preceding note entry.

Agreed.

> Personally, I think it is preferable to define all of the music for each 
> context by explicitly typing it in a single variable. Using music variables 
> for fragments or phrases which are then transformed or combined is a recipe 
> for code that is difficult to read and debug, and IMO virtually never helps 
> the compositional process in the long run. There may be use cases where that 
> sort of thing is appropriate, but I imagine they must be very far from the 
> kind of work I do.

Hmm… Essentially every form of music that I compose and engrave benefits from 
using and combining music variables:
  1. pop and musical theatre forms (repeats, transposed last verses, etc.);
  2. choral music (choral unisons, strict counterpoint, etc.);
  3. new concert music (row manipulations, etc.);
  4. orchestral works (repeats, counterpoint, doublings, etc.).

Explicitly typing everything into a single variable for each context is 
time-consuming and error-prone (though admittedly Frescobaldi has *some* tools 
that alleviate *some* of those issues). I suppose I could use single variables 
more if Lilypond had better "at runtime" methods of reusing material (e.g., 
inline variable definition) — but given the current toolbox, I shudder to think 
how much less efficient my work would be if I was limited to single variables 
per context.

Best,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread Saul Tobin
I would highly recommend against this type of coding style.
\resetRelativeOctave belongs IMO always as part of the definition of a
music expression, ideally on the line directly preceding note entry.

Personally, I think it is preferable to define all of the music for each
context by explicitly typing it in a single variable. Using music variables
for fragments or phrases which are then transformed or combined is a recipe
for code that is difficult to read and debug, and IMO virtually never helps
the compositional process in the long run. There may be use cases where
that sort of thing is appropriate, but I imagine they must be very far from
the kind of work I do.

On Dec 15, 2017 7:54 AM, "Wols Lists"  wrote:

On 15/12/17 13:45, David Wright wrote:
> On Fri 15 Dec 2017 at 10:02:19 (+), Wols Lists wrote:
>> On 15/12/17 06:20, Saul Tobin wrote:
>>> Relative mode makes perfect sense if you're entering music that cares
>>> mainly about the relationship between notes within a phrase (i.e. most
>>> music). IMO absolute mode might be easier from the perspective of the
>>> software, but it's not how most musicians think, and that's
>>> important. Maybe the documentation could do a better job explaining the
>>> semantics of relative mode and when to use \resetRelativeOctave?
>>>
>>> I take exception to the idea that relative mode ought to be deprecated.
>>> I've been using exclusively relative mode to compose for almost ten
>>> years, and I think it's great.
>>
>> I think Han-Wen actually wrote \resetRelativeOctave for me :-)
>>
>> But if you don't understand relative then it will mess you up.
>>
>> Does anybody (not me :-) want to write a little update for the docu that
>> will make both relative mode and \resetRelativeOctave (hopefully) clear?
>>
>> It originated when I was (iirc) transcribing Chattanooga Choo-Choo, and
>> there's a repeated phrase, so I thought I'd define it as a variable.
>> OOOPPSS! The starting and ending notes are a fifth or more apart, and
>> the phrase repeats with nothing else in-between. The resulting staircase
>> was spectacular!
>>
>> If somebody would care to take that as hint for putting an example in
>> the docu, that's fine by me! :-)
>
> Just use \relative early.
>
I was thinking more along the lines of (note this is NOT TESTED)

phrase = { c f d g }

\relative { \phrase \phrase \phrase }

\relative { \resetRelativeOctave \phrase \resetRelativeOctave \phrase
\resetRelativeOctave \phrase }

Cheers,
Wol


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread Flaming Hakama by Elaine
> Subject: Re: Re: Auto-transposition
>


> By the way, whoever is working on the Changes document for upcoming 2.20,
> don't forget to mention about \fixed!
>
>/Mats
>

I volunteered to do this, so I will make sure to work on describing this
feature.


>  > I don't think there is a clear advantage to use relative vs absolute.
>
> I think there are clear advantages and disadvantages to both. The main
> problem I see is the insistence (implicit in the documentation) that
> relative mode is the best for newbies to start with, and the volume of list
> posts from newbies having problems with relative mode makes it clear that
> that is not true. Perhaps if the documentation were make crystal clear,
> with \resetRelativeOctave used in every example, etc., then I could feel
> comfortable backing down from my crusade to try to save newbies from the
> pitfalls we have [unintentionally] laid for them.
>
>
>
> Best,
>
> Kieren.
>

This is, in part, a result of our documentation being so granular.

Putting it another way: I doubt that many of the issues with \relative rear
their heads in the examples in the docs.

A discussion of the pros and cons of each method with examples could be
appropriate in perhaps the LM, or in
http://lilypond.org/doc/v2.19/Documentation/notation/writing-pitches

Adding \resetRelativeOctave *everywhere* is not consistent with the MWE
nature of the examples, and is probably not needed in most cases, since it
(seems to me) makes sense to use it at the start of a new phrase, or
anywhere where the content is not dependent upon what came before.
Whereas, most doc examples consists of a single, or even a partial, phrase.

I certainly don't think it is necessary that all examples should use the
same mode of note entry.  It might be good to start revising examples where
using \fixed organically makes more sense.

A most useful approach (but probably prohibitively laborious way?) might be
to add the ability to toggle the docs dynamically to show the example in
either \relative or \fixed.


> I was thinking more along the lines of (note this is NOT TESTED)
> >
> > phrase = { c f d g }
> >
> > \relative { \phrase \phrase \phrase }
>
> Yes, that's exactly the problem with putting \relative around
> constructions rather than the variables themselves, illustrated
> by "mover".



Since \relative { } is an absolute construct, this is easily solved by:

phrase = \relative c' { c f d g }
\relative { \phrase \phrase \phrase }




David Elaine Alt
415 . 341 .4954   "*Confusion is
highly underrated*"
ela...@flaminghakama.com
skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread David Kastrup
Flaming Hakama by Elaine <ela...@flaminghakama.com> writes:

> On Fri, Dec 15, 2017 at 7:57 AM, David Kastrup <d...@gnu.org> wrote:
>
>> Flaming Hakama by Elaine <ela...@flaminghakama.com> writes:
>>
>> > Actually, I think it had to do with midi output for bass clarinet.   The
>> > sample I used was not transposed the octave, and I had to compensate by
>> > transposing the music down.
>>
>> According to Wikipedia, bass clarinet is written in treble clef but
>> played one octave lower than written (after subtracting the usual B♭
>> transposition).  So, uh, I have no idea?
>
> Correct, I'd entered the music in the printed octave,
> and wanted to hear it in the sounding octave.

\transposition c

should do the trick for Midi.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread Wols Lists
On 15/12/17 17:48, Flaming Hakama by Elaine wrote:
> > Actually, I think it had to do with midi output for bass
> clarinet.   The
> > sample I used was not transposed the octave, and I had to
> compensate by
> > transposing the music down.
> 
> According to Wikipedia, bass clarinet is written in treble clef but
> played one octave lower than written (after subtracting the usual B♭
> transposition).  So, uh, I have no idea?
> 
> 
> 
> Correct, I'd entered the music in the printed octave, 
> and wanted to hear it in the sounding octave.
> 
Which is actually why I always like \relative when entering music. I
just alter the reference pitch up or down an octave to suit ...

I gather \fixed would have the same effect - I might have to try
changing to that because it would probably help avoid me getting stuff
going all over the place - I do tend to enter all the notes before I
compile and check it so a couple of missed commas or apostrophes results
in ledger lines galore :-)

If you want to print it with the treble rather than the treble_8 clef,
I'd be inclined to enter it in the correct octave with \relative then
\transpose it up the octave just for printing.

Cheers,
Wol

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread Flaming Hakama by Elaine
On Fri, Dec 15, 2017 at 7:57 AM, David Kastrup <d...@gnu.org> wrote:

> Flaming Hakama by Elaine <ela...@flaminghakama.com> writes:
>
> > David Kastrup <d...@gnu.org> writes:
> >
> >> Flaming Hakama by Elaine <ela...@flaminghakama.com> writes:
> >>
> >>> And the behavior of \relative that is weirdest:
> >>>
> >>> * The octave of \relative is lowered when used with bass clef.
> >>>
> >>> The fix for the clef issue is to use a \transpose when you use it
> >>> with bass clef.
> >>
> >> That one is nonsense.  \relative does not interact in any way with the
> >> bass clef.
> >
> >> Best guess: choral music with tenor (injudiciously) written in \clef
> >> "treble" rather than \clef "treble_8" confused your sense of octave.
> >
> >
> > Actually, I think it had to do with midi output for bass clarinet.   The
> > sample I used was not transposed the octave, and I had to compensate by
> > transposing the music down.
>
> According to Wikipedia, bass clarinet is written in treble clef but
> played one octave lower than written (after subtracting the usual B♭
> transposition).  So, uh, I have no idea?
>
> --
> David Kastrup
>


Correct, I'd entered the music in the printed octave,
and wanted to hear it in the sounding octave.


Elaine
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread David Wright
On Fri 15 Dec 2017 at 15:52:28 (+), Wols Lists wrote:
> On 15/12/17 13:45, David Wright wrote:
> > On Fri 15 Dec 2017 at 10:02:19 (+), Wols Lists wrote:
> >> On 15/12/17 06:20, Saul Tobin wrote:
> >>> Relative mode makes perfect sense if you're entering music that cares
> >>> mainly about the relationship between notes within a phrase (i.e. most
> >>> music). IMO absolute mode might be easier from the perspective of the
> >>> software, but it's not how most musicians think, and that's
> >>> important. Maybe the documentation could do a better job explaining the
> >>> semantics of relative mode and when to use \resetRelativeOctave?
> >>>
> >>> I take exception to the idea that relative mode ought to be deprecated.
> >>> I've been using exclusively relative mode to compose for almost ten
> >>> years, and I think it's great.
> >>
> >> I think Han-Wen actually wrote \resetRelativeOctave for me :-)
> >>
> >> But if you don't understand relative then it will mess you up.
> >>
> >> Does anybody (not me :-) want to write a little update for the docu that
> >> will make both relative mode and \resetRelativeOctave (hopefully) clear?
> >>
> >> It originated when I was (iirc) transcribing Chattanooga Choo-Choo, and
> >> there's a repeated phrase, so I thought I'd define it as a variable.
> >> OOOPPSS! The starting and ending notes are a fifth or more apart, and
> >> the phrase repeats with nothing else in-between. The resulting staircase
> >> was spectacular!
> >>
> >> If somebody would care to take that as hint for putting an example in
> >> the docu, that's fine by me! :-)
> > 
> > Just use \relative early.
> > 
> I was thinking more along the lines of (note this is NOT TESTED)
> 
> phrase = { c f d g }
> 
> \relative { \phrase \phrase \phrase }

Yes, that's exactly the problem with putting \relative around
constructions rather than the variables themselves, illustrated
by "mover".

> \relative { \resetRelativeOctave \phrase \resetRelativeOctave \phrase
> \resetRelativeOctave \phrase }

Each \resetRelativeOctave needs a pitch to set the octave, but, yes,
that is one way of dealing with the issue. A benefit is that you get
the chance to modify the octavation at each repetition, but that
benefit could also be achieved with \transpose c c' additions instead.

But the solution shown by "stayer" is simpler and more elegant, and
will also make any deliberate octavation changes more obvious in
the source.

Cheers,
David.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


RE: Auto-transposition

2017-12-15 Thread mogens

> Hi List,
>
> I have used Lilypond for a few years now.  I (almost) always use
> \relative and I have never had trouble with it.  Indeed, as a lay
> person, I have no idea which octave
>   c'4 d' e' f' g'1
> is – I know I could look it up, but it is certainly not in my head.

So what reference pitch do you put after \relative ?  Or do you just do
it by trial and error?

Something like: when writing in treble clef, the first note should likely have 
a single apostrophe.  Errors are obvious and trivial to fix (and therefore not 
distressing as all).

Regards,
Mogens

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread David Kastrup
Flaming Hakama by Elaine <ela...@flaminghakama.com> writes:

> David Kastrup <d...@gnu.org> writes:
>
>> Flaming Hakama by Elaine <ela...@flaminghakama.com> writes:
>>
>>> And the behavior of \relative that is weirdest:
>>>
>>> * The octave of \relative is lowered when used with bass clef.
>>>
>>> The fix for the clef issue is to use a \transpose when you use it
>>> with bass clef.
>>
>> That one is nonsense.  \relative does not interact in any way with the
>> bass clef.
>
>> Best guess: choral music with tenor (injudiciously) written in \clef
>> "treble" rather than \clef "treble_8" confused your sense of octave.
>
>
> Actually, I think it had to do with midi output for bass clarinet.   The
> sample I used was not transposed the octave, and I had to compensate by
> transposing the music down.

According to Wikipedia, bass clarinet is written in treble clef but
played one octave lower than written (after subtracting the usual B♭
transposition).  So, uh, I have no idea?

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread Wols Lists
On 15/12/17 13:45, David Wright wrote:
> On Fri 15 Dec 2017 at 10:02:19 (+), Wols Lists wrote:
>> On 15/12/17 06:20, Saul Tobin wrote:
>>> Relative mode makes perfect sense if you're entering music that cares
>>> mainly about the relationship between notes within a phrase (i.e. most
>>> music). IMO absolute mode might be easier from the perspective of the
>>> software, but it's not how most musicians think, and that's
>>> important. Maybe the documentation could do a better job explaining the
>>> semantics of relative mode and when to use \resetRelativeOctave?
>>>
>>> I take exception to the idea that relative mode ought to be deprecated.
>>> I've been using exclusively relative mode to compose for almost ten
>>> years, and I think it's great.
>>
>> I think Han-Wen actually wrote \resetRelativeOctave for me :-)
>>
>> But if you don't understand relative then it will mess you up.
>>
>> Does anybody (not me :-) want to write a little update for the docu that
>> will make both relative mode and \resetRelativeOctave (hopefully) clear?
>>
>> It originated when I was (iirc) transcribing Chattanooga Choo-Choo, and
>> there's a repeated phrase, so I thought I'd define it as a variable.
>> OOOPPSS! The starting and ending notes are a fifth or more apart, and
>> the phrase repeats with nothing else in-between. The resulting staircase
>> was spectacular!
>>
>> If somebody would care to take that as hint for putting an example in
>> the docu, that's fine by me! :-)
> 
> Just use \relative early.
> 
I was thinking more along the lines of (note this is NOT TESTED)

phrase = { c f d g }

\relative { \phrase \phrase \phrase }

\relative { \resetRelativeOctave \phrase \resetRelativeOctave \phrase
\resetRelativeOctave \phrase }

Cheers,
Wol


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread Flaming Hakama by Elaine
On Dec 15, 2017 12:59 AM, "David Kastrup"  wrote:

David Kastrup  writes:

> Flaming Hakama by Elaine  writes:
>
>> And the behavior of \relative that is weirdest:
>>
>> * The octave of \relative is lowered when used with bass clef.
>>
>> The fix for the clef issue is to use a \transpose when you use it with
bass
>> clef.
>
> That one is nonsense.  \relative does not interact in any way with the
> bass clef.

Best guess: choral music with tenor (injudiciously) written in \clef
"treble" rather than \clef "treble_8" confused your sense of octave.

--
David Kastrup


Actually, I think it had to do with midi output for bass clarinet.   The
sample I used was not transposed the octave, and I had to compensate by
transposing the music down.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread David Kastrup
 writes:

> Hi List,
>
> I have used Lilypond for a few years now.  I (almost) always use
> \relative and I have never had trouble with it.  Indeed, as a lay
> person, I have no idea which octave
>   c'4 d' e' f' g'1
> is – I know I could look it up, but it is certainly not in my head.

So what reference pitch do you put after \relative ?  Or do you just do
it by trial and error?

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread David Kastrup
Kieren MacMillan  writes:

> Hi all,
>
> Mats wrote:
>> By the way, whoever is working on the Changes document for upcoming
>> 2.20, don't forget to mention about \fixed!
>
> +1

2.19.22 apparently.  I'd have pegged it at 2.18 already.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


RE: Auto-transposition

2017-12-15 Thread mogens
Hi List,

I have used Lilypond for a few years now.  I (almost) always use \relative and 
I have never had trouble with it.  Indeed, as a lay person, I have no idea 
which octave
  c'4 d' e' f' g'1
is – I know I could look it up, but it is certainly not in my head.  So for 
someone with little or no formal musical training, I think \relative is the 
best way to go – and I selfishly think that the documentation should be written 
for people such as me.

Regards,
Mogens



From: Kieren MacMillan
Sent: December 15, 2017 7:28
To: Lilypond-User Mailing List
Cc: Mats Bengtsson
Subject: Re: Auto-transposition

Hi all,

Mats wrote:
> By the way, whoever is working on the Changes document for upcoming 2.20, 
> don't forget to mention about \fixed!

+1

David W wrote:
> Just use \relative early.

The fact that this works like it does is further evidence that \relative is not 
sufficiently intuitive. I'm pretty sure if you asked 100 newbies — or even 
not-so-newbies — what the output of your code would be, there would be a 
significant subset (maybe even a majority?!) that wouldn't answer correctly.

Saul wrote:
> IMO absolute mode might be easier from the perspective of the software, but 
> it's not how most musicians think

I disagree. In fact, I would offer that the situation is essentially the 
opposite of what you suggest: to wit, if I extract a line out of the middle of 
a relative block

   c4 d e f g1

and ask what pitches (including octave!) those are, no human musician can tell 
me (better than random chance), whereas software *can*. On the other hand, if I 
pull the same line out of the middle of an absolute block

  c'4 d' e' f' g'1

both human and software can get it (i.e., the octave) correct 100% of the time.

> Maybe the documentation could do a better job explaining the semantics of 
> relative mode and when to use \resetRelativeOctave?

That's definitely true.

Gianmaria wrote:
> I don't think there is a clear advantage to use relative vs absolute.

I think there are clear advantages and disadvantages to both. The main problem 
I see is the insistence (implicit in the documentation) that relative mode is 
the best for newbies to start with, and the volume of list posts from newbies 
having problems with relative mode makes it clear that that is not true. 
Perhaps if the documentation were make crystal clear, with \resetRelativeOctave 
used in every example, etc., then I could feel comfortable backing down from my 
crusade to try to save newbies from the pitfalls we have [unintentionally] laid 
for them.

Best,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread Kieren MacMillan
Hi all,

Mats wrote:
> By the way, whoever is working on the Changes document for upcoming 2.20, 
> don't forget to mention about \fixed!

+1

David W wrote:
> Just use \relative early.

The fact that this works like it does is further evidence that \relative is not 
sufficiently intuitive. I'm pretty sure if you asked 100 newbies — or even 
not-so-newbies — what the output of your code would be, there would be a 
significant subset (maybe even a majority?!) that wouldn't answer correctly.

Saul wrote:
> IMO absolute mode might be easier from the perspective of the software, but 
> it's not how most musicians think

I disagree. In fact, I would offer that the situation is essentially the 
opposite of what you suggest: to wit, if I extract a line out of the middle of 
a relative block

   c4 d e f g1

and ask what pitches (including octave!) those are, no human musician can tell 
me (better than random chance), whereas software *can*. On the other hand, if I 
pull the same line out of the middle of an absolute block

  c'4 d' e' f' g'1

both human and software can get it (i.e., the octave) correct 100% of the time.

> Maybe the documentation could do a better job explaining the semantics of 
> relative mode and when to use \resetRelativeOctave?

That's definitely true.

Gianmaria wrote:
> I don't think there is a clear advantage to use relative vs absolute.

I think there are clear advantages and disadvantages to both. The main problem 
I see is the insistence (implicit in the documentation) that relative mode is 
the best for newbies to start with, and the volume of list posts from newbies 
having problems with relative mode makes it clear that that is not true. 
Perhaps if the documentation were make crystal clear, with \resetRelativeOctave 
used in every example, etc., then I could feel comfortable backing down from my 
crusade to try to save newbies from the pitfalls we have [unintentionally] laid 
for them.

Best,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Re: Auto-transposition

2017-12-15 Thread Mats Bengtsson



On 2017-12-15 13:30, Ralph Palmer wrote:


Greetings -

Just a reminder and note:

I have been using \relative for years and have been quite happy with 
it. Perhaps my situation is fairly unique. I transcribe a lot of 
fiddle tunes, then transpose them down an octave and into alto clef. 
Using \relative is easier for me than using absolute pitches and 
\transpose, especially when I need to move an A part or B part up or 
down an octave because the fiddle tune won't all fit on the viola down 
an octave.


My point being that I understand the arguments for absolute pitch 
entry and I prefer \relative pitch entry. I think there's room for both.


All the best,

Ralph


Agreed!

By the way, whoever is working on the Changes document for upcoming 
2.20, don't forget to mention about \fixed!


   /Mats

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread David Wright
On Fri 15 Dec 2017 at 10:02:19 (+), Wols Lists wrote:
> On 15/12/17 06:20, Saul Tobin wrote:
> > Relative mode makes perfect sense if you're entering music that cares
> > mainly about the relationship between notes within a phrase (i.e. most
> > music). IMO absolute mode might be easier from the perspective of the
> > software, but it's not how most musicians think, and that's
> > important. Maybe the documentation could do a better job explaining the
> > semantics of relative mode and when to use \resetRelativeOctave?
> > 
> > I take exception to the idea that relative mode ought to be deprecated.
> > I've been using exclusively relative mode to compose for almost ten
> > years, and I think it's great.
> 
> I think Han-Wen actually wrote \resetRelativeOctave for me :-)
> 
> But if you don't understand relative then it will mess you up.
> 
> Does anybody (not me :-) want to write a little update for the docu that
> will make both relative mode and \resetRelativeOctave (hopefully) clear?
> 
> It originated when I was (iirc) transcribing Chattanooga Choo-Choo, and
> there's a repeated phrase, so I thought I'd define it as a variable.
> OOOPPSS! The starting and ending notes are a fifth or more apart, and
> the phrase repeats with nothing else in-between. The resulting staircase
> was spectacular!
> 
> If somebody would care to take that as hint for putting an example in
> the docu, that's fine by me! :-)

Just use \relative early.

Cheers,
David.
mover = { c' c' d' e' f' g' a' a' }
stayer = \relative { c' c d e f g a a }

mresult = \relative { \mover\mover\mover\mover }
sresult = \relative { \stayer\stayer\stayer\stayer }

\mresult
\sresult


wot-u-dun.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread Ralph Palmer
On Thu, Dec 14, 2017 at 5:04 PM, Neo Anderson  wrote:

> Dear All,
>
> Anyway, I'm thankful you've taken your time to solve my problem.
>
> On Thursday, December 14, 2017, 1:29:22 AM GMT+1, Kieren MacMillan <
> kieren_macmil...@sympatico.ca> wrote:
>
>
> Hi David,
>
> >> Because my only goal was to clarify for future readers of the list that
> "manipulations on stuff" are not the only thing that can cause headaches.
> > I failed to see how cut and paste differed from manipulations on stuff.
>
>
> >> For future list-readers: Using absolute and fixed entry modes allows
> you to avoid the issues/effort described by David.
> > If people would only cease bringing any questions about \relative
> > to the list, we'd be able to avoid this particular drum beat.
>
> Agreed. But I would offer that the reason people (esp. newbies)
> continually bring questions about \relative to the list is because it's not
> as intuitive and "idiot-proof" as our documentation would suggest — which
> is precisely why I keep beating the drum, to try to keep people from making
> the same decade-long mistake that I did (which was to use \relative, as
> suggested/implied in the official documentation).
>
> Cheers,
> Kieren.
>

Greetings -

Just a reminder and note:

I have been using \relative for years and have been quite happy with it.
Perhaps my situation is fairly unique. I transcribe a lot of fiddle tunes,
then transpose them down an octave and into alto clef. Using \relative is
easier for me than using absolute pitches and \transpose, especially when I
need to move an A part or B part up or down an octave because the fiddle
tune won't all fit on the viola down an octave.

My point being that I understand the arguments for absolute pitch entry and
I prefer \relative pitch entry. I think there's room for both.

All the best,

Ralph

-- 
Ralph Palmer
Brattleboro, VT
USA
palmer.r.vio...@gmail.com
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread Wols Lists
On 15/12/17 06:20, Saul Tobin wrote:
> Relative mode makes perfect sense if you're entering music that cares
> mainly about the relationship between notes within a phrase (i.e. most
> music). IMO absolute mode might be easier from the perspective of the
> software, but it's not how most musicians think, and that's
> important. Maybe the documentation could do a better job explaining the
> semantics of relative mode and when to use \resetRelativeOctave?
> 
> I take exception to the idea that relative mode ought to be deprecated.
> I've been using exclusively relative mode to compose for almost ten
> years, and I think it's great.

I think Han-Wen actually wrote \resetRelativeOctave for me :-)

But if you don't understand relative then it will mess you up.

Does anybody (not me :-) want to write a little update for the docu that
will make both relative mode and \resetRelativeOctave (hopefully) clear?

It originated when I was (iirc) transcribing Chattanooga Choo-Choo, and
there's a repeated phrase, so I thought I'd define it as a variable.
OOOPPSS! The starting and ending notes are a fifth or more apart, and
the phrase repeats with nothing else in-between. The resulting staircase
was spectacular!

If somebody would care to take that as hint for putting an example in
the docu, that's fine by me! :-)

Cheers,
Wol

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Auto-transposition

2017-12-15 Thread David Kastrup
David Kastrup  writes:

> Flaming Hakama by Elaine  writes:
>
>> And the behavior of \relative that is weirdest:
>>
>> * The octave of \relative is lowered when used with bass clef.
>>
>> The fix for the clef issue is to use a \transpose when you use it with bass
>> clef.
>
> That one is nonsense.  \relative does not interact in any way with the
> bass clef.

Best guess: choral music with tenor (injudiciously) written in \clef
"treble" rather than \clef "treble_8" confused your sense of octave.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


  1   2   3   4   5   >