lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selected pieces in a book


From: Pierre Perol-Schneider
Subject: Re: Selected pieces in a book
Date: Sat, 10 Oct 2015 22:50:57 +0200

Hi Jacques,

2015-10-10 21:37 GMT+02:00 Jacques Menu <address@hidden>:
Not sure wether that would be good: someone on this list proposed a tree of names, similar to that of a file system, to access parts of a whole, see attached file.

JM

Could be interesting. I'll try to see how this could help.
Anyway, here's how I'd like to do it:

\version "2.19.28"

my-first-piece = \score {
  \new Staff {
    \relative c' {
      \mark "Level 1"
      c1 d e f g a b c
    }
  }
  \header {
    labelling = #'(list level-one)
  }
}

my-second-piece = \score {
  \new Staff {
   \relative c' {
     \mark "Level 1"
     c2 d e f g a b c
   }
  }
  \header {
    labelling = #'(list level-one level-one-bis)
  }
}

my-third-piece =  \score {
  \new Staff {
    \relative c' {
      \mark "Level 2"
      c4 d e f g a b c
    }
  }
  \header {
    labelling = #'(list level-two level-one-bis)
  }
}

my-fourth-piece =  \score {
  \new Staff {
    \relative c' {
      \mark "Level 2"
      c8 d e f g a b c
    }
  }
  \header {
    labelling = #'(list level-two level-one-bis level-one-ter)
  }
}

#(define (print-by-labelling lst)
   ;;TODO: everything...
     (map add-score (map print-piece lst))))

%% Select pieces by level:
\book {
  \bookpart {
    %% Select only 'level 1' pieces:
    #(print-by-labelling level-one)
    %}
    \header {
      title = "Level I"
    }
  }
  \bookpart {
    %% Select only 'level 2' pieces:
    #(print-by-labelling level-two)
    %}
    \header {
      title = "Level II"
    }
  }
  \bookpart {
    %% Select only 'essai' pieces:
    #(print-by-labelling level-one-bis)
    %}
    \header {
      title = "Level I (Bis)"
    }
  }
}


Pierre
 
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]