openlilylib / lilypond-export

LilyPond export API to write Humdrum, MusicXML and more
GNU General Public License v3.0
22 stars 8 forks source link

Scheme error on stem direction parsing #28

Open Beacon515L opened 2 years ago

Beacon515L commented 2 years ago

I have checked out both oll-core and lilypond-export to my home directory (/home/beacon515l) and attempted to engrave the examples. I am using Lilypond 2.22.0 and on Arch Linux x64.

Viriditas% lilypond -I /home/beacon515l export-example.ly
GNU LilyPond 2.22.0
Processing 'export-example.ly'
Parsing...
/home/beacon515l/oll-core/internal/init.ily:80:2:

oll-core: library infrastructure successfully loaded.

#
 (oll:log "oll-core: library infrastructure successfully loaded.")
Interpreting music...
init exportHumdrum: "export-example.krn"
init Staff 1
init Voice 1/1 (1)
init Voice 1/2 (2)
init Staff 2
init Voice 1/ (3)
init Voice 2/ (1)
init Voice 2/mel (2)/home/beacon515l/lilypond-export/api.scm:278:48: In expression (ly:grob-properties grob):
/home/beacon515l/lilypond-export/api.scm:278:48: Unbound variable: ly:grob-properties
Viriditas% lilypond -I /home/beacon515l export-example2.ly
GNU LilyPond 2.22.0
Processing 'export-example2.ly'
Parsing...
/home/beacon515l/oll-core/internal/init.ily:80:2:

oll-core: library infrastructure successfully loaded.

#
 (oll:log "oll-core: library infrastructure successfully loaded.")
Interpreting music...
init exportMusicXML: "export-example2.xml"
init Staff 1
init Voice 1/ (1)
init Staff 2
init Voice 2/ (1)/home/beacon515l/lilypond-export/api.scm:278:48: In expression (ly:grob-properties grob):
/home/beacon515l/lilypond-export/api.scm:278:48: Unbound variable: ly:grob-properties

The error in both cases appears to implicate this line.

Error is identical regardless of what input I provide, assuming it is valid, otherwise engraves, and invokes the library correctly.

reckel-jm commented 1 year ago

I can confirm this issue. For example with this Amazing Grace example:

\version "2.22.0"
\language "deutsch"

\include "predefined-guitar-fretboards.ly"
\include "oll-core/package.ily"
\loadPackage lilypond-export

opts.exporter = #exportMusicXML

\header {
  title = "Amazing Grace"
  composer = "John Newton"
  % Voreingestellte LilyPond-Tagline entfernen
  tagline = ##f
}

\paper {
  #(set-paper-size "a5")
  system-system-spacing = #'((padding . 5) (basic-distance . 10))
  indent = 0
}

\layout {

  \context {
    \Voice
    \consists "Melody_engraver"
    \override Stem #'neutral-direction = #'()
  }

}

global = {
  \key f \major
  \numericTimeSignature
  \time 3/4
  \partial 4
  \tempo 4=90
  \germanChords
}

chordNames = \chordmode {
  \global
  % Akkorde folgen hier.
  \skip 4 | f2. | f:7 | b | f | d:m | f | c | c | f | f:7 | b | f | d:m | b2 c4 | f2.
}

sopranoVoice = \relative c' {
  \global
  \dynamicUp
  % Die Noten folgen hier.
  c4 | f2 a8( f) | a2 g4 | f2 d4 | c2 \breathe c4 | f2 a8( f) | a2 g4 | c2.~ | c2 \breathe a4 |
  c2 a8( f ) | a2 g4 | f2 d4 | c2 \breathe c4 | f2 a8( f ) | a2 g4 | f2. \bar "|." 
}

verseOne = \lyricmode {
  % Liedtext folgt hier.
  \set stanza = #"1."
  A -- ma -- zing Grace, how sweet the sound,
  that saved a wretch like me!
  I once was lost, but now I'm found,
  was blind, but now I see.
}

verseTwo = \lyricmode {
  % Liedtext folgt hier.
  \set stanza = #"2."
  'Twas grace that taught my heart to fear,
  And grace my fears re -- lieved;
  How pre -- cious did that grace ap -- pear,
  The hour I first be -- lieved! 
}

verseThree = \lyricmode {
  % Liedtext folgt hier.
  \set stanza = #"3."
  Through ma -- ny dan -- gers, toils and snares,
  I have al -- rea -- dy come;
  'Twas grace that brought me safe thus far,
  And grace will lead me home. 
}

verseFour = \lyricmode {
  % Liedtext folgt hier.
  \set stanza = #"4."
  The Lord has pro -- mised good to me,
  His word my hope se -- cures;
  He will my shield and por -- tion be,
  As long as life en -- dures. 
}

chordsPart = <<
  \new ChordNames \chordNames
  \new FretBoards \chordNames
>>

sopranoVoicePart = \new Staff \with {
  instrumentName = ""
  midiInstrument = "acoustic grand"
} { \sopranoVoice }
\addlyrics { \verseOne }
\addlyrics { \verseTwo }
\addlyrics { \verseThree }
\addlyrics { \verseFour }

\score {
  <<
    \chordsPart
    \sopranoVoicePart
  >>
  \layout { \FileExport #opts }
  \midi { }
}