I want to get a function f(t). It can returns the value of the amplitude of the sound at the t moment. I‘ve already convert mp3 to a list of hexadecimal numbers. What should I do next?
The MP3 format is a complicated lossy compression format for audio. Writing an MP3 decoder is a major undertaking that requires a fair bit of expertise.
Rather than writing code from scratch to decode MP3 files, you should consider using third-party code, such as the open-source MINIMP3 decoder (http://keyj.emphy.de/minimp3/) or a third-party library like libmpg123 (http://www.mpg123.de/api/). Using such third-party code, you can convert audio data to uncompressed form, which you can then easily export in the format you desire.
[NB: Microsoft Security Essentials flags the .exe file in the MINIMP3 library package as a Trojan. I believe this is a false positive, but just in case, delete the .exe file and focus on the source code, recompiling if necessary using your own system.]
As mentioned above, converting from mp3 to an uncompressed format is a good first step. Once you have a .wav file or some other uncompressed format, simply converting it to floating point numbers (perhaps using a library such as libsndfile to import it) will make understanding amplitude quite easy.
You may convert the .wav into an array of floats using sf_open (in libsndfile library) the amplitude is then essentially the magnitude of the numbers... and each number represents a digital audio sample. Although in audio terms amplitude is often given as the root mean square (RMS) average of a particular portion of the signal, rather than an instantaneous amplitude for a particular single sample.
Of course this amplitude is not easy to relate to the actual sound pressure level of what was originally recorded, but I think you are only interested in signal amplitude within the file itself?
If I understand that question correctly then the answer is basically yes!
The answer by Stephen Castell references several sources, including one for sound on sound, which will help you see the difference between compressed and uncompressed audio if you are not already familiar with it.
In short:
By converting it from mp3 to wav I guess we could say the data within the wav file is then "less complicated in structure" than that of the mp3. It is worth noting that when audio is first compressed to mp3 a lot of data is removed, the data is not truly recovered by converting back to wav but it will be simple to create various analyses of the audio in wav format.