convert pins to frames, nils to zeros