示例#1
0
def tritone_substitution(chord):
    chord_notes = chords.from_shorthand(chord)
    new_note = reduce_accidentals(tritone(chord_notes[0]))
    new_chord = new_note + '7'
    new_notes = chords.from_shorthand(new_chord)
    return new_chord, new_notes
def tritone_substitution(chord):
    chord_notes = chords.from_shorthand(chord)
    new_note = reduce_accidentals(tritone(chord_notes[0]))
    new_chord = new_note + '7'
    new_notes = chords.from_shorthand(new_chord)
    return new_chord, new_notes
示例#3
0
    elif args.action == 'tritone_substitution':
        for chord in args.chords:
            new_chord, new_notes = tritone_substitution(chord)
            print("The tritone substitution of {} is {} ({})".format(
                chord, new_chord, ', '.join(new_notes)))

    elif args.action == 'reharmonize_v_to_ii_v':
        for chord in args.chords:
            ii_chord_type_short, chord = reharmonize_v_to_ii_v(chord)
            print("II-V ({}, {})".format(ii_chord_type_short, chord))

    elif args.action == 'ii_v_tritone_substitution':
        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))
            determine_key_and_function(chord)

    elif args.action == 'tritone_substitution':
        for chord in args.chords:
            new_chord, new_notes = tritone_substitution(chord)
            print("The tritone substitution of {} is {} ({})".format(chord, new_chord, ', '.join(new_notes)))

    elif args.action == 'reharmonize_v_to_ii_v':
        for chord in args.chords:
            ii_chord_type_short, chord = reharmonize_v_to_ii_v(chord)
            print("II-V ({}, {})".format(ii_chord_type_short, chord))

    elif args.action == 'ii_v_tritone_substitution':
        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':