Exemplo n.º 1
0
	def test_minor_sevenths(self):
		minors = {
			"C" : "Bb",
			"Cb" : "Bbb",
			"C#" : "B",
			"E" : "D",
			"Eb": "Db",
			"E#": "D#",
			"E####" : "D####",
			"B" : "A",
			"Bb" : "Ab"
						}
		for x in minors.keys():
			self.assertEqual(minors[x], intervals.minor_seventh(x),\
				"The minor seventh of %s is not %s, expecting %s" % (x, intervals.minor_seventh(x), minors[x]))
Exemplo n.º 2
0
 def test_minor_sevenths(self):
     minors = {
         'C': 'Bb',
         'Cb': 'Bbb',
         'C#': 'B',
         'E': 'D',
         'Eb': 'Db',
         'E#': 'D#',
         'E####': 'D####',
         'B': 'A',
         'Bb': 'Ab',
         }
     for x in list(minors.keys()):
         self.assertEqual(minors[x], intervals.minor_seventh(x),
                          'The minor seventh of %s is not %s, expecting %s'
                           % (x, intervals.minor_seventh(x), minors[x]))
Exemplo n.º 3
0
 def ascending(self):
     notes = [self.tonic]
     notes.append(intervals.minor_third(notes[0]))
     notes.append(intervals.perfect_fourth(notes[0]))
     notes.append(intervals.perfect_fifth(notes[0]))
     notes.append(intervals.minor_seventh(notes[0]))
     return notes * self.octaves + [notes[0]]
Exemplo n.º 4
0
 def test_minor_sevenths(self):
     minors = {
         'C': 'Bb',
         'Cb': 'Bbb',
         'C#': 'B',
         'E': 'D',
         'Eb': 'Db',
         'E#': 'D#',
         'E####': 'D####',
         'B': 'A',
         'Bb': 'Ab',
         }
     for x in list(minors.keys()):
         self.assertEqual(minors[x], intervals.minor_seventh(x),
                          'The minor seventh of %s is not %s, expecting %s'
                           % (x, intervals.minor_seventh(x), minors[x]))
Exemplo n.º 5
0
def suspended_seventh(note):
    """Build a suspended (flat) seventh chord on note.

    Example:
    >>> suspended_seventh('C')
    ['C', 'F', 'G', 'Bb']
    """
    return suspended_fourth_triad(note) + [intervals.minor_seventh(note)]
Exemplo n.º 6
0
def dominant_sixth(note):
    """Build the altered chord 6/7 on note.

    Example:
    >>> dominant_sixth('C')
    ['C', 'E', 'G', 'A', 'Bb']
    """
    return major_sixth(note) + [intervals.minor_seventh(note)]
Exemplo n.º 7
0
def augmented_minor_seventh(note):
    """Build an augmented minor seventh chord on note.

    Example:
    >>> augmented_minor_seventh('C')
    ['C', 'E', 'G#', 'Bb']
    """
    return augmented_triad(note) + [intervals.minor_seventh(note)]
Exemplo n.º 8
0
def minor_seventh(note):
    """Build a minor seventh on note.

    Example:
    >>> minor_seventh('C')
    ['C', 'Eb', 'G', 'Bb']
    """
    return minor_triad(note) + [intervals.minor_seventh(note)]
Exemplo n.º 9
0
def augmented_minor_seventh(note):
    """Build an augmented minor seventh chord on note.

    Example:
    >>> augmented_minor_seventh('C')
    ['C', 'E', 'G#', 'Bb']
    """
    return augmented_triad(note) + [intervals.minor_seventh(note)]
Exemplo n.º 10
0
def minor_seventh(note):
    """Build a minor seventh on note.

    Example:
    >>> minor_seventh('C')
    ['C', 'Eb', 'G', 'Bb']
    """
    return minor_triad(note) + [intervals.minor_seventh(note)]
Exemplo n.º 11
0
def dominant_sixth(note):
    """Build the altered chord 6/7 on note.

    Example:
    >>> dominant_sixth('C')
    ['C', 'E', 'G', 'A', 'Bb']
    """
    return major_sixth(note) + [intervals.minor_seventh(note)]
Exemplo n.º 12
0
def suspended_seventh(note):
    """Build a suspended (flat) seventh chord on note.

    Example:
    >>> suspended_seventh('C')
    ['C', 'F', 'G', 'Bb']
    """
    return suspended_fourth_triad(note) + [intervals.minor_seventh(note)]
Exemplo n.º 13
0
def dominant_seventh(note):
    """Build a dominant seventh on note.

    Example:
    >>> dominant_seventh('C')
    ['C', 'E', 'G', 'Bb']
    """
    return major_triad(note) + [intervals.minor_seventh(note)]
Exemplo n.º 14
0
def dominant_seventh(note):
    """Build a dominant seventh on note.

    Example:
    >>> dominant_seventh('C')
    ['C', 'E', 'G', 'Bb']
    """
    return major_triad(note) + [intervals.minor_seventh(note)]
Exemplo n.º 15
0
def half_diminished_seventh(note):
    """Build a half diminished seventh (also known as "minor seventh flat
    five") chord on note.

    Example:
    >>> half_diminished_seventh('C')
    ['C', 'Eb', 'Gb', 'Bb']
    """
    return diminished_triad(note) + [intervals.minor_seventh(note)]
Exemplo n.º 16
0
def diminished_seventh(note):
    """Build a diminished seventh chord on note.

    Example:
    >>> diminished_seventh('C')
    ['C', 'Eb', 'Gb', 'Bbb']
    """
    return (diminished_triad(note) +
            [notes.diminish(intervals.minor_seventh(note))])
Exemplo n.º 17
0
def half_diminished_seventh(note):
    """Build a half diminished seventh (also known as "minor seventh flat
    five") chord on note.

    Example:
    >>> half_diminished_seventh('C')
    ['C', 'Eb', 'Gb', 'Bb']
    """
    return diminished_triad(note) + [intervals.minor_seventh(note)]
Exemplo n.º 18
0
def diminished_seventh(note):
    """Build a diminished seventh chord on note.

    Example:
    >>> diminished_seventh('C')
    ['C', 'Eb', 'Gb', 'Bbb']
    """
    return (diminished_triad(note) +
            [notes.diminish(intervals.minor_seventh(note))])
Exemplo n.º 19
0
def eleventh(note):
    """Build an eleventh chord on note.

    Example:
    >>> eleventh('C')
    ['C', 'G', 'Bb', 'F']
    """
    return [note, intervals.perfect_fifth(note), intervals.minor_seventh(note),
            intervals.perfect_fourth(note)]
Exemplo n.º 20
0
 def ascending(self):
     notes = [self.tonic]
     for i in range(3):
         notes.extend([
             intervals.minor_second(notes[-1]),
             intervals.minor_third(notes[-1])
         ])
     notes.append(intervals.minor_seventh(notes[0]))
     notes[-2] = intervals.major_sixth(notes[0])
     return notes * self.octaves + [notes[0]]
Exemplo n.º 21
0
 def test_minor_sevenths(self):
     minors = {
         "C": "Bb",
         "Cb": "Bbb",
         "C#": "B",
         "E": "D",
         "Eb": "Db",
         "E#": "D#",
         "E####": "D####",
         "B": "A",
         "Bb": "Ab",
     }
     for x in minors:
         self.assertEqual(
             minors[x],
             intervals.minor_seventh(x),
             "The minor seventh of %s is not %s, expecting %s" %
             (x, intervals.minor_seventh(x), minors[x]),
         )
Exemplo n.º 22
0
def create_interval_dissonant(start_note):
    start = start_note
    options = [
        intervals.minor_second(start),
        intervals.major_second(start),
        intervals.minor_fifth(start),
        intervals.minor_seventh(start),
        intervals.major_seventh(start)
    ]
    end = options[(randint(0, len(options) - 1))]
    interval = intervals.determine(start, end)
    return interval
Exemplo n.º 23
0
 def ascending(self):
     notes = HarmonicMinor(self.tonic).ascending()[:6]
     notes.append(intervals.minor_seventh(notes[0]))
     notes += HarmonicMinor(self.tonic).ascending()[6:-1]
     return notes * self.octaves + [notes[0]]