machines.OctaveDisplacement( up=(1,2,3, 23, 36, ), down=(10, 19, 38), ) # print(pitch_displacement) def update_data(self, **kwargs): super().update_data(**kwargs) if self.__class__.__name__ == "Line7": self.tag_events("magenta", every_child=True) # ------------------------------------------------------------------------------------------------- bubbles.illustrate_me(__file__, lambda: staves.CopperShortScore( bubbles.Bubble( drone0 = Drone0(show_data_attr="original_depthwise_index"), drone10 = Drone10(show_data_attr="original_depthwise_index"), line1 = Line1(show_data_attr="original_depthwise_index"), line2 = Line2(show_data_attr="original_depthwise_index"), # line3 = Line3(show_data_attr="original_depthwise_index"), line3 = Line3Pulsed(show_data_attr="original_depthwise_index"), line4 = Line4(show_data_attr="original_depthwise_index", clef="bass"), line5 = Line5(show_data_attr="original_depthwise_index"), line6 = Line6(show_data_attr="original_depthwise_index"), line7 = Line7(show_data_attr="original_depthwise_index"), ), sequence = ("line1","line2","line3","line4","line5","line6","line7","drone0","drone10"), stylesheets = ("../../scores/stylesheets/shortscore.ily",) ).get_lilypond_file(), as_midi=True, )
# time_signature=None class CopperFullMusic(bubbles.GridSequence, staves.CopperMusic): grid_sequence = ( orchestration_0.get_orchestration_0()(), orchestration_a.get_orchestration_a()(), orchestration_b.get_orchestration_b()(), orchestration_c.get_orchestration_c()(), orchestration_d.get_orchestration_d()(), orchestration_e.get_orchestration_e()(), orchestration_f.get_orchestration_f()(), orchestration_g.get_orchestration_g()(), # orchestration_h.get_orchestration_h()(), ) # ------------------------------------------------------------------------------------------------- # OUTPUT SCORE class CopperFullScore(staves.CopperScore): stylesheets = ("stylesheets/score.ily", ) show_short_score = False # hide_empty=True title = "Copper" bubbles.illustrate_me( __file__, lambda: CopperFullScore(CopperFullMusic()).get_lilypond_file(), subfolder="score_illustrations")
harp2 = Harp2() piano1 = Piano1() piano2 = Piano2() violinI1 = ViolinI1() violinI2 = ViolinI2() violinII1 = ViolinII1() violinII2 = ViolinII2() viola1 = Viola1() viola2 = Viola2() cello1 = Cello1() cello2 = Cello2() bass = Bass() drone0 = LINES[0].show_data(show_data_attr="original_depthwise_index") line1 = LINES[1].show_data(show_data_attr="original_depthwise_index") line2 = LINES[2].show_data(show_data_attr="original_depthwise_index") line3 = LINES[3].show_data(show_data_attr="original_depthwise_index") line4 = LINES[4].show_data(show_data_attr="original_depthwise_index") return OrchestrationC # ------------------------------------------------------------------------- # OUTPUT SCORE bubbles.illustrate_me(__file__, lambda: staves.CopperScore( get_orchestration_c()(), title="Copper: C", show_short_score=True, hide_empty=True).get_lilypond_file() )
# }, limit=10) # def update_data(self, **kwargs): # super().update_data(**kwargs) # # self.events[1].tag("(")self.events[2].tag("mf") # # self.events[3].tag(")") # self.events[1].tag("\<") # self.events[2].tag("\!") # self.events[2].tag("mf") # self.events[2].tag("(") # self.events[2].tag("\>") # self.events[4].tag("\!",")") # ------------------------------------------------------------------------------------------------- def update_data(self, **kwargs): super().update_data(**kwargs) if self.__class__.__name__ == "Line1": self.tag_events("darkmagenta", every_child=True) bubbles.illustrate_me( __file__, lambda: staves.CopperShortScore( bubbles.Bubble( drone0=Drone0(show_data_attr="original_depthwise_index"), line1=Line1(show_data_attr="original_depthwise_index"), ), sequence=("line1", "drone0"), stylesheets=("../../scores/stylesheets/shortscore.ily", )). get_lilypond_file(), as_midi=True, )
piano2 = Piano2() violinI1 = StringsArrange0() violinI2 = StringsArrange0() violinII1 = StringsArrange0() violinII2 = StringsArrange0() viola1 = StringsArrange0() viola2 = StringsArrange0() cello1 = StringsArrange0() cello2 = StringsArrange0() bass = Bass() drone0 = LINES[0].show_data(show_data_attr="original_depthwise_index") line1 = LINES[1].show_data(show_data_attr="original_depthwise_index") return Orchestration0 # print(dir()) # print(__package__) # print(get_orchestration_0().bass) # ------------------------------------------------------------------------- # OUTPUT SCORE bubbles.illustrate_me(__file__, lambda: staves.CopperScore( get_orchestration_0()(), title="Copper: 0", # TO DO... note that title attribute is not currently used (re-implement?) show_short_score=True, hide_empty=True).get_lilypond_file() )
default=((1,1),), limit=24) # metrical_durations = ((1,1),)*8 + ((1,4),)*8 + ((1,2),(1,4),(1,4),) + ((1,4),)*4 + ((1,1),)*13 rhythm_initial_silence = 30 rhythm_times=1 # TO DO: ditto as Line3 - do we want to repeat?? (would need to adjust or truncate the end) pitch_displacement = machines.FifthDisplacement( up = (2,5,7,9), down = ( 6,8,) ) rhythm_multipliers = Line3.rhythm_multipliers.copy() rhythm_multipliers[8] = 0.5 def update_data(self, **kwargs): super().update_data(**kwargs) if self.__class__.__name__ == "Line4": self.tag_events("darkred", every_child=True) # ------------------------------------------------------------------------------------------------- bubbles.illustrate_me(__file__, lambda: staves.CopperShortScore( bubbles.Bubble( # drone0 = Drone0(show_data_attr="original_depthwise_index", accidental_style="forget"), line1 = Line1(show_data_attr="original_depthwise_index", accidental_style="forget"), line2 = Line2(show_data_attr="original_depthwise_index", accidental_style="forget"), line3 = Line3(show_data_attr="original_depthwise_index", accidental_style="forget"), line4 = Line4(show_data_attr="original_depthwise_index", accidental_style="forget"), ), sequence = ("line1","line2","line3","line4","drone0"), stylesheets = ("../../scores/stylesheets/shortscore.ily",) ).get_lilypond_file(), as_midi=True, )
# (e.g. stuff that might only apply to the score, but not the parts) # class FullOrchestrationA(orchestration_a.OrchestrationA): # time_signature=None class CopperFullMusic(bubbles.GridSequence, staves.CopperMusic): grid_sequence = ( orchestration_0.get_orchestration_0()(), orchestration_a.get_orchestration_a()(), orchestration_b.get_orchestration_b()(), orchestration_c.get_orchestration_c()(), orchestration_d.get_orchestration_d()(), orchestration_e.get_orchestration_e()(), orchestration_f.get_orchestration_f()(), orchestration_g.get_orchestration_g()(), # orchestration_h.get_orchestration_h()(), ) # ------------------------------------------------------------------------------------------------- # OUTPUT SCORE class CopperFullScore(staves.CopperScore): stylesheets=("stylesheets/score.ily",) show_short_score=False # hide_empty=True title="Copper" bubbles.illustrate_me(__file__, lambda : CopperFullScore( CopperFullMusic() ).get_lilypond_file(), subfolder="score_illustrations" )
violinI2 = ViolinI2() violinII1 = ViolinII1() violinII2 = ViolinII2() viola1 = Viola1() viola2 = Viola2() cello1 = Cello1() cello2 = Cello2() bass = Bass() drone0 = LINES[0].show_data(show_data_attr="original_depthwise_index") line1 = LINES[1].show_data(show_data_attr="original_depthwise_index") line2 = LINES[2].show_data(show_data_attr="original_depthwise_index") line3 = LINES[3].show_data(show_data_attr="original_depthwise_index") line4 = LINES[4].show_data(show_data_attr="original_depthwise_index") line5 = LINES[5].show_data(show_data_attr="original_depthwise_index") line6 = LINES[6].show_data(show_data_attr="original_depthwise_index") line7 = LINES[7].show_data(show_data_attr="original_depthwise_index") line8 = LINES[8].show_data(show_data_attr="original_depthwise_index") line9 = LINES[9].show_data(show_data_attr="original_depthwise_index") return OrchestrationH # ------------------------------------------------------------------------- # OUTPUT SCORE bubbles.illustrate_me( __file__, lambda: staves.CopperScore(get_orchestration_h()(), title="Copper: H", show_short_score=True, hide_empty=True).get_lilypond_file())
violinI1 = StringsArrange0() violinI2 = StringsArrange0() violinII1 = StringsArrange0() violinII2 = StringsArrange0() viola1 = StringsArrange0() viola2 = StringsArrange0() cello1 = StringsArrange0() cello2 = StringsArrange0() bass = Bass() drone0 = LINES[0].show_data(show_data_attr="original_depthwise_index") line1 = LINES[1].show_data(show_data_attr="original_depthwise_index") return Orchestration0 # print(dir()) # print(__package__) # print(get_orchestration_0().bass) # ------------------------------------------------------------------------- # OUTPUT SCORE bubbles.illustrate_me( __file__, lambda: staves.CopperScore( get_orchestration_0()(), title= "Copper: 0", # TO DO... note that title attribute is not currently used (re-implement?) show_short_score=True, hide_empty=True).get_lilypond_file())
(2, 4, 2, -4), (3, 3, 3, -3), # for 3/4 meter or 9/8 meter ) rhythm_sequence = ID({ # NOTE: could cycle through a few possibilities }, default=0, limit=22) pitch_sequence = ID(default=0, limit=22) initial_dynamic = "pp" middle_dynamic = "mp" end_dynamic = "pp" def update_data(self, **kwargs): super().update_data() for segment in self.segments: if len(segment) >= 3: segment[0].tag(self.initial_dynamic, "\<", "~") segment[1].tag(self.middle_dynamic, "\>") segment[2].tag(self.end_dynamic, "~!") # if len(segment) >= 2: # segment[0].tag(self.initial_dynamic, "\<", "~") # segment[1].tag(self.middle_dynamic, "~!") if self.__class__.__name__ == "Drone0": self.tag_events("grey", every_child=True) # ------------------------------------------------------------------------------------------------- bubbles.illustrate_me(__file__, lambda: Drone().score(), subfolder="machine_illustrations" )
# ------------------------------------------------------------------------------------------------- class Line8(GenH, gen_g.Line8): pass # ------------------------------------------------------------------------------------------------- class Line9(Line8): pass # ------------------------------------------------------------------------------------------------- bubbles.illustrate_me(__file__, lambda: staves.CopperShortScore( bubbles.Bubble( drone0 = Drone0(show_data_attr="original_depthwise_index"), line1 = Line1(show_data_attr="original_depthwise_index"), line2 = Line2(show_data_attr="original_depthwise_index"), line3 = Line3(show_data_attr="original_depthwise_index"), line4 = Line4(show_data_attr="original_depthwise_index"), line5 = Line5(show_data_attr="original_depthwise_index"), line6 = Line6(show_data_attr="original_depthwise_index"), line7 = Line7(show_data_attr="original_depthwise_index"), line8 = Line8(show_data_attr="original_depthwise_index"), line9 = Line9(show_data_attr="original_depthwise_index"), ), sequence = ("line1","line2","line3","line4","line5","line6","line7","line8","line9","drone0"), ).get_lilypond_file(), as_midi=True, )