I'm interested in converting an ultrasound time trace (voltage generated by the piezoelectric element of the ultrasound transducer VS time) to a .wav file.
My goal is to take advantage of the plethora of .wav/.mp3 javascript libraries to gain more insight.
I'm wondering (1) how can you convert a time trace to a .wav, (2) how to convert a .wav to a time trace, and (3) I'm also asking for any unbiased insight you might have to offer.
Not sure what the frequency is of what you are trying to sample, but standard wav files have a sample rate of 44.1k. They are intended for sonic applications only.
So unless you're capturing something oscillating <22khz, or you can beef up your sample rate somehow, this might not be the right tool.
If you still feel a wav works for you then you may be better off manually recording into existing software like Audacity. And analyzing the resulting wav in code after.
Comment if you need more info on how to set up recording that into existing software.