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

Function diminish

mingus/core/notes.py:160–172  ·  view source on GitHub ↗

Diminish a given note. Examples: >>> diminish('C') 'Cb' >>> diminish('C#') 'C'

(note)

Source from the content-addressed store, hash-verified

158
159
160def diminish(note):
161 """Diminish a given note.
162
163 Examples:
164 >>> diminish('C')
165 'Cb'
166 >>> diminish('C#')
167 'C'
168 """
169 if note[-1] != "#":
170 return note + "b"
171 else:
172 return note[:-1]

Callers 5

ascendingMethod · 0.90
ascendingMethod · 0.90
descendingMethod · 0.90
descendingMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected