Exemple #1
0
def twelve_bar_blues(key):
    return list(group(twelve_bar_blues_chord_progression(key), 4))
def twelve_bar_blues(key):
    return list(group(twelve_bar_blues_chord_progression(key), 4))
Exemple #3
0
            for mode_func in MODE_CHORD_FUNCTIONS
        ]
        print(', '.join(chords))

    elif args.action == '12_bar_blues':
        for four_bars in twelve_bar_blues(args.key):
            print('\t'.join(four_bars))

    elif args.action == 'blues_scale':
        print("{} blues scale: {}".format(args.key,
                                          ', '.join(blues_scale(args.key))))

    elif args.action == '12_bar_blues_printout':
        from mingus.containers.note import QuarterNoteFactory as Q
        from mingus.core.chords import WholNoteChordFactory as WNC
        blues_scale = Blues(args.key)
        bar = Bar()
        bar.extend(
            Q(
                list(
                    blues_scale.generate(4 * 12,
                                         undulating=True,
                                         starting_octave=4))))
        bar.set_chord_notes([
            WNC(chord)
            for chord in twelve_bar_blues_chord_progression(args.key)
        ])
        result = from_Bar(bar)
        print(result)
        to_png(result, args.filename)
        for chord in args.chords:
            chord_notes = chords.from_shorthand(chord)
            new_note = reduce_accidentals(tritone(chord_notes[0]))
            new_chord = new_note + '7'

            ii_chord_type_short, chord = reharmonize_v_to_ii_v(new_chord)
            print("{} {}".format(ii_chord_type_short, new_chord))

    elif args.action == 'chord_modes':
        chords = [chords.determine_seventh(mode_func(args.key), shorthand=True)[0]
                  for mode_func in MODE_CHORD_FUNCTIONS]
        print(', '.join(chords))

    elif args.action == '12_bar_blues':
        for four_bars in twelve_bar_blues(args.key):
            print('\t'.join(four_bars))

    elif args.action == 'blues_scale':
        print("{} blues scale: {}".format(args.key, ', '.join(blues_scale(args.key))))

    elif args.action == '12_bar_blues_printout':
        from mingus.containers.note import QuarterNoteFactory as Q
        from mingus.core.chords import WholNoteChordFactory as WNC
        blues_scale = Blues(args.key)
        bar = Bar()
        bar.extend(Q(list(blues_scale.generate(4*12, undulating=True, starting_octave=4))))
        bar.set_chord_notes([WNC(chord) for chord in twelve_bar_blues_chord_progression(args.key)])
        result = from_Bar(bar)
        print(result)
        to_png(result, args.filename)