This might helps you
Just fundamental notes. The audio is a wave and a single frequency occurs in sine wave form. The length between the crest/ trough (wave length) is related to its frequency. So if you put points at specific intervals in the wave plot of a particular frequency then the point has two values like x and y in Cartesian plane. Here the X is time and Y is amplitude. So X is just increment of samples/bytes (depends on datatype). Y is the value in the bytes. This amplitude vary gradually according to the frequency curves. From this fundamental you could generate sound samples of a frequncy then write in any known audio format.
If you want to separate a frequency from a complex sound data then fourier transform helps.
I given a startup, go on and best of luck