After reading Manipulating a continuous stream of sounds I have to ask about controlling the frequency of a Sin sound in a continuous manner, with a Play inside a Manipulate, for example. The result may sound something similar to whistling, a musical saw or a theremin.

The problem with Play is that it generates an output box to be played after and not dynamically.

Is it possible in Mathematica?

  • 1
    $\begingroup$ I'm not sure Mathematica alone is the best tool for this, but you can achieve quite a lot by using Mathematica to control other tools. Here's a basic example where I show how to control chuck using Mathematica. $\endgroup$
    – Szabolcs
    Dec 7, 2013 at 16:21
  • $\begingroup$ :( Same question than there... and great answer. The purpose was to upload some demonstration to Wolfram Demonstrations Project, so I don't think it will be possible if you need some external software... And I didn't know ChucK, so thank you again! $\endgroup$
    – Andrestand
    Dec 7, 2013 at 20:29
  • 1
    $\begingroup$ The problem is that the waveform needs to be generated before it can be played. So the only in-Mathematica solution I can see is to periodically keep generating short sections of a sine wave, and play them one after the other. The big problem with this is that there's an audible click and short pause inbetween the sections that I can't get rid of, even if the waveforms are continuously joined together (without jumps). So I don't think it's possible purely in Mathematica. $\endgroup$
    – Szabolcs
    Dec 7, 2013 at 22:11
  • 1
    $\begingroup$ With ChucK the ideal solution would be to create a MathLink interface to it, but embedding ChucK into another program is probably not trivial (I looked at that possibility briefly once) ... though definitely possible (the MiniAudicle has it embedded). There are other sound generator tools that you can try to link to Mathematica such as PureData and SuperCollider. $\endgroup$
    – Szabolcs
    Dec 7, 2013 at 22:12


Your Answer

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

Browse other questions tagged or ask your own question.