This is a simple search tool to find commas between intervals (maybe even irrational ones, though it would try to show them as fractions). You just specify a list of basis intervals to measure against each other, an upper bound in cents to filter interval combinations through, and the desired count. The code then iterates over suitable combinations from smaller to larger taxicab distances in the lattice spanned by the basis, ensuring simpler commas show first. (But which is simpler depends on your basis! 3/2 and 4/3 is one thing, 3 and 2 is another, 9/8 and 32/27 is yet another still.)
The output of
show_commas(['4/3', '5/4', '6/5', '7/6'], under_cents=25, count=15)here in main is:
7.712c = 225/224 = (4/3)^-1 (5/4)^2 (6/5)^0 (7/6)^-1
21.902c = 875/864 = (4/3)^0 (5/4)^1 (6/5)^-2 (7/6)^1