I need to generate the sound sequence which corresponds to a sequence of sound amplitudes encoded as numbers.
The “import” facility in the “file” menu does not include this capability per the manual.
And I don’t see a switch of any sort in the “generate” menu to do so although the generate capabilities of Audacity surely
generate chirps, tones, etc. using the needed capability.
Is there a way either with the Windows or Linux versions of Audacity?
If not, do you know of some other tool which has this capability?
Or would it be most productive to go the Audacity source code and modify it?
The nearest thing Audacity has as a generator is DTMF, unless of course you want to generate individual tones for each note in the sequence. You would have to convert your numbers to linear amplitude.
A WAV file is a sequence of numbers (with a file header and the sample values stored in binary). A"RAW" PCM is also a simple sequence of (binary/byte) values. If you open a WAV file with a hex editor such as [u]XVI32[/u] you can see the individual byte values in hexadecimal, but it’s hard to see anything meaningful unless you have 8-bit audio data, and even then the massive amount of data makes it difficult to tell what you’re looking at.
If you want the numbers in ASCII (text) format, [u]Goldwave[/u] ($60 USD after free trail) may be able to do it. GoldWave can save (or open) a sequence of floating-point values in a text file. The floating-point format is similar to floating-point WAV files where silence is zero and the “maximum” (0dB) is plus or minus 1.0. If you are using a different scale, you may have to use a spreadsheet to convert the numbers to values between +/- 1.0. There is some kind of special file header that GoldWave uses to store the sample rate & number of channels, etc., but it’s plain text so you can manually read & write it.
If you can get the formatting right and save-as text, you might be able to generate the sample values in a spreadsheet and open the file with GoldWave.
These files can be HUGH with normal sample rates, such as 44,100 samples per second.
And I don’t see a switch of any sort in the “generate” menu to do so although the generate capabilities of Audacity surely
generate chirps, tones, etc. using the needed capability.
MATLAB (or one of the free MATLAB clones) can generate & manipulate audio data mathematically in any way you can imagine. GoldWave also has a Expression Evaluator that allows you to generate sounds mathematically.