Notes on Desmos range from just above E4 to just above E5. The g function converts a note to the appropriate y-value. For example, g(0) gives the y-value for A4, g(1) gives the y-value for B♭4, g(2) gives the y-value for B4, etc. g(-5) is the y-value for E4, but since it is slightly off-screen (g(-5) ≈ -0.164), we round it to 0 to get a full octave.