Closed tomas0430 closed 2 years ago
Does it work directly in nvim with :!lilypond %
?
Yes. It does compile but somehow it puts compiled files in home directory but not in the working one. :!lilypond %
:!lilypond Documents/lessons/confirmation/confirmation_Eb_with_markups_chords_jazz_style.ly
Processing Documents/lessons/confirmation/confirmation_Eb_with_markups_chords_jazz_style.ly' Parsing... Interpreting music...[8][16][24] Preprocessing graphical objects... Interpreting music... MIDI output to
confirmation_Eb_with_markups_chords_jazz_style.midi'...
Finding the ideal number of pages...
Fitting music on 2 or 3 pages...
Drawing systems...
Converting to `confirmation_Eb_with_markups_chords_jazz_style.pdf
'...
Success: compilation successfully completed
I'm sorry I don't know why... Is it a unix system ?
it's manjaro Linux sway edition.up to date.
What is the output of :echo b:nlvs_makeprg
?
E121: Undefined variable: b:nvls_makeprg
Looks like ftplugin is not loaded... and :echo g:loaded_nvls
?
the output is: v:true
how do I load ftplugin ?
It's already loaded. Do you have multiple buffers open ?
I think I can reproduce this bug when severals .ly files are opened in nvim. Is that right ?
it's a single buffer. my nvim is with plugins neovim-from-scratch. it's single nvim instance one buffer.
I've just try with https://github.com/LunarVim/Neovim-from-scratch, it works. Can you try with a minimal nvim config ?
It's working.Reinstalled neovim and plugins and it's working now.Thanks
Ok good ! I'm curious to know what went wrong... If you find it, tell me !
if i open lilypond file from one location but lilypond file is in different location then it puts compiled files in location where I started nvim instance but not where the actual lilypond file is and be course of that preview and playback don't work course compiled files are not where the actual lilypond file is.Sorry for confusion.
Ah ok !! It's fixed now for .ly files, I need to do the same for .tex files tomorrow
'nvim to/some/lilypondfile' works now but 'nvim lilypondfile' stoped working .:(
Oh sorry ! it was too late ;-) It should work now
'nvim to/some/lilypondfile' works as expected but 'nvim lilypondfile' compiles only midi file.no pdf file.
Weird...it should work ! Can you try with :lilypond -o%:p:r:S %:p:S
?
Output :
:!lilypond -o'/home/tomasm/confirmation_intrument_test' '/home/tomasm/confirmation_intrument_test.ly'
Processing /home/tomasm/confirmation_intrument_test.ly' Parsing... Interpreting music... MIDI output to
/home/tomasm/confirmation_intrument_test.midi'...
Success: compilation successfully completed
Do you have \layout {}
inside \score
section ?
yes I do
\score { \new Staff { \set Staff.midiInstrument = "alto sax" << \melody \harmony
} \midi {} } \layout { \context { \Score %% the following line necessary if you want to put more %% measures to a line than Lily wants to allow \override NonMusicalPaperColumn #'line-break-permission = ##f \consists #line-break-every-nth-engraver } } \midi { }
Can you send your complete code please ? Surrounded by ` symbols ? I see two \midi {}
sections in the code you've just sent, and no closing brackets
compilation works if i compile the lilypond file 'nvim /dir/lilpondfile' but if i 'nvim lilypondfile' the same file it only gives a midi file.
compilation works if i compile the lilypond file 'nvim /dir/lilpondfile' but if i 'nvim lilypondfile' the same file it only gives a midi file.
sorry my mistake it doesn't work eather way.
`\version "2.22.2"
(lambda (context) (make-engraver (acknowledgers ((paper-column-interface engraver grob source-engraver) (let ((current-bar (ly:context-property context 'currentBarNumber))) (if (= (remainder current-bar bars-per-line) 1) (if (eq? #t (ly:grob-property grob 'non-musical)) (set! (ly:grob-property grob 'line-break-permission) 'force) (set! (ly:grob-property grob 'line-break-permission) '())))))))))
\paper {
(set-global-fonts
; #:music "lilyjazz" ; default
; #:brace "lilyjazz" ; default
; #:roman "lilyjazz-text"
; #:sans "lilyjazz-text"
; #:typewriter "lilyjazz-text"
; ; unnecessary if the staff size is default
; #:factor (/ staff-height pt 21)
))
}
\header {
title = \markup {
\fontsize #4
"Confirmation"
}
subtitle = "By Charlie Parker"
tagline = \markup {
\column {
"Copyright © 2022 Tomas Malajevas. All Rights Reserved."
}
}
}
twigle = ^\markup {
\bold
\fontsize #2
~
}
\pointAndClickOn
melody = \relative c' \transpose c a' { \tempo 4 = 208 a8-"(4-bar intro)" c'4 a8 bes a \tuplet 3/2 {e f fis}| g d' bes\twigle g a cis4 g8| r f r4 r r8 a| g bes a\twigle g r f4 bes8| b bes aes f bes aes~ aes4| r8 c' bes\twigle g fis a d b~| b4 e'8 a r4 r8 es'16 d'| des'8 f g e r c'4. \bar "||" a4 r8 f \tuplet 3/2 { bes a aes} g a| f16 g es8 r4 r8 cis4 g8~| g [f~] f r8 r4 r8 a| g bes a\twigle g f des f f~| f aes bes f aes bes r4| r8 es g bes a\twigle fis r4| g8 bes \tuplet 3/2 {a16 bes a} g8 c' aes a f| r2 r8 d'4. \bar "||" c'4 r16 g es c b8 g4 g8| \tuplet 3/2 {bes c' bes} g es aes ges b, f| a f a g~ g4. g8| r2 r4 r8 bes| des'16 bes aes a c' bes ges8~ ges aes f e| es aes aes4 aes8 aes~ aes ges16 e| \tuplet 3/2 {f16 aes c'} es'8~ es' d'16 c' des' bes r8 r4| r8 g des f aes e des c \bar "||" r8 c'4. bes8 a \tuplet 3/2 { e f fis}| g d' bes\twigle g a cis r g| r f r4 r r8 a| g bes a\twigle g r f4 bes8| b bes aes\twigle f bes aes~ aes4| r8 c' bes [aes] a cis d f~| f d f a r f~ f [d]| f4 f b, e8 g \bar "||" f es d des c bes, a, a| bes [e~] e d des bes g aes| a [f] d r r2| r8 cis \tuplet 6/4 {d16 f g a c' d'} f'8 es' d' c'| bes c'16 bes aes8 f g f r4| r8 \tuplet 3/2 {bes16 a g} ges8 a, c es c cis| d c \tuplet 3/2 {b, d f} a f d bes,| f4 g8 aes r \tuplet 3/2 {e16 d c} bes,8 g \bar "||" r e16 f d e c8~ c4 r| r16 es e fis g ges e cis d b, d b, des e g a| bes a g f e d cis d e cis d e f g a bes| c' bes a g f e es r r2| r4 r8 cis d f16 a c'8 a| bes c'16 bes a8 g ges es c cis| d bes, g, a, c a e f| \tuplet 3/2 {g16 a g} f8 d b, c bes, a,16 c es g \bar "||" d'8 c' d' c' r4 r8 \tuplet 3/2 {d'16 c' bes}| g8 es c bes, a, ges16 f es8 e| f es \tuplet 3/2 {d f a} c' bes a bes| d' f'~ f'2 r4| r4 r8 c'16 es' des'8 c' bes ges| es bes, des bes, c f~ f [c]| \tuplet 3/2 {aes16 bes aes} f8 c aes, bes,2| r8 fis \tuplet 3/2 {g bes d'} f'4 e'8 c' \bar "||" r4 r8 bes a f d c| \tuplet 3/2 {fis g fis} e d des bes g aes| a c d es~ es2| r4 r8 f'~ f'4 aes8 f \bar "||" g f des b, c bes, a, g,| ges, a, c es d bes, g, a,| c a, \tuplet 3/2 {bes, d f} \tuplet 3/2 {a bes b} c' bes| a4 r8 c e g~ g d16 e \bar "||" f4. c8~ c4 r4| r r8 es16 e \tuplet 3/2 {fis8 g fis} e d| des bes g gis a aes g ges| f e es g d c f es| d4 r e8 e16 es d8 des| c bes, a, g, ges, a, c e~| e es16 d des8 b,16 des~ des4 r| r8 a~ a aes16 g ges8 d \tuplet 3/2 {bes,16 c bes,} g,8 \bar "||" d bes, g, a, c a r4| r2 r4 bes16 [a] \tuplet 3/2 {aes g ges}| f16 e es d e cis d e f4 r4| r 8 c \tuplet 5/4 {es16 g bes c' d'} f' e' es' r d' des' c' b| bes a c' a bes f f r r4 r8 \tuplet 3/2 {bes16 a g}| ges8 a, c es c cis d bes,| g, a, bes, b, c4 r| r2 c'4 d'8 es' \bar "||" r g c' es' d' c' bes g| a c' es' ges' f' es' d' c'| bes a c' a bes g es c| d f~ f2 r4| r8 \tuplet 3/2 {f'16 es' des'} bes8 ges es bes, des bes,| c [e]~ e b, b bes \tuplet 3/2 {a16 b a} ges8| e c \tuplet 3/2 { aes16 bes aes} ges8 f des bes, aes,| \tuplet 3/2 {g16 aes g} f8 e g, bes, des c bes, \bar "||" \tuplet 3/2 {a,8 c g} f c d f~ f4| d4 r8 e16 g \tuplet 3/2 {bes8 c' bes} a g| f c d es~ es2| r2 r8 aes g f| r c' bes [aes~] \tuplet 3/2 {aes16 bes aes} f8 d c| bes a16 g fis8 a, c es c cis| d bes, g, a, c a e f| \tuplet 3/2 {g16 a g} f8 des b, c bes, \tuplet 3/2 {c e g} \bar "||" \tuplet 3/2 {f4 c bes,} a,2 \bar "||" }
harmony = \transpose c a \chords { \set minorChordModifier = \markup { "-" } f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7| bes1:7 |a2:m d2:7 |g1:7 |g2:m c2:7| f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7| bes1:7 |a2:m d2:7 |g2:m c2:7|f1 | c1:m |c2:m f2:7 |bes1 |bes1 | es1:m |aes1:7 |des1 |g2:m c2:7| f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7| bes1:7 |a2:m d2:7 |g2:m c2:7|f1 |
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g1:7 |g2:m c2:7|
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g2:m c2:7|f1 |
c1:m |c2:m f2:7 |bes1 |bes1 |
es1:m |aes1:7 |des1 |g2:m c2:7|
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g2:m c2:7|f1 |
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g1:7 |g2:m c2:7|
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g2:m c2:7|f1 |
c1:m |c2:m f2:7 |bes1 |bes1 |
es1:m |aes1:7 |des1 |g2:m c2:7|
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g2:m c2:7|f1 |
f1 |
}
\score { \new Staff { \set Staff.midiInstrument = "alto sax" << \melody \harmony >> } \midi {} } \layout { \context { \Score %% the following line necessary if you want to put more %% measures to a line than Lily wants to allow \override NonMusicalPaperColumn #'line-break-permission = ##f \consists #line-break-every-nth-engraver }`
I love Charlie Parker ! You must add a \layout {}
section inside \score
like this :
\version "2.22.2"
#(define bars-per-line 4)
#(define line-break-every-nth-engraver
(lambda (context)
(make-engraver
(acknowledgers ((paper-column-interface engraver grob
source-engraver)
(let ((current-bar (ly:context-property context 'currentBarNumber)))
(if (= (remainder current-bar bars-per-line) 1)
(if (eq? #t (ly:grob-property grob 'non-musical))
(set! (ly:grob-property grob 'line-break-permission) 'force)
(set! (ly:grob-property grob 'line-break-permission) '())))))))))
\paper {
#(define fonts
(set-global-fonts
; #:music "lilyjazz" ; default
; #:brace "lilyjazz" ; default
; #:roman "lilyjazz-text"
; #:sans "lilyjazz-text"
; #:typewriter "lilyjazz-text"
; ; unnecessary if the staff size is default
; #:factor (/ staff-height pt 21)
))
}
\header {
title = \markup {
\fontsize #4
"Confirmation"
}
subtitle = "By Charlie Parker"
tagline = \markup {
\column {
"Copyright © 2022 Tomas Malajevas. All Rights Reserved."
}
}
}
twigle = ^\markup {
\bold
\fontsize #2
~
}
\pointAndClickOn
melody = \relative c' \transpose c a' {
\tempo 4 = 208
a8-"(4-bar intro)" c'4 a8 bes a \tuplet 3/2 {e f fis}|
g d' bes\twigle g a cis4 g8|
r f r4 r r8 a|
g bes a\twigle g r f4 bes8|
b bes aes f bes aes~ aes4|
r8 c' bes\twigle g fis a d b~|
b4 e'8 a r4 r8 es'16 d'|
des'8 f g e r c'4. \bar "||"
a4 r8 f \tuplet 3/2 { bes a aes} g a|
f16 g es8 r4 r8 cis4 g8~|
g [f~] f r8 r4 r8 a|
g bes a\twigle g f des f f~|
f aes bes f aes bes r4|
r8 es g bes a\twigle fis r4|
g8 bes \tuplet 3/2 {a16 bes a} g8 c' aes a f|
r2 r8 d'4. \bar "||"
c'4 r16 g es c b8 g4 g8|
\tuplet 3/2 {bes c' bes} g es aes ges b, f|
a f a g~ g4. g8|
r2 r4 r8 bes|
des'16 bes aes a c' bes ges8~ ges aes f e|
es aes aes4 aes8 aes~ aes ges16 e|
\tuplet 3/2 {f16 aes c'} es'8~ es' d'16 c' des' bes r8 r4|
r8 g des f aes e des c \bar "||"
r8 c'4. bes8 a \tuplet 3/2 { e f fis}|
g d' bes\twigle g a cis r g|
r f r4 r r8 a|
g bes a\twigle g r f4 bes8|
b bes aes\twigle f bes aes~ aes4|
r8 c' bes [aes] a cis d f~|
f d f a r f~ f [d]|
f4 f b, e8 g \bar "||"
f es d des c bes, a, a|
bes [e~] e d des bes g aes|
a [f] d r r2|
r8 cis \tuplet 6/4 {d16 f g a c' d'} f'8 es' d' c'|
bes c'16 bes aes8 f g f r4|
r8 \tuplet 3/2 {bes16 a g} ges8 a, c es c cis|
d c \tuplet 3/2 {b, d f} a f d bes,|
f4 g8 aes r \tuplet 3/2 {e16 d c} bes,8 g \bar "||"
r e16 f d e c8~ c4 r|
r16 es e fis g ges e cis d b, d b, des e g a|
bes a g f e d cis d e cis d e f g a bes|
c' bes a g f e es r r2|
r4 r8 cis d f16 a c'8 a|
bes c'16 bes a8 g ges es c cis|
d bes, g, a, c a e f|
\tuplet 3/2 {g16 a g} f8 d b, c bes, a,16 c es g \bar "||"
d'8 c' d' c' r4 r8 \tuplet 3/2 {d'16 c' bes}|
g8 es c bes, a, ges16 f es8 e|
f es \tuplet 3/2 {d f a} c' bes a bes|
d' f'~ f'2 r4|
r4 r8 c'16 es' des'8 c' bes ges|
es bes, des bes, c f~ f [c]|
\tuplet 3/2 {aes16 bes aes} f8 c aes, bes,2|
r8 fis \tuplet 3/2 {g bes d'} f'4 e'8 c' \bar "||"
r4 r8 bes a f d c|
\tuplet 3/2 {fis g fis} e d des bes g aes|
a c d es~ es2|
r4 r8 f'~ f'4 aes8 f \bar "||"
g f des b, c bes, a, g,|
ges, a, c es d bes, g, a,|
c a, \tuplet 3/2 {bes, d f} \tuplet 3/2 {a bes b} c' bes|
a4 r8 c e g~ g d16 e \bar "||"
f4. c8~ c4 r4|
r r8 es16 e \tuplet 3/2 {fis8 g fis} e d|
des bes g gis a aes g ges|
f e es g d c f es|
d4 r e8 e16 es d8 des|
c bes, a, g, ges, a, c e~|
e es16 d des8 b,16 des~ des4 r|
r8 a~ a aes16 g ges8 d \tuplet 3/2 {bes,16 c bes,} g,8 \bar "||"
d bes, g, a, c a r4|
r2 r4 bes16 [a] \tuplet 3/2 {aes g ges}|
f16 e es d e cis d e f4 r4|
r 8 c \tuplet 5/4 {es16 g bes c' d'} f' e' es' r d' des' c' b|
bes a c' a bes f f r r4 r8 \tuplet 3/2 {bes16 a g}|
ges8 a, c es c cis d bes,|
g, a, bes, b, c4 r|
r2 c'4 d'8 es' \bar "||"
r g c' es' d' c' bes g|
a c' es' ges' f' es' d' c'|
bes a c' a bes g es c|
d f~ f2 r4|
r8 \tuplet 3/2 {f'16 es' des'} bes8 ges es bes, des bes,|
c [e]~ e b, b bes \tuplet 3/2 {a16 b a} ges8|
e c \tuplet 3/2 { aes16 bes aes} ges8 f des bes, aes,|
\tuplet 3/2 {g16 aes g} f8 e g, bes, des c bes, \bar "||"
\tuplet 3/2 {a,8 c g} f c d f~ f4|
d4 r8 e16 g \tuplet 3/2 {bes8 c' bes} a g|
f c d es~ es2|
r2 r8 aes g f|
r c' bes [aes~] \tuplet 3/2 {aes16 bes aes} f8 d c|
bes a16 g fis8 a, c es c cis|
d bes, g, a, c a e f|
\tuplet 3/2 {g16 a g} f8 des b, c bes, \tuplet 3/2 {c e g} \bar "||"
\tuplet 3/2 {f4 c bes,} a,2 \bar "||"
}
harmony = \transpose c a \chords {
\set minorChordModifier = \markup { "-" }
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g1:7 |g2:m c2:7|
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g2:m c2:7|f1 |
c1:m |c2:m f2:7 |bes1 |bes1 |
es1:m |aes1:7 |des1 |g2:m c2:7|
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g2:m c2:7|f1 |
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g1:7 |g2:m c2:7|
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g2:m c2:7|f1 |
c1:m |c2:m f2:7 |bes1 |bes1 |
es1:m |aes1:7 |des1 |g2:m c2:7|
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g2:m c2:7|f1 |
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g1:7 |g2:m c2:7|
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g2:m c2:7|f1 |
c1:m |c2:m f2:7 |bes1 |bes1 |
es1:m |aes1:7 |des1 |g2:m c2:7|
f1 |e2:m7.5- a2:7|d2:m g2:7|c2:m f2:7|
bes1:7 |a2:m d2:7 |g2:m c2:7|f1 |
f1 |
}
\score {
\new Staff {
\set Staff.midiInstrument = "alto sax"
<<
\melody
\harmony
>>
}
\midi {}
\layout {}
}
\layout {
\context {
\Score
%% the following line necessary if you want to put more
%% measures to a line than Lily wants to allow
\override NonMusicalPaperColumn #'line-break-permission = ##f
\consists #line-break-every-nth-engraver
}
}
P.S. you can write lilypond code in markdown like this :
```lilypond
%Lilypond code
```
It's my fault.I'm newbie in lilypond. Now is ALL GOOD :D. Thanks!
It's a great work ! Maybe just switch order of \melody
and \harmony
?
i'll do that.
And remove the last \layout
section of course, I didn't made it... You can add the following lines in the new \layout {}
section :
\context {
\Score
%% the following line necessary if you want to put more
%% measures to a line than Lily wants to allow
\override NonMusicalPaperColumn #'line-break-permission = ##f
\consists #line-break-every-nth-engraver
}
Ah and maybe put the Staff.midiInstrument
directly in \melody
section like this :
melody = \new Staff { \relative c' \transpose c a' {
\set Staff.midiInstrument = "alto sax"
Thank you for advice. Is there a place on the net where you can get good basic understanding of lilypond ? lilypond.org it's overwhelming.
I like lilypond.org, there is everything ! There is also a very good community on facebook (GNU lilypond) and on the forum https://lists.gnu.org/mailman/listinfo/lilypond-user
After some research, I think it's the version of nvim that was not good : this plugin requires nvim >=0.7
Ok. I'll upgrade it through github.Thanks
Pressing or runing :LilyCmp doesn't compile a pdf file. I can only manually compile from a terminal. What should I do to enable it? Thanks for a great work!