I am currently working on a project to get white noise and select it to create random numbers. What you need is the other way around!
Sound is pressure and time. Basically start with pressure 0 and add a random amount of pressure from - (max. Amplitude) to (max. Amplitude). The amplitude of white noise is random and usually distributed, so you can use Random.nextGaussian () to generate random z-points. Multiply the z-scores by the standard deviation (you may have to do some testing to find the standard deviation in amplitude that you like) and then let it be the amplitude for each sample in the audio file.
Regarding the creation of the sound file itself, if you have not already done so, you should study the Java Sound API . It has many good methods for creating sound files, as well as for playing.
The next part of your question, not white noise, I'm afraid I donβt know what the waveforms look like. This probably follows similar generating random z-estimates and multiply them by the standard deviation of the amplitude (or, most likely, by some amplitude function that changes with time).
Michael goldstein
source share