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)
| 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. |
no outgoing calls