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

Method count_courses

mingus/extra/tunings.py:59–67  ·  view source on GitHub ↗

Return the average number of courses per string.

(self)

Source from the content-addressed store, hash-verified

57 return len(self.tuning)
58
59 def count_courses(self):
60 """Return the average number of courses per string."""
61 c = 0
62 for x in self.tuning:
63 if isinstance(x, list):
64 c += len(x)
65 else:
66 c += 1
67 return float(c) / len(self.tuning)
68
69 def find_frets(self, note, maxfret=24):
70 """Return a list with for each string the fret on which the note is

Callers 3

get_tuningFunction · 0.80
get_tuningsFunction · 0.80
test_count_coursesMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_count_coursesMethod · 0.64