Add misc. frame counter and triangle channel logic.