> Maybe: 
> 
> mymusic = { 
>   \time 4/4 
>   \repeat volta 2 { 
>     g'1 
>     \barNumberCheck #2 
>   } 
>   c'1 
>   \displayMusic 
>   \barNumberCheck #3 
> } 
> 
> \book { 
>   \score { 
>      \mymusic 
>      \layout {} 
>   } 
>   \score { 
>      { \unfoldRepeats \set Score.currentBarNumber = #1 \mymusic } 
>      \midi {} 
>   } 
> } 
> 
> No idea why it's needed or why it works at all. 

Excellent!

Because my midi() output was of a piano part, I had to reset the 
currentBarNumber to #1 once for the right hand and once for the left.

It looks as though \unfoldRepeats “knows” that it’s going through the same bars 
more than once and copes with this, but can’t deal with currentBarNumber being 
wrong from the start.

What’s odd is that the creation of several PDFs that precedes the midi() 
section doesn’t fall over with the second \book is created - presumably with 
currentBarNumber set to the end of the piece.

Many thanks,

Michael

> 
> Cheers, 
>   Harm 
> 
> _______________________________________________ 
> lilypond-user mailing list 
> [hidden email] <x-msg://52/user/SendEmail.jtp?type=node&node=170996&i=1> 
> https://lists.gnu.org/mailman/listinfo/lilypond-user 
> <https://lists.gnu.org/mailman/listinfo/lilypond-user>
> 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://lilypond.1069038.n5.nabble.com/Need-to-suppress-bar-number-checking-in-midi-block-tp16654p170996.html
>  
> <http://lilypond.1069038.n5.nabble.com/Need-to-suppress-bar-number-checking-in-midi-block-tp16654p170996.html>
> To unsubscribe from Need to suppress bar number checking in midi block, click 
> here 
> <http://lilypond.1069038.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=16654&code=aGVuZHJ5Lm1pY2hhZWxAZ21haWwuY29tfDE2NjU0fC0yODI4OTE5NDQ=>.
> NAML 
> <http://lilypond.1069038.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>





--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Need-to-suppress-bar-number-checking-in-midi-block-tp16654p171019.html
Sent from the User mailing list archive at Nabble.com.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to