Hi there,

I need help with audio manipulation. I want to do a aplication that is able to issue a sound with specific frequency.
My app has the Google Earth embed and while the user is moving the mouse over the map, my app is getting the altitude.
Then I convert the altitude to a frequency between 20Hz and 20kHz.
Until here, my app works fine.

My problem is change the audio frequency in real time for specific frequence (gotten on last step).

Someone knows what language I can do it? I can do with javascript?

My app has the following code until now:

HTML Code:
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta name="generator" content="JS Editor v9, http://www.c-point.com" />
    <title>mousemove_listener_example.html
    </title>
    <meta content="text/html; charset=us-ascii" http-equiv="Content-Type" />
<script src=
"http://www.google.com/jsapi?key=ABQIAAAA5El50zA4PeDTEMlv-sXFfRSsTL4WIgxhMZ0ZK_kHjwHeQuOD4xTdBhxbkZWuzyYTVeclkwYHpb17ZQ"
      type="text/javascript"
      xml:space="preserve">
</script>
<script type="text/javascript" xml:space="preserve">
   var ge;
   google.load("earth", "1");
   
   function init() {
     google.earth.createInstance('map3d', initCB, failureCB);
   }
   
   function initCB(instance) {
      ge = instance;
      ge.getWindow().setVisibility(true);
      
      //Define what happens when a mousemove is detected on the globe.
      var highestFrequency = 20000; //Highest frequency audible by human
      var lowestFrequency = 20; //Lowest frequency audible by human
      var frequenceRange = highestFrequency - lowestFrequency;
      var highestGlobePoint = 8850; //Highest point on the globe
      var freq;
      var currentAlt;
      
      function recordAltitude(event) {
         currentAlt = event.getAltitude();
         //maxAlt = Math.max(maxAlt, currentAlt);
         if ( currentAlt <= 0 )
            freq = 20;
         else
            freq = (currentAlt / highestGlobePoint) * frequenceRange + lowestFrequency;
            
         document.getElementById('altitude').innerHTML = 
                   '<p>Current altitude: ' + currentAlt +
                   '<br/> Frequency: ' + freq +
                   '<\/p>' ;
        
      }
      // Listen to the mousemove event on the globe.
      google.earth.addEventListener(ge.getGlobe(), 'mousemove', recordAltitude);
   }
   function failureCB(errorCode) {   }
   
   google.setOnLoadCallback(init);
</script>
<script type="text/javascript" src="http://www.google.com/uds/?file=earth&amp;v=1" xml:space="preserve">
</script>
<script type="text/javascript" src="./mousemove_listener_example_files/default.I.js" xml:space="preserve">
</script>
  </head>
  <body background="" alink="#0080FF" link="blue" bgcolor="white" vlink="silver">
  
	
	<!-- Tabela do Mapa 3D -->
    <table>
      <tbody>
        <tr> <td>
              <div id="map3d" style="WIDTH: 600px; HEIGHT: 400px">
              </div>
             </td>
             <td>
               <div id="altitude">
                <p>Current altitude: N/A <br /> Frequency: N/A</p>
               </div>
             </td>
        </tr>
      </tbody>
    </table>
	
	<object align=left classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95 id="./audio/testando.wav">
		<param name="FileName" value="./audio/testando.wav">
		<param name="AutoRewind" value="true">
		<param name="AutoStart" value="false">
		<param name="ClickToPlay" value="true">
		<param name="Mute" value="false">
		<param name="ShowControls" value="true">
		<param name="ShowDisplay" value="true">
		<param name="ShowTracker" value="true">
		<param name="PlayCount" value="1">
	</object>
    
  </body>
</html>