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

Function tuple_to_string

mingus/core/progressions.py:242–255  ·  view source on GitHub ↗

Create a string from tuples returned by parse_string.

(prog_tuple)

Source from the content-addressed store, hash-verified

240
241
242def tuple_to_string(prog_tuple):
243 """Create a string from tuples returned by parse_string."""
244 (roman, acc, suff) = prog_tuple
245 if acc > 6:
246 acc = 0 - acc % 6
247 elif acc < -6:
248 acc = acc % 6
249 while acc < 0:
250 roman = "b" + roman
251 acc += 1
252 while acc > 0:
253 roman = "#" + roman
254 acc -= 1
255 return roman + suff
256
257
258def substitute_harmonic(progression, substitute_index, ignore_suffix=False):

Callers 6

substitute_harmonicFunction · 0.85
substituteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected