A simple PWM beep using timers 1 and 2

You are missing setup() and loop().
You are missing declarations for 'ON', 'T2OCRX', 'msin', 'cwvol', and the minsky() function.