You need to account for negative values. Use the abs opcode:
SMessage sprintfk "file(knob%d.png)", abs(int(k1*31))
Without this, some of the filenames will contain a minus sign, which causes issues. Before proceeding I'd suggest you remove all those image widgets. They really aren't necessary. It would be far more efficient to use the same method I suggested for your VU meter (which looks great btw!).