7
$\begingroup$

Are there any resources for sound synthesis using Mathematica?

This page, Mathematica: Audio Synthesis Software, refers to other software packages, e.g. Max/MSP and Csound, for real-time synthesis.

However, I would like to use Mathematica's signal processing capabilities for analysing the sound effects of various filters, before I have to delve into some other package.

Play and Sound do not seem to have any real-time capability.

Max/MSP features image

enter image description here

Edit

The immediate stumbling block is the lack of real-time control when using Play, e.g.

EmitSound[Play[Sin[500 t^2], {t, 0, 10}]]

For instance, the played sound wave doesn't seem to be easily manipulated.

 Manipulate[EmitSound[Play[Sin[500 a t^2], {t, 0, 10}]], {a, 1, 4}]

Note. You may need to quit Mathematica to stop the above command.

If the emitted sound can be manipulated then filter effects could be applied in variable magnitudes.

$\endgroup$
3
  • $\begingroup$ Chris, I fear this question is too broad at the moment. Be happy to retract though if you make a good case ;-) $\endgroup$
    – Yves Klett
    Commented May 9, 2014 at 11:35
  • $\begingroup$ @Yves - a good place to start would be getting dynamic control of an emitted sound. I have added an edit addressing this. $\endgroup$ Commented May 9, 2014 at 11:53
  • $\begingroup$ For the kind of control you seem to be seeking, you probably want to work at the level of the waveform (e.g., sing SampledSoundList) rather than trying to use higher level commands such as Play. But, you will not be able to get real time action from Mathematica as you can for instance in Max/MSP -- at best you will work off line, generate a sound and then play the sound. $\endgroup$
    – bill s
    Commented May 9, 2014 at 18:08

2 Answers 2

3
$\begingroup$

6 years later, I found that somebody asked the same I was asking myself an hour ago. Here is what I found to be possible in 2020:

freqinitial = 440;
freq = freqinitial;
stream = AudioStream[Function[t, Sin[2 Pi t freq]]];
Column@{Button[
   Dynamic[stream["Status"]],
   Switch[stream["Status"],
    "Playing", stream["Status"] = "Paused",
    "Paused" | "Stopped", stream["Status"] = "Playing"
    ]
   ],
  Slider[Dynamic[freq], {freqinitial, 2 freqinitial, 1}],
  Dynamic[freq]
  }

enter image description here

$\endgroup$
2
$\begingroup$

You might check out this WTC2020 talk by Leonardo Laguna Ruiz.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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