def make_chromatic(key): '''Makes a chromatic array of notes starting from the specified key''' # pre-calculate the forward and backward ranges # needed to build the chromatic scale fr = range(key.distance, 12) br = range(0, key.distance) notes = [Notes.by_distance(i) for i in fr] notes.extend([Notes.by_distance(i) for i in br]) return notes