boffset = -bmin else: boffset = -bmin M = np.zeros((pixel + 1, pixel + 1)) a = np.linspace(amin, amax, pixel) b = np.linspace(bmin, bmax, pixel) for i in a: for j in b: mandelbrot(complex(i, j)) M[(int)((j + boffset) * (100 * ratio * rate)), (int)((i + aoffset) * (100 * ratio * rate))] = count # empty containers for new notes n.empty() n_1.empty() n_2.empty() # determine notes to be put in the container max_volume = 0 min_volume = cmath.inf ### primary instrument for case in range(1, 8): arr = switch(case) note_name = arr[0] x_offset = arr[1] y_offset = arr[2] sum = 0 for x in range(40):