2
$\begingroup$

EDIT: Posting to Wolfram Community too.

I have a dataset of the form

{{a1,t1},{a2,t2},...,{an,tn}}

where ai is the level and ti is the time of that level. Is it possible to play this as a sound in Mathematica?

Example data (written in a different form for clarity):

ai:   0.0006    0.0407    0.0808    0.1210    0.1611    0.2013    0.2415    0.2816
ti:   0.0001    0.0074    0.0147    0.0220    0.0293    0.0366    0.0439    0.0512
$\endgroup$
  • 1
    $\begingroup$ I don't believe Mathematica can handle nonequispaced samples as audio natively. You could use Interpolation[] to resample, but it is admittedly cheating. Is there really no way for you to obtain equispaced samples? $\endgroup$ – J. M. will be back soon Feb 16 '16 at 20:56
  • $\begingroup$ @J.M. But the data given by the OP is equispaced... Daniel, what should happen in between those times? Should the intensity smoothly ramp up and down, or should it be held constant at the value shown for the duration of the interval? What is the unit of $ti$? $\endgroup$ – MarcoB Feb 16 '16 at 21:07
  • $\begingroup$ @J.M. I see. Well, perhaps the OP will shed further light on this. $\endgroup$ – MarcoB Feb 16 '16 at 21:11
  • $\begingroup$ @Marco, in that case, it can be converted to a TimeSeries[] object that can be handled by ListPlay[]. $\endgroup$ – J. M. will be back soon Feb 16 '16 at 21:16
  • $\begingroup$ @J.M. The data is not necessarily equispaced, it was just in this example. Between these times should remain constant (I think, I might change this). The point of this is that the ti are not necessarily equispaced. $\endgroup$ – wilsnunn Feb 16 '16 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.