예제 #1
0
	def test_major_seventh(self):
		majors = {
			"C": "B",
			"Cb" : "Bb",
			"Cbb" : "Bbb",
			"C#" : "B#",
			"C##" :"B##",
			"B" : "A#",
			"A" : "G#",
			"F#" : "E#",
			"F" : "E",
			"Fb" : "Eb"
				}
		for x in majors.keys():
			self.assertEqual(majors[x], intervals.major_seventh(x),\
				"The major seventh of %s is not %s, expecting %s" % (x, intervals.major_seventh(x), majors[x]))
예제 #2
0
 def ascending(self):
     notes = [self.tonic]
     for i in range(3):
         notes.extend([intervals.major_second(notes[-1]), intervals.minor_third(notes[-1])])
     notes.append(intervals.major_seventh(notes[0]))
     notes[-2] = intervals.major_sixth(notes[0])
     return notes * self.octaves + [notes[0]]
예제 #3
0
 def test_major_seventh(self):
     majors = {
         'C': 'B',
         'Cb': 'Bb',
         'Cbb': 'Bbb',
         'C#': 'B#',
         'C##': 'B##',
         'B': 'A#',
         'A': 'G#',
         'F#': 'E#',
         'F': 'E',
         'Fb': 'Eb',
         }
     for x in list(majors.keys()):
         self.assertEqual(majors[x], intervals.major_seventh(x),
                          'The major seventh of %s is not %s, expecting %s'
                           % (x, intervals.major_seventh(x), majors[x]))
예제 #4
0
def augmented_major_seventh(note):
    """Build an augmented major seventh chord on note.

    Example:
    >>> augmented_major_seventh('C')
    ['C', 'E', 'G#', 'B']
    """
    return augmented_triad(note) + [intervals.major_seventh(note)]
예제 #5
0
def minor_major_seventh(note):
    """Build a minor major seventh chord on note.

    Example:
    >>> minor_major_seventh('C')
    ['C', 'Eb', 'G', 'B']
    """
    return minor_triad(note) + [intervals.major_seventh(note)]
예제 #6
0
def major_seventh(note):
    """Build a major seventh on note.

    Example:
    >>> major_seventh('C')
    ['C', 'E', 'G', 'B']
    """
    return major_triad(note) + [intervals.major_seventh(note)]
예제 #7
0
 def test_major_seventh(self):
     majors = {
         'C': 'B',
         'Cb': 'Bb',
         'Cbb': 'Bbb',
         'C#': 'B#',
         'C##': 'B##',
         'B': 'A#',
         'A': 'G#',
         'F#': 'E#',
         'F': 'E',
         'Fb': 'Eb',
         }
     for x in list(majors.keys()):
         self.assertEqual(majors[x], intervals.major_seventh(x),
                          'The major seventh of %s is not %s, expecting %s'
                           % (x, intervals.major_seventh(x), majors[x]))
예제 #8
0
def augmented_major_seventh(note):
    """Build an augmented major seventh chord on note.

    Example:
    >>> augmented_major_seventh('C')
    ['C', 'E', 'G#', 'B']
    """
    return augmented_triad(note) + [intervals.major_seventh(note)]
예제 #9
0
def minor_major_seventh(note):
    """Build a minor major seventh chord on note.

    Example:
    >>> minor_major_seventh('C')
    ['C', 'Eb', 'G', 'B']
    """
    return minor_triad(note) + [intervals.major_seventh(note)]
예제 #10
0
def major_seventh(note):
    """Build a major seventh on note.

    Example:
    >>> major_seventh('C')
    ['C', 'E', 'G', 'B']
    """
    return major_triad(note) + [intervals.major_seventh(note)]
예제 #11
0
 def ascending(self):
     notes = [self.tonic]
     for i in range(3):
         notes.extend(
                 [intervals.major_second(notes[-1]),
                     intervals.minor_third(notes[-1])])
     notes.append(intervals.major_seventh(notes[0]))
     notes[-2] = intervals.major_sixth(notes[0])
     return notes * self.octaves + [notes[0]]
예제 #12
0
 def test_major_seventh(self):
     majors = {
         "C": "B",
         "Cb": "Bb",
         "Cbb": "Bbb",
         "C#": "B#",
         "C##": "B##",
         "B": "A#",
         "A": "G#",
         "F#": "E#",
         "F": "E",
         "Fb": "Eb",
     }
     for x in majors:
         self.assertEqual(
             majors[x],
             intervals.major_seventh(x),
             "The major seventh of %s is not %s, expecting %s" %
             (x, intervals.major_seventh(x), majors[x]),
         )
예제 #13
0
파일: logic.py 프로젝트: Yoav-Ros/gaka
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
예제 #14
0
 def ascending(self):
     notes = Mixolydian(self.tonic).ascending()[:7]
     notes.append(intervals.major_seventh(notes[0]))
     return notes * self.octaves + [notes[0]]