errors when updating syntax

2021-01-25 Thread James B. Wilkinson
I got a .ly file claiming to be version 2.18.0 and opened it in LP version 
2.22.0-1. When I did “Update syntax” I got these errors, and the version in the 
file did not change.




I can typeset the file with no problems.


I thought you should know.

Re: errors when updating syntax

2021-01-29 Thread James B . Wilkinson
lily

> On Jan 29, 2021, at 12:37 PM, Jean Abou Samra  wrote:
> 
>> I got a .ly file claiming to be version 2.18.0 and opened it in LP version 
>> 2.22.0-1. When I did “Update syntax” I got these errors, and the version in 
>> the file did not change.
>> 
>> 
>> [Image showing AttributeError: 'file' object has no attribute 'detach'
>> I can typeset the file with no problems.
>> 
>> 
>> I thought you should know.
> 
> 
> Hello,
> 
> This is a serious problem. The error indicates that
> Python 2 is being used. The scripts were ported to
> Python 3 in release 2.22. What is your OS? How are
> you running convert-ly? Does it reproduce in a terminal?
> (Try running 'convert-ly myfile.ly' there.)
> 
> Eventually this should be made a bug report to the
> bug-lilypond list (see lilypond.org/contact.html).

MacBook Pro Mavericks. I picked "Update Syntax" from the Lilypond Compile menu. 
I added a line of code in the offending file asking it to print the Python 
version. It’s 2.6.6 and was created by Apple.

Just now I ran this:

/Applications/LilyPond.app/Contents/Resources/bin/convert-ly chloris.ly and 
redirected the output into a file. Worked like a champ, and changed the version 
in the file to 2.22. Opened that file in lily pond and compiled it; also worked 
like a champ.

So I tried putting the python3 shebang line at the beginning of convert-ly.py 
but discovered that it’s already there. Then I tried putting it in the file 
lilylib.py that actually threw the error. It wasn’t already there, but adding 
it did not fix anything. Somehow the decision to use the Apple 2.6.6 has been 
made before it starts to read convert-ly.py, and nothing is going to change its 
mind about that.

I’ll go send this to the bug list right now.



As a slightly related aside, can somebody point me to an explanation of the 
line of code that is cited in the error message?

sys.stdin = codecs.getreader('utf8')(sys.stdin.detach())

My Python skills don’t reach far far enough to grok that syntax.  thanks




Scheme doesn't check for missspeeled variable names???

2021-07-20 Thread James B. Wilkinson
I fat-fingered the keyboard on my laptop and got this:

flute-notes = {
  \override BreathingSigh.Y-offset = #2.6  %% also tried 
#5.0 and some really big numbers; no effect
  7 bars of music in 4/4
}


AND I never got an error message. This seems to mean that Scheme has no checks 
for valid identifiers. I’m reminded of a program we had back in the early 
1970’s; it printed an alphabetized list of all the identifiers in a BASIC 
program. If you’d misspelled something it jumped right out at you. Something 
like that would have saved me about two hours tonight.

sigh (as it were)


Lilypond's English Horn MIDI instrument is non-transposing?

2022-01-13 Thread James B. Wilkinson
I'm working on an arrangement fordable-reed quartet. Here's the score block:

\score
{
  \new StaffGroup
   <<
 \new Staff = "oboe1" \with { instrumentName = "oboe1" midiInstrument = 
"oboe" }
   { \clef "treble" \soprano }
 \new Staff = "oboe2" \with { instrumentName = "oboe2" midiInstrument = 
"oboe" }
   { \clef "treble" \alto }
 \new Staff = "EngHrn" \with { instrumentName = "enghrn" midiInstrument = 
"english horn" }   %"english horn"
   { \clef "treble" \transpose f c \tenor }   %the correct 
transposition for EH sounds terrible
%   { \clef "treble" \transpose c c, \tenor }  % temporarily down one 
octave; sounds fine
 \new Staff = "bassoon" \with { instrumentName = "bassoon" midiInstrument = 
"bassoon" }
   { \clef "bass" \bass }
   >>
  \layout { \context { \Staff \consists "Ambitus_engraver" } }  
  \midi {  \tempo 4 = 80   }
}


If I make it with the English horn part correctly transposed, the MIDI sounds 
terrible. If I make it with the English horn part untransposed, it sounds fine. 
My conclusion is that the midiInstrument "english horn" reads its part in C 
rather than in F. Shouldn't it play the notes that a real English horn would?


thanks


Re: Lilypond's English Horn MIDI instrument is non-transposing?

2022-01-14 Thread James B. Wilkinson


> On Jan 14, 2022, at 6:37 PM, Valentin Petzel  wrote:
> 
> ...
> Lilypond uses these GM names, which makes Lilypond a somewhat GM compatible 
> source. This means that as long as we use a GM compatible synth everything 
> should have the right sound.


I was using VLC to play it. Does this mean that VLC is not GM compatible? I was 
having to compile it with the tenor voice not transposed in order to get the 
MIDI file to play the correct notes. I had to compile again with the tenor 
voice transposed to get the notes to print correctly on the page.

David pointed me to the \transposition keyword, and adding "\transposition f" 
to the "\with" clause of the English horn staff fixed the problem. Now I get 
correct printed output and a correct MICI file from a single compilation. But 
now I have another question making two questions in this post:
1) why do I need  "\transpose f c \tenor" instead of "\transpose f c' \tenor"? 
If I use c' it goes an octave too high.
2) Is VLC GM compatible.

In case it helps you to know this, the project started as notes typed in from a 
SATB printed page, i.e. all in C. Changing to double-reed instruments including 
English horn is the reason for the need to transpose the tenor part; I didn't 
retype those notes in the correct key.


thanks again guys

\score
{
  \new StaffGroup
   <<
 \new Staff = "oboe1" \with { instrumentName = "oboe1" midiInstrument = 
"oboe" }
   { \clef "treble" \soprano }
 \new Staff = "oboe2" \with { instrumentName = "oboe2" midiInstrument = 
"oboe" }
   { \clef "treble" \alto }

 \new Staff = "EngHrn" \with { instrumentName = "enghrn" midiInstrument = 
"english horn" \transposition f }
 % get the MIDI in the correct key; pitch is 
absolute here: written c' sounds as f
   { \clef "treble" \transpose f c \tenor }   % and get the score in 
the correct key (why c and not c'?)

 \new Staff = "bassoon" \with { instrumentName = "bassoon" midiInstrument = 
"bassoon" }
   { \clef "bass" \bass }
   >>
  \layout { \context { \Staff \consists "Ambitus_engraver" } }  
  \midi {  \tempo 4 = 80   }
}



optical recognition for input

2022-01-15 Thread James B. Wilkinson
I'm looking at getting an OCR program to recognize scans in pdf files and 
create MusicXML files representing the contents. I would then use the 
musicxml2ly or perhaps some other script to translate the MusicXML to Lilypond 
files, I imagine that some of you are already doing this, and I wonder whether 
you could give me or point me to some tips as to what software to use and how 
to go about it.

Using MIDI files as the intermediate representation may also be a possibility. 
I'd appreciate hearing about that, too.


thanks


Re: optical recognition for input

2022-01-17 Thread James B. Wilkinson



> On Jan 15, 2022, at 4:56 AM, Adam M. Griggs  wrote:
> 
> Try Audiveris.

I downloaded the stuff from git but had failure at the build step. I looked for 
a mail group like this one for Audiveris but didn't find anything. Can somebody 
point me to a source of help building Audiveris?

thanks




Re: optical recognition for input

2022-01-17 Thread James B. Wilkinson



> On Jan 17, 2022, at 5:04 PM, Adam M. Griggs  wrote:
> 
> I haven't tried building from development branch, but from experience, the 
> stable branch only works with JRE 11, not "11 or greater."

Yes, I did use the default stable branch.

> I use MX Linux and JRE 11 is readily available. Not sure about other 
> operating systems.


Yes, I was using 12 because that seemed to be the one Oracle's website wanted 
to send me. I'll back up to 11.

I did look in the expanded src tree and found a blue million *.java files. I 
assume that the build process needs to compile all of them. Won't I need the 
JDK for that and not just the JRE? I'm not sure; been a while since I did any 
Java.


thanks, I'll have a go