The square wave gets converted into a triangle wave through rc filters which is then buffered then non inverting amplified through two opamps. Which lastly gets put into the + terminal of a comparator along with a simple simulated analog audio signal. With the output being the digital version