Re: Gvim and lilypond and emacs
On Sat 23 Feb 2019 at 20:11:06 (+1100), Andrew Bernard wrote: > Current progress. Perhaps I have hit a bug on Debian 9, hence the bonkers > inducing behaviour. Using EDITOR has no effect. But if I set LYEDITOR to > use gvim, it nearly works. This makes no sense to me. > > Here's what I have for LYEDITOR, based on the NR: > > export LYEDITOR='gvim --remote +:%(line)s:norm%(column)s % (file)s' Here, it doesn't make any difference whether EDITOR or LYEDITOR is set to gvim. But I don't use a DE or DM, only startx and fvwm. You could try $ EDITOR=gvim¹ as that puts it about as close to the action as you can get. > This invokes gvim, but with a hard to understand error My question would be: is it an error? It looks more like a command that's looking about the place. But I'm not conversant with vim's commands. > :if !exists('+acd')||!|if haslocaldir()|cd -|lcd -|elseif getcwd() ==# > '/hom > ::1:norm3|cal foreground()|if |star|en|redr|f > > [One has to admit that is slightly cryptic.] :if !exists('+acd')||!|if haslocaldir()|cd -|lcd -|elseif getcwd() ==# '/home/david'|cd -|endif|::154:norm3|cal foreground()|if |star|en|redr|f Press ENTER or type command to continue It would appear that your version is clipped (/hom doesn't look right) and the last line is missing. When I press ENTER as instructed, the window is refreshed and the cursor is placed correctly. > Now I have never used gvim before today, so perhaps the servermorde has to > be configured somehow? $ gvim --servername GVIM $ vim --servername GVIM according to taste. (The latter runs in the xterm itself.) I've never bothered to change GVIM as foxfanfare has done. > Would anybody agree the ignoring of EDITOR is a bug? All bets are off with DEs as far as I'm concerned. AIUI there's no one place where you can set an environment variable and have it picked up under all circumstances. Hence that fact that it's normal to make .bash_profile source .bashrc, for example. ¹ "gvim" appears necessary here. Which version of vim/gvim you run is determined when you start the server, not here. If I write vim instead, I can provoke foxfanfare's "Input is not from a teminal" message, and an instance of vim tries to run in the xterm that started the viewer. When I quit the viewer, I have to type "reset" blind in order to get the xterm to work again. Cheers, David. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Bar numbers not always printed at beginning of line
On 2/23/19, Cynthia Karl wrote: > However, the 2nd line of the output of the following snippet does not get a > bar number: Indeed. It’s a known bug: https://sourceforge.net/p/testlilyissues/issues/3919/ You need to add something like this: \set Score.barNumberVisibility = #first-bar-number-invisible-save-broken-bars But you’re right, the documentation is lacking. I’ll have a look. Cheers, V. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
RE: Piano pedaling with events in both hands
Joseph, You could "unattach" the pedal from both parts and put the both in a \new Dynamics { } The pedaling would be attached to "spacers" rather than notes. Mark -Original Message- From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of Joseph Austin Sent: Saturday, February 23, 2019 10:17 AM To: lilypond-user@gnu.org Subject: Piano pedaling with events in both hands I'm working on a piano score (from a lesson book) in which the pedaling points are split between RH and LH parts. In the example measure 1, the Pedal occurs on RH quarter beats with no LH note, but in meausre 2 it occurs on LH quarter-beats with no RH note. Furthermore, I'm getting two separate pedal lines. It seems the RH and LH pedaling should be merged in a piano staff, but I don't know how to specify this. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Bar numbers not always printed at beginning of line
The first sentence of the Bar numbers subsection of section "1.2.5 Bars” states:Bar numbers are typeset by default at the start of every line except the first line.However, the 2nd line of the output of the following snippet does not get a bar number: BarNumberProblem.ly Description: Binary data ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Piano pedaling with events in both hands
I'm working on a piano score (from a lesson book) in which the pedaling points are split between RH and LH parts. In the example measure 1, the Pedal occurs on RH quarter beats with no LH note, but in meausre 2 it occurs on LH quarter-beats with no RH note. Furthermore, I'm getting two separate pedal lines. It seems the RH and LH pedaling should be merged in a piano staff, but I don't know how to specify this. PedalPositioning.ly Description: Binary data PedalPositioning.pdf Description: Adobe PDF document ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Modifying Stencil for Clef
On Sat, 2019-02-23 at 10:16 +0100, Pierre Perol-Schneider wrote: > Hi Richard, > How about: > > \version "2.18.2" > > { > c' > %\once \override Staff.ClefModifier.stencil = #ly:text- > interface::print > %\once \override Staff.ClefModifier.text = \markup \normal-text "T" > \once \override Staff.ClefModifier.stencil = > #(lambda (grob) (grob-interpret-markup grob #{ \markup "T" #})) > \clef "F_8" > c > } > Thank you - not only is this shorter but the same syntax can be used for all the grobs I have tried so I've made this the default in Denemo for the command "Change Stencil". The complete interface looks like this: You invoke "Change Stencil" and get offered a choice of grobs, once chosen you get a markup editor which takes your text and continuously compiles it using LilyPond to display what the markup will look like in a pane above your text. When satisfied the syntax above is inserted with your choice of markup and it then affects the next grob of the chosen type. Richard ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Getting point-and-click working
Hi All, I am following the same track today. Can I add a discovery, and a different issue on my Ubuntu 18.10? The discovery is that the /etc/apparmor.d/local directory exists to allow local modifications and add-ons to files in the /etc/apparmor.d directory. At the end of /etc/apparmor.d/usr.bin.evince are the following lines: # Site-specific additions and overrides. See local/README for details. #include You need to uncomment the include line out so that the local file gets taken account of. Then run apparmor_parser on the top level file. Also restart apparmor: # /etc/init.d/apparmor restart just for good measure (I am not sure if this is essential). I hope this makes sense of part of the foregoing thread. But now, for me on Ubuntu 18.10, the problem is solved but it has moved further down the track. Observing /var/log/syslog is useful for debugging this work. We get: Feb 23 23:41:30 ubu1810 kernel: [ 420.450790] audit: type=1400 audit(1550925690.952:84): apparmor="DENIED" operation="exec" profile="/usr/bin/evince" name="/home/andro/bin/lilypond-wrapper.guile" pid=3532 comm="gio-launch-desk" requested_mask="x" denied_mask="x" fsuid=1000 ouid=1000 So now you can see that the next lilypond wrapper down the line is blocked. I know very little about apparmor. Does anybody know the appropriate incantation to sort this out? Andrew On Mon, 11 Feb 2019 at 00:43, David Sumbler wrote: > Thank you all for your help in this matter. > > Today I have point-and-click working as it should, with AppArmor > apparently doing what it is supposed to do. > > What made the difference was the following: > > The Usage Manual 4.1.1 says that the lines > # For Textedit links > /usr/local/bin/lilypond-invoke-editor Cx -> sanitized_helper, > should be added to the file /etc/apparmor.d/local/usr.bin.evince . > This file did not exist, although there are several other files in that > directory, so I had created the file and put just the two lines above > in it. Unfortunately, as I reported, point-and-click didn't work for > me. > > With the difficulties I was having, yesterday I disabled AppArmor for > Evince by adding a soft link to /etc/apparmor.d/usr.bin.evince in > /etc/apparmor.d/disable/ . This is what made point-and-click work > eventually for me yesterday. > > However, following your latest emails to the list on the topic, today I > thought I would have another go. I deleted the disabling link, and ran > 'sudo apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.evince' > again. I also ran > 'sudo apparmor_parser -r -T -W /etc/apparmor.d/local/usr.bin.evince'. > I don't know whether that needed to be done or not, but I found that it > throws out a syntax error. > > So I copied the lines out of the second file and inserted them into the > main usr.bin.evince file. I then deleted > /etc/apparmor.d/local/usr.bin.evince . > > After I ran > 'sudo apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.evince'once more, I > found that point-and-click works as it should. > > I don't pretend to understand what is going on here, but in summary it > appears that if the additional lines are added to > /etc/apparmor.d/usr.bin.evince rather than to > /etc/apparmor.d/local/usr.bin.evince it all works. > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Non-integer tempo marking
Aaron Hill writes: > On 2019-02-22 11:29 pm, Martin Tarenskeen wrote: >> I tried to create it as a \markup. For MIDI output this doesn't work >> though. You could add \midi { \tempo 8 = 145 } for that. >> >> %% >> >> \score { >> { >> \tempo \markup { >> \concat { >> \smaller \general-align #Y #DOWN >> \note #"4" #1 " = 72.5" >> } >> } >> c' >> } >> >> \layout {} >> \midi { \tempo 8=145 } >> >> %% > > Should \tempo be used within a \midi block? According to a rule in > convertrules.py, it was deprecated in favor of directly setting > tempoWholesPerMinute, which supports being set to any rational number: > > > \midi { \context { \Score > tempoWholesPerMinute = #(ly:make-moment 987 29) %% ~136.138 BPM > } } > It was not "deprecated" as much as illegal syntax. > Mind you, that rule was back in 2.9.16. And mind you, a rule reversing that rule was placed in 2.15.32 as a followup to commit e995ed461610c2bb9c9cd43eaa715905b8525b95 Author: David Kastrup Date: Sun Feb 26 19:16:00 2012 +0100 Allow music with layout instructions in output definitions. This allows things like \layout { \accidentalStyle modern } or \midi { \tempo 4 = 80 } to work as intended. > And it doesn't sound like anything was actually deprecated if \tempo > still works in \midi. It wasn't deprecated, it was invalid until 2.15.32. > Regardless, it should be noted that LilyPond internally only supports > specifying an integral number of quarter notes per minute. This comes > from Tempo_performer::process_music casting the rational > tempoWholesPerMinute to an integer after multiplying by four, since > Audio_tempo::per_minute_4 is an integral type. > > If we consider the crazy value in my example above, LilyPond would end > up storing this as only 136 BPM before converting it to the value > stored in the MIDI file. The BPM logic warrants eventual revision since it hardcodes 384 MIDI clock ticks per quarter note in lily/audio-item.cc: return int (moment_to_real (m) * 384 * 4); lily/midi-walker.cc:Real (384 * 4)) + now_ticks; lily/performance.cc: midi_stream.write (Midi_header (1, tracks_, 384)); and probably other locations. > The MIDI specification allows pretty fine granularity for tempo, > letting you specify the number of microseconds per quarter note. For > 136.138 BPM, that works out to 440,729 microseconds per quarter note > whereas an exact 136 BPM is 441,176 microseconds per quarter note--a > difference of about 447 microseconds per quarter note. After 2,237 > quarter notes--roughly 16.45 minutes of music--there would be a drift > of one second. > > tl;dr: \tempo 8=145 will unfortunately not result in \tempo 4=72.5. > Depending on rounding, it would end up as either 72 or 73. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Gvim and lilypond and emacs
Only because emacs is failing me in lilypond mode - the initial cause of all this madness. I can't figure that out. Frescobaldi on Debian 9 is taking over ten seconds to position the cursor in a 60 page string quartet, and now emacs is coming up a close second. When the editors are so unresponsive, you go crazy.. For the first time in many years, I am starting to think I need use one of those Other Music Programs. Not good! Thank you for the reference to the documentation for the current master. While I am a strong proponent of using the most recent development versions always, it would never occur to me to solve this sort of problem by looking at a completely unreleased development branch as a matter of course, or even at all. Andrew On Sat, 23 Feb 2019 at 20:42, Federico Bruni wrote: > > You chose the most difficult editor to configure for point and click. > There was a very long thread on the subject recently. Check the > archives. > > > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Non-integer tempo marking
On 2019-02-22 11:29 pm, Martin Tarenskeen wrote: I tried to create it as a \markup. For MIDI output this doesn't work though. You could add \midi { \tempo 8 = 145 } for that. %% \score { { \tempo \markup { \concat { \smaller \general-align #Y #DOWN \note #"4" #1 " = 72.5" } } c' } \layout {} \midi { \tempo 8=145 } %% Should \tempo be used within a \midi block? According to a rule in convertrules.py, it was deprecated in favor of directly setting tempoWholesPerMinute, which supports being set to any rational number: \midi { \context { \Score tempoWholesPerMinute = #(ly:make-moment 987 29) %% ~136.138 BPM } } Mind you, that rule was back in 2.9.16. And it doesn't sound like anything was actually deprecated if \tempo still works in \midi. Regardless, it should be noted that LilyPond internally only supports specifying an integral number of quarter notes per minute. This comes from Tempo_performer::process_music casting the rational tempoWholesPerMinute to an integer after multiplying by four, since Audio_tempo::per_minute_4 is an integral type. If we consider the crazy value in my example above, LilyPond would end up storing this as only 136 BPM before converting it to the value stored in the MIDI file. The MIDI specification allows pretty fine granularity for tempo, letting you specify the number of microseconds per quarter note. For 136.138 BPM, that works out to 440,729 microseconds per quarter note whereas an exact 136 BPM is 441,176 microseconds per quarter note--a difference of about 447 microseconds per quarter note. After 2,237 quarter notes--roughly 16.45 minutes of music--there would be a drift of one second. tl;dr: \tempo 8=145 will unfortunately not result in \tempo 4=72.5. Depending on rounding, it would end up as either 72 or 73. -- Aaron Hill ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Gvim and lilypond and emacs
Il giorno sab 23 feb 2019 alle 10:11, Andrew Bernard ha scritto: Current progress. Perhaps I have hit a bug on Debian 9, hence the bonkers inducing behaviour. Using EDITOR has no effect. But if I set LYEDITOR to use gvim, it nearly works. This makes no sense to me. Here's what I have for LYEDITOR, based on the NR: export LYEDITOR='gvim --remote +:%(line)s:norm%(column)s % (file)s' If you read current master version of the Documentation: http://git.savannah.gnu.org/cgit/lilypond.git/tree/Documentation/usage/external.itely#n27 you can see that export LYEDITOR=gvim is enough. (I really hope a new release will be available soon) This invokes gvim, but with a hard to understand error :if !exists('+acd')||!|if haslocaldir()|cd -|lcd -|elseif getcwd() ==# '/hom ::1:norm3|cal foreground()|if |star|en|redr|f [One has to admit that is slightly cryptic.] Now I have never used gvim before today, so perhaps the servermorde has to be configured somehow? You chose the most difficult editor to configure for point and click. There was a very long thread on the subject recently. Check the archives. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Gvim and lilypond and emacs
Mysteries untangling. Kevin has been very insightful. It appears lilypond uses emacs if it finds nothing set. I never would have thought of that. Not only does this explain the behaviour, but it explains why I was going nuts as well. Next. GNOME apps like Nautilus start under Xsession, before shells and terminals and so on. You have to set environment varibales common to GNOME apps and bash in a file that cn be source early by X11, and later by bash, without sourcing .bashrc more than once. Nearly there. Andrew ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Gvim and lilypond and emacs
It's more subtle than that. LYEDITOR is heeded but EDITOR is not. I'd wager that's a bug. But the plot thickens now. Running evince from the terminal, it at least tries to use gvim via LYEDITOR. If I run the PDF from Nautilus, the GNOME file viewer, nothing happens. Somehow Nautilus is unable to see the bash environment variables. Yes, I have looged out and rebooted quite a few times. And the strangest part is that I have never consciously configured Nautilus, and furthemore, it all worked fine for emacsclient. Andrew On Sat, 23 Feb 2019 at 20:19, Hans Åberg wrote: > > > > On MacOS, I have in .basrc 'source ~/.profile', because xterm is using it, > whereas the MacOS version of it, called Terminal, is using .profile, the > latter setting the environment variables. > > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Gvim and lilypond and emacs
> On 23 Feb 2019, at 09:49, Kevin Barry wrote: > > Where are you setting EDITOR to gvim? Is it possible that you have set it > somewhere like bashrc or bash_profile that would be picked up by bash, but > maybe not by Gnome? On MacOS, I have in .basrc 'source ~/.profile', because xterm is using it, whereas the MacOS version of it, called Terminal, is using .profile, the latter setting the environment variables. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Modifying Stencil for Clef
Hi Richard, How about: \version "2.18.2" { c' %\once \override Staff.ClefModifier.stencil = #ly:text-interface::print %\once \override Staff.ClefModifier.text = \markup \normal-text "T" \once \override Staff.ClefModifier.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup "T" #})) \clef "F_8" c } Cheers, Pierre Le ven. 22 févr. 2019 à 12:50, Richard Shann a écrit : > I've been following up the idea of using markup as stencils: > > http://lilypond.org/doc/v2.18/Documentation/notation/modifying-stencils > > and have got it working for NoteHead and for Dots (which was my use- > case). But trying to generalize to more layout objects I ran into > trouble. This I expected would replace the change of clef with a "T" > but it does not: > > \version "2.18.2" > { > c' > \once \override ClefModifier.stencil = #ly:text-interface::print > \once \override ClefModifier.text = \markup{T} > \clef bass > c' > } > > Any ideas? > > Richard > > > ___ > 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: Gvim and lilypond and emacs
Current progress. Perhaps I have hit a bug on Debian 9, hence the bonkers inducing behaviour. Using EDITOR has no effect. But if I set LYEDITOR to use gvim, it nearly works. This makes no sense to me. Here's what I have for LYEDITOR, based on the NR: export LYEDITOR='gvim --remote +:%(line)s:norm%(column)s % (file)s' This invokes gvim, but with a hard to understand error :if !exists('+acd')||!|if haslocaldir()|cd -|lcd -|elseif getcwd() ==# '/hom ::1:norm3|cal foreground()|if |star|en|redr|f [One has to admit that is slightly cryptic.] Now I have never used gvim before today, so perhaps the servermorde has to be configured somehow? Would anybody agree the ignoring of EDITOR is a bug? Andrew ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Gvim and lilypond and emacs
Where are you setting EDITOR to gvim? Is it possible that you have set it somewhere like bashrc or bash_profile that would be picked up by bash, but maybe not by Gnome? I can't remember where to modify Gnome's environment so my question may be stupid. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Gvim and lilypond and emacs
Bonkers. I removed all instances of emacs from the Debian 9 system and purged my .cache directory. Lilypond-invoke-editor still insists on running emacsclient. EDITOR is set to gvim. Gvim is gvim - its not set to an alternate to emacs or anything silly like that. Syslog shows: eb 23 19:36:58 debian org.gnome.Nautilus[1370]: sh: 1: emacsclient: not found Feb 23 19:36:58 debian org.gnome.Nautilus[1370]: sh: 1: emacs: not found Feb 23 19:36:58 debian org.gnome.Nautilus[1370]: sh: 1: emacsclient: not found Feb 23 19:36:58 debian org.gnome.Nautilus[1370]: sh: 1: emacs: not found Feb 23 19:36:58 debian org.gnome.Nautilus[1370]: lilypond-invoke-editor (GNU LilyPond) 2.19.82 What does Nautilus have to do with any of this? That looks like the culprit, but it's beyond my dim wit to figure this out. [As to why emacs has started running unacceptably slowly, it jut may be an issue with emacs 27 on Debian, whose official version is 24. Just maybe.] Andrew On Sat, 23 Feb 2019 at 18:34, Andrew Bernard wrote: > Well now I am officially going nuts. I used Frescobaldi for years until it > recently slowed down to unacceptably ling editor response times (tens of > seconds to position the cursor, in only 20 pages of code). This was > discussed on the list. Not yet resolved. Needs work. > > So I happily moved over to emacs and point and click, having been an emacs > user (but not an emacs hacker) for decades. The indentation mode is a > complete failure. This has been discussed on the list for years. But that's > OK. It's other strengths outweigh that. Now, at 60 pages of string quartet > score, lilypond-mode has also slowed down to molasses-like flow rates. It > too has become unusable. [I am somewhat gobsmacked by this.] > > So I decided to go over to vim. I have used vi for decades, but the > Lilypond doco refers to gvim so I am trying that. Gvim is new to me. I > followed everything the Lilypond manual says, unset everything to do with > emacs, as far as I can tell, and no matter what I do. after several reboots > and all, clicking on a newly generated PDF brings up emacs, not a buffer in > gvim. > > I recreated the GNOME 3 desktop auxiliary file just in case. No better. > > Does anybody have a clue as to what is happening here? As far as I can see > the links in the PDF point to the generic 'textedit', not emacs. > > > Andrew > > > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user