Skip to content

Commit

Permalink
instruments: document midi bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-warchol committed Sep 7, 2013
1 parent 75b9609 commit d9ed2a0
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/predefined-instruments/README.md
Expand Up @@ -56,5 +56,8 @@ mind and want to use a different naming, you can just change
the names in `mystaffnames.ily` and all your scores that
`\include` this file will be affected!

**Known issues:** custom contexts don't work with MIDI (ugh!!).
See `midi-bug.ly`.

Note: as of 2013-09-06, this is still in very early stage
of development.
47 changes: 47 additions & 0 deletions templates/predefined-instruments/midi-bug.ly
@@ -0,0 +1,47 @@
\version "2.16.2"

\markup \justify {
Below i've defined custom contexts: SopranoStaff and SopranoVoice.
However, they don't work with midi - first i get a
\typewriter "warning: cannot find or create new `SopranoVoice'"
and ten "\lyricsto" fails, saying that it \typewriter "cannot find Voice `sop'".
I suppose that because of some Midi bug a Voice is created instead of
SopranoVoice, and then "\lyricsto" cannot find the SopranoVoice
it is supposed to find.

Without "\midi" block eveerything works fine.
}

\layout {
\context {
\ChoirStaff
\accepts "SopranoStaff"
}

\context {
\Staff
\type "Engraver_group"
\name "SopranoStaff"
\alias "Staff"

\accepts "SopranoVoice"
\defaultchild "SopranoVoice"

instrumentName = "Soprano"
}

\context {
\Voice
\name "SopranoVoice"
\alias "Voice"
}
}

\score {
<<
\new SopranoVoice = sop { c' b' a' f' }
\new Lyrics \lyricsto sop \lyricmode { la la la la }
>>
\layout { }
\midi { }
}

0 comments on commit d9ed2a0

Please sign in to comment.