Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a list of numbers from a simulation of acoustic pressure generated by a virtual musical instrument by another program (Comsol multiphysics). I would like to "hear" the tone produced by different settings in the virtual instrument.

How can I do this? In particular, can I convert the data into a .wav file?

share|improve this question
    
Could you please provide a sample of your data? Or give a link to where it can be found. –  Vitaliy Kaurov Dec 2 '12 at 6:48
    
Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the FAQs! 3) When you see good Q&A, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. ALSO, remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign` –  Vitaliy Kaurov Dec 2 '12 at 9:35
add comment

1 Answer

In Mathematica it is easy to turn any time series data into sound. Here are the Boston temperatures for a few decades:

data = WeatherData["Boston", "MeanTemperature", {{1970}, {2012}, "Day"}];
DateListLogPlot[data, PlotStyle -> PointSize[0], AspectRatio -> 1/5]

enter image description here

To turn it into sound and play it in a Mathematica notebook:

ListPlay[data[[All, 2]], SampleRate -> 2000]

enter image description here

To export to .wav file:

Export["test.wav", %]
share|improve this answer
    
+1 Very nice example! I personally like the sound of the RiemannZeta function. –  Matariki Dec 2 '12 at 18:44
    
@Matariki Thanks! I am not sure about sampling rate for RiemannZeta and other details. Will your code fit in a comment? –  Vitaliy Kaurov Dec 2 '12 at 19:51
    
Its rather simple. I got it years back I think it was a Mathematica example. Play[RiemannSiegelZ[2000 t], {t, 0, 5}, PlayRange -> {-20, 20}] –  Matariki Dec 2 '12 at 20:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.