Skip to content

Commit

Permalink
Added time-signature context.
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorbaca committed Jun 22, 2024
1 parent 6e1c641 commit 517369c
Show file tree
Hide file tree
Showing 49 changed files with 5,511 additions and 1,026 deletions.
2 changes: 1 addition & 1 deletion faberge/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def make_eh_trill_rhythm(

def make_empty_score():
tag = baca.helpers.function_name(inspect.currentframe())
global_context = baca.score.make_global_context()
global_context = baca.score.make_global_context(make_time_signatures_context=True)
flute_music_voice = abjad.Voice(name="Flute.Music", tag=tag)
flute_music_staff = abjad.Staff(
[flute_music_voice],
Expand Down
3 changes: 2 additions & 1 deletion faberge/sections/01/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"Score",
"GlobalContext",
"Skips",
"TimeSignatures",
"MusicContext",
"WindSectionStaffGroup",
"Flute.Staff",
Expand Down Expand Up @@ -339,7 +340,7 @@
value="100",
),
baca.Memento(
context="Skips",
context="TimeSignatures",
edition=None,
manifest=None,
prototype="abjad.TimeSignature",
Expand Down
101 changes: 85 additions & 16 deletions faberge/sections/01/music.ily
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
number.1.Skips = {

% [Skips measure 1]
%! EXPLICIT_TIME_SIGNATURE_COLOR
\baca-time-signature-color #blue
%! EXPLICIT_TIME_SIGNATURE
\time 3/4
s1 * 3/4
%! EXPLICIT_METRONOME_MARK_WITH_COLOR
- \baca-invisible-line
Expand Down Expand Up @@ -38,10 +34,6 @@ number.1.Skips = {
\bacaStartTextSpanSNM

% [Skips measure 2]
%! EXPLICIT_TIME_SIGNATURE_COLOR
\baca-time-signature-color #blue
%! EXPLICIT_TIME_SIGNATURE
\time 1/4
s1 * 1/4
%! CLOCK_TIME
%@% \bacaStopTextSpanCT
Expand All @@ -63,10 +55,6 @@ number.1.Skips = {
%@% \bacaStartTextSpanMN

% [Skips measure 3]
%! EXPLICIT_TIME_SIGNATURE_COLOR
\baca-time-signature-color #blue
%! EXPLICIT_TIME_SIGNATURE
\time 4/4
s1 * 4/4
%! CLOCK_TIME
%@% \bacaStopTextSpanCT
Expand Down Expand Up @@ -94,10 +82,6 @@ number.1.Skips = {
\bacaStartTextSpanSNM

% [Skips measure 4]
%! EXPLICIT_TIME_SIGNATURE_COLOR
\baca-time-signature-color #blue
%! EXPLICIT_TIME_SIGNATURE
\time 1/4
s1 * 1/4
%! CLOCK_TIME
%@% \bacaStopTextSpanCT
Expand Down Expand Up @@ -145,6 +129,91 @@ number.1.Skips = {
}


number.1.TimeSignatures = {

% [TimeSignatures measure 1]
%! EXPLICIT_TIME_SIGNATURE_COLOR
\baca-time-signature-color #blue
%! EXPLICIT_TIME_SIGNATURE
\time 3/4
s1 * 3/4
%! LOCAL_MEASURE_NUMBER
- \baca-start-lmn-left-only "1"
%! LOCAL_MEASURE_NUMBER
\bacaStartTextSpanLMN
%! MEASURE_NUMBER
%@% - \baca-start-mn-left-only "1"
%! MEASURE_NUMBER
%@% \bacaStartTextSpanMN

% [TimeSignatures measure 2]
%! EXPLICIT_TIME_SIGNATURE_COLOR
\baca-time-signature-color #blue
%! EXPLICIT_TIME_SIGNATURE
\time 1/4
s1 * 1/4
%! LOCAL_MEASURE_NUMBER
\bacaStopTextSpanLMN
%! MEASURE_NUMBER
%@% \bacaStopTextSpanMN
%! LOCAL_MEASURE_NUMBER
- \baca-start-lmn-left-only "2"
%! LOCAL_MEASURE_NUMBER
\bacaStartTextSpanLMN
%! MEASURE_NUMBER
%@% - \baca-start-mn-left-only "2"
%! MEASURE_NUMBER
%@% \bacaStartTextSpanMN

% [TimeSignatures measure 3]
%! EXPLICIT_TIME_SIGNATURE_COLOR
\baca-time-signature-color #blue
%! EXPLICIT_TIME_SIGNATURE
\time 4/4
s1 * 4/4
%! LOCAL_MEASURE_NUMBER
\bacaStopTextSpanLMN
%! MEASURE_NUMBER
%@% \bacaStopTextSpanMN
%! LOCAL_MEASURE_NUMBER
- \baca-start-lmn-left-only "3"
%! LOCAL_MEASURE_NUMBER
\bacaStartTextSpanLMN
%! MEASURE_NUMBER
%@% - \baca-start-mn-left-only "3"
%! MEASURE_NUMBER
%@% \bacaStartTextSpanMN

% [TimeSignatures measure 4]
%! EXPLICIT_TIME_SIGNATURE_COLOR
\baca-time-signature-color #blue
%! EXPLICIT_TIME_SIGNATURE
\time 1/4
s1 * 1/4
%! LOCAL_MEASURE_NUMBER
\bacaStopTextSpanLMN
%! MEASURE_NUMBER
%@% \bacaStopTextSpanMN
%! LOCAL_MEASURE_NUMBER
- \baca-start-lmn-left-only "4"
%! LOCAL_MEASURE_NUMBER
\bacaStartTextSpanLMN
%! MEASURE_NUMBER
%@% - \baca-start-mn-left-only "4"
%! MEASURE_NUMBER
%@% \bacaStartTextSpanMN

% [anchor skip]
%! ANCHOR_SKIP
s1 * 1/4
%! LOCAL_MEASURE_NUMBER
\bacaStopTextSpanLMN
%! MEASURE_NUMBER
%@% \bacaStopTextSpanMN

}


number.1.Rests = {

% [Rests measure 1]
Expand Down
3 changes: 3 additions & 0 deletions faberge/sections/01/music.ly
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
\context GlobalSkips = "Skips"
{ \number.1.Skips }

\context GlobalSkips = "TimeSignatures"
{ \number.1.TimeSignatures }

>>

\context MusicContext = "MusicContext"
Expand Down
3 changes: 2 additions & 1 deletion faberge/sections/02/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"Score",
"GlobalContext",
"Skips",
"TimeSignatures",
"MusicContext",
"WindSectionStaffGroup",
"Flute.Staff",
Expand Down Expand Up @@ -365,7 +366,7 @@
value="100",
),
baca.Memento(
context="Skips",
context="TimeSignatures",
edition=None,
manifest=None,
prototype="abjad.TimeSignature",
Expand Down
Loading

0 comments on commit 517369c

Please sign in to comment.