MCPcopy Create free account
hub / github.com/bspaans/python-mingus / measure

Method measure

mingus/containers/note.py:214–223  ·  view source on GitHub ↗

Return the number of semitones between this Note and the other. Examples: >>> Note('C').measure(Note('D')) 2 >>> Note('D').measure(Note('C')) -2

(self, other)

Source from the content-addressed store, hash-verified

212 return self
213
214 def measure(self, other):
215 """Return the number of semitones between this Note and the other.
216
217 Examples:
218 >>> Note('C').measure(Note('D'))
219 2
220 >>> Note('D').measure(Note('C'))
221 -2
222 """
223 return int(other) - int(self)
224
225 def to_hertz(self, standard_pitch=440):
226 """Return the Note in Hz.

Callers 3

find_fretsMethod · 0.80
test_valid_measureMethod · 0.80
test_measureMethod · 0.80

Calls

no outgoing calls

Tested by 2

test_valid_measureMethod · 0.64
test_measureMethod · 0.64