Can you see the music?

Awhile back I was doing some work with graphing basic algebraic functions. 
Then it hit me, a way to see music, at least a mathematical representation 
of it. For instance:

For this (mental) experiment I have taken a simple song. One instrument for 
ease/clarity, and converted the notes to their numerical equivalent. The 
numerical equivalent I have chosen for the notes is their Hertz. 

Note: If two notes are present then the x value would be a fraction.

1) write a computer program that runs in a loop
2) Each pass it grabs a note and converts it to Hertz value
3) This value is stored in the x variable
4) I create a simple algebraic function to manipulate and return the data
5) I pass the x value to this function
6) This function returns the y value
7) These values (ordered pair) are graphed
8) The loop repeats with next note


Simplified example source code: This is not actual compilable source code! This 
is an over simplified example used to show the general logic behind the idea. 
This of coarse would not have any visual GUI but this could be coded up. 


open_file (notes.txt)
loop {
	grab single note from notes.txt;
	variable x = convert to Hertz;
	function(x);
	graph the ordered pair (x,y)
	repeat loop;
}

function(x){
	variable y = x+2*3^2;
	return y;
}