コード例 #1
0
def fifth(note, key):
	"""Take the diatonic fifth of note in key.
	Examples:
{{{
>>>	fifth("E", "C") 
'B'
>>>	fifth("E", "F") 
'Bb'
}}}
	Raises a !KeyError if note is not found in key."""
	return diatonic.interval(key, note, 4)
コード例 #2
0
def fourth(note, key):
	"""Take the diatonic fourth of note in key.
	Examples:
{{{
>>>	fourth("E", "C") 
'A'
>>>	fourth("E", "B") 
'A#'
}}}
	Raises a !KeyError if note is not found in key."""
	return diatonic.interval(key, note, 3)
コード例 #3
0
def third(note, key):
	"""Take the diatonic third of note in key.
	Examples:
{{{
>>>	third("E", "C") 
'G'
>>>	third("E", "E") 
'G#'
}}}
	Raises a !KeyError if note is not found in key."""
	return diatonic.interval(key, note, 2)
コード例 #4
0
def second(note, key):
	"""Take the diatonic second of note in key.
	Examples: 
{{{
>>>	second("E", "C") 
'F'
>>> second("E", "D") 
'F#'
}}}
	Raises a !KeyError if the `note` is not found in the `key`."""
	return diatonic.interval(key, note, 1)
コード例 #5
0
def seventh(note, key):
	"""Take the diatonic seventh of note in key.
	Examples:
{{{
>>> seventh("E", "C") 
'D'
>>> seventh("E", "B") 
'D#'
}}}
	Raises a !KeyError if note is not found in key."""
	return diatonic.interval(key, note, 6)
コード例 #6
0
ファイル: intervals.py プロジェクト: edudobay/mingus
def sixth(note, key):
    """Take the diatonic sixth of note in key.
    Examples:
{{{
>>>    sixth(\"E\", \"C\")
'C'
>>> sixth(\"E\", \"B\")
'C#'
}}}
    Raises a !KeyError if note is not found in key."""

    return diatonic.interval(key, note, 5)