Пример #1
0
        def A_motif(chord, bars, *tweaks):
            motif = {}

            if 'no treble' in tweaks:
                motif['treble'] = rep(rest(1), bars)
            elif chord == self.aI:
                motif['treble'] = triplet_bar(pattern(chord, [6, 5]),
                                              bars=bars)
            elif chord == self.aii and 'low triplets' in tweaks:
                motif['treble'] = triplet_bar(pattern(chord, [5, 4]),
                                              bars=bars)
            else:
                motif['treble'] = triplet_bar(pattern(chord, [6, 4]),
                                              bars=bars)

            motif['bass1'] = doublet_bar(pattern(chord, 2, 3), bars=bars)

            if 'crotchet bass' in tweaks:
                motif['bass2'] = rep(note(select(chord, 1), 4), int(bars * 4))
            else:
                motif['bass2'] = rep(note(select(chord, 1), 1, phrasing="~"),
                                     bars)
                if 'extend tie' not in tweaks:
                    motif['bass2'][-1].phrasing = ""

            if 'low first' in tweaks:
                motif['bass1'][0] = chord[0]
                motif['bass2'] = self.transpose(motif['bass2'], -9, "scale")

            return motif
Пример #2
0
 def altpeggio_bar(arp, bars):
     return time_signature(
         "14/8",
         rep(
             notes(
                 pattern(arp, 1, 2, 3, 4, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2),
                 16), 2))
Пример #3
0
 def outro(self):
     return {
         'treble':
         self.long_melody('f a c` f`') + notes('f d', 16) * 2 +
         self.long_melody('g` b` d`` f``') +
         pattern(self.scale('d`', 'f`', 16), 1, 3, 2, 1) +
         chord('e` g` c`', 1),
         'bass':
         self.held_bass('c, c') + self.held_bass('c, b,') +
         chord('c, c', 1)
     }
Пример #4
0
 def motif(self, c):
     tones = tonify(c)
     return {
         'treble':
         rep(rest(8) + notes(pattern(tones, 2 * [3, 4, 5]), 16), 2),
         'bass':
         rep(
             voices(
                 rest(16) + tied_note(select(tones, 2), ['8.', 4]),
                 note(select(tones, 1), 2)), 2)
     }
Пример #5
0
    def create_chords(self):
        self.aI = self.arpeggio('f', 6)
        self.aiii = arpeggio('e', 6, 'A Minor')
        self.aiii7 = pattern(arpeggio7('g', 7, 'A Minor'), 1, 2, 3, 5, 6, 7)
        self.aii = arpeggio('g', 6, 'G Minor')
        self.aii7 = ['f'] + subset(self.aii, 2, 6)

        self.bI7 = self.arpeggio('f,', 4) + self.arpeggio7('a`', 4)
        self.biii = arpeggio('e,', 4, 'A Minor') + arpeggio('a`', 4, 'A minor')
        self.biii7 = [
            self.transpose(t, i)
            for t, i in zip(self.bI7, [1, 0, 0, 1, -1, 0, 0, 0])
        ]
        self.bii7 = arpeggio('g,', 4, 'G Minor') + arpeggio('g`', 4, 'G Minor')
        self.bii7d5 = [
            self.transpose(t, i, 'semitone')
            for t, i in zip(self.bii7, [0, 0, -1, 0, 0, 0, -1, 0])
        ]

        self.diii = arpeggio('a`', 3, 'A Minor')
        self.dI = ['f``', 'f``']
        self.dii = ['f``', 'df``', 'c``']
Пример #6
0
 def arpeggio_bar(arp, bars):
     return rep(notes(pattern(arp, 1, 2, 3, 4, 3, 2), 16),
                int(4 * bars))
Пример #7
0
 def long_melody(self, tones):
     tones = tonify(tones)
     return rest(8) + notes(pattern(tones, 1, 2, 3, 4, 3, 2, 3, 2, 1, 2),
                            16)