Questions relating to Mathematica's sound and audio functionality, including Play, Sound and Speak

learn more… | top users | synonyms (3)

20
votes
4answers
2k views

Is it possible to use Mathematica to record sound and/or vision?

I think the title says it all. I know about ImageCapture which seems to capture stills. Can ImageCapture be made to capture a ...
20
votes
3answers
2k views

Can one find the beat of a tune with Fourier analysis?

I'm trying to find out if it's possible to find the beat of a tune by Fourier analysis with Mathematica. I'm taking a 44.1 kHz sample sound and hoping that I might get a nice peak for a frequency ...
20
votes
1answer
382 views

How can I interrupt Speak?

I want to use an event handler to stop speaking: Speak[ExampleData[{"Text", "DonQuixoteISpanish"}]] The only way I can stop this is by restarting mathematica!
18
votes
4answers
1k views

Random data generator

Inspired by Quality of random numbers I would like to set up a true random data generator in Mathematica. My idea is to use the static from an open microphone. I recall reading about extracting the ...
16
votes
1answer
630 views

Manipulating a continuous stream of sounds

I need some audio-feedback when a locator is moved on a surface. I have the following code that produces a beep every time the dynamic controller is interacted with such that the pitch of the sound ...
11
votes
3answers
2k views

How to approximate a given WAV file with trigonometric series?

I'd like (together with a few people) to prepare a presentation about Fourier series for middle/high school students. I thought it might be quite cool to play a violin sound from, say, a WAV file, ...
11
votes
3answers
755 views

How to play microtonal music using Mathematica?

I am trying to model microtonal music using Play. I have only partial success because it takes such a long time to make some sound. Could you please have a look ...
10
votes
2answers
3k views

How do you remove noise to detect just the human voice?

How do you detect different sound frequencies and cut off parts in an audio file? Among instruments, how do you pick up the human voice?
10
votes
1answer
775 views

Making a wav file from a list of numbers in Mathematica

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 ...
10
votes
4answers
603 views

How do I change the way Mathematica pronounces English words (e.g. “futile” is not pronounced correctly)?

I am absolutely desperate. I cannot get my Borg to pronounce "futile" correctly. Speak["Resistance is futile."] Leo pronounces "futile" as expected and there is ...
10
votes
2answers
338 views

Realtime audio processing using Dynamic

Can I make real time audio processing with Mathematica in the same way I can do with images using Dynamic[CurrentImage[]]. I know that is possible to use ...
10
votes
2answers
878 views

Creating a realtime MIDI Out

I have a live stream of notes and note velocities using SoundNote and SoundVolume. My problem is that I have no idea how to ...
9
votes
1answer
403 views

How to add a short wav music clip into a Mathematica animation

I have the following Mathematica animation: Animate[Plot[k*x^2, {x, -2, 2}, PlotRange -> {{-2, 2}, {-10, 10}}], {k, -2, 2, 0.1}] I also have a sound file ...
7
votes
1answer
3k views

How to extract sample values from an imported WAV file?

Suppose I read a file with B = Import["something.wav"] Now how can I obtain a list of sample values?
7
votes
2answers
157 views

How to export Speak output?

I made a series of interval workouts based on Speak[], where the voice tells me when the intervals start, when they stop and how much time I have left to prepare. ...
6
votes
1answer
1k views

How to use and input audio wav file into a Wolfram demonstration

I am trying to send a Wolfram demo, which contains a sound wav file. sound = Import["C:/myfile.wav", "Data"]; snd := sound[[1]]; or snd = sound[[1]]; Is it ...
6
votes
1answer
161 views

Is it possible to concatenate sounds?

I used to be able to make a Table of ListWaveform objects, and Export them; ...
6
votes
1answer
112 views

How to extract notes and chords from audio?

I have a 3-second recording of a guitar chord which you can safely download here. I'm trying to use Mathematica's wavelet features to find out the notes in the chord, at least the docs says that ...
6
votes
1answer
158 views

Why is there a limit of 15 different instruments to be played simultaneously, with Sound / SoundNote?

It seems to be impossible to play more than 15 different instruments simultaneously with the Sound[{Soundnote[...],...}] construct. Any guesses why it is so? With ...
6
votes
0answers
157 views

Manipulating the pitch of a sound

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 ...
5
votes
2answers
349 views

Why can I still hear sound when the frequency of the periodic function inside Play is lower than the range of human ear?

This question is originally part of this question, but this issue seems to be different from the former one, so I think it's better to start another question for it. Usually, human can't hear sound ...
5
votes
2answers
850 views

Frequencies represented in a DFT list (Fourier[])

I have a sound sample (sample rate: 44100). When I have a list l with n successive elements from the sample, ...
5
votes
3answers
519 views

Using Manipulate to vary the frequency of a sound produced by SoundNote[]

I have tried various ways to combine Manipulate and Sound/SoundNote that would allow me to vary the frequency of a sound while it is being produced. The addition of Dynamic didn't help, but did ...
5
votes
1answer
301 views

Multiple instrument chord

I would like to create a chord using multiple instruments. This started as an attempt to explain music to a friend but my curiosity has taken over. I am familiar with the SoundNote function. I know ...
5
votes
1answer
184 views

Looking to create a lesson on sensory perception of sound

I'm looking to show students a lesson on sensory perception, more specifically on masking. I know a little Mathematica but sound processing has evaded me. I would like to create a white noise and ...
5
votes
2answers
75 views

How to loop a sound

I have created a sound which I would like to play continuously until stopped, by looping back to the beginning. The sound is represented as list of samples, which can be played by ...
5
votes
1answer
75 views

Why does Play fail to produce a widget sometimes?

If I define: aNote[x_] := Sin[440 * 2 * Pi * x]; then this works (i.e. it produces a widget with a Play button, and clicking on this button produces an A note): ...
5
votes
1answer
126 views

Is there a way to prevent audio from becoming out of sync with graphics?

The code below could be used to say help Pre-Kindergarten and Kindergarten children learn about the numerals and numbers from one to 9. The problem is that this age group would be prone to just ...
5
votes
0answers
109 views

realtime audio processing possible? [duplicate]

I'm an improvising musician and also a sound engineer. So, I'm interested in the creative process of music as well as the science of sound. I would like to connect my guitar with an interface to my ...
5
votes
0answers
135 views

How to plot Spectrogram of SoundNote?

I try to use the expression: Spectrogram[Sound[SoundNote[{"C", "E", "G", "C5"}, 10, "Vibraphone"]]] to plot the spectrogram of a SoundNote. But Spectrogram ...
4
votes
4answers
551 views

Why can I still hear sound when the frequency of the periodic function inside Play is higher than the range of human ear?

We know that usually sound that is perceptible by humans has frequencies from about 20 Hz to 20,000 Hz, but as the title said, I can still hear the sound of the outputs of the following code: ...
4
votes
2answers
90 views

Save imported sound into a notebook (so I can e-mail it)

At the end of my code I'd like to put an imported (wav) sound. I would then play it with EmitSound[my_sound] when this cell will ...
4
votes
2answers
272 views

How can I emit a sound only during a mouseover?

Emitting a constant sound or note (no interruptions) for a fixed duration is easy, but a dynamic duration, not so easy.
4
votes
1answer
721 views

How to get the total intensity of a certain frequency range in an audio file?

Does anyone know how to get the total intensity of a certain frequency range in an audio file? Let's say an audio file has a frequency range from 0Hz to 20KHz, and I want to extract the total ...
4
votes
1answer
474 views

How can I regulate 'Play sound duration' in Mathematica 8

How can I regulate the time of play sound[s] - duration in Mathematica 8. I want to import and save wav file in *.nb document & manipulate (with) the sound duration, for example, select sound ...
4
votes
1answer
263 views

How to fix MIDI playback on OS X?

Sometimes sounds specified using SoundNote (i.e. things played using MIDI) don't play properly on OS X. Some notes are missing and some are stuck. At least this ...
4
votes
1answer
150 views

Import audio in uLaw format?

How do I import a uLaw-format audio file into Mathematica? Here's an example: hello-world.ulaw For reference, here's the same file in wav format: hello-world.wav As I understand it, the uLaw ...
4
votes
0answers
129 views

LowpassFilter in v10: unit issues?

Bug introduced in 10.0.0 and persisting through 10.0.2 or later I tried this with a clean start and no documents loaded. Now, evaluating the following on the documentation page for ...
4
votes
0answers
198 views

Resources for Sound Synthesis & Design

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. ...
3
votes
1answer
74 views

Extracting a time series from a sound object

After importing a sound file, how can I generate a time series (preferably as an $n\times 1$ matrix) which gives the intensity at equal time intervals?
3
votes
1answer
153 views

How to manipulate spoken text with Speak?

I need to vary the speed, pause, reverse and in general control aspects of the playback of Speak[] is this possible?
3
votes
1answer
399 views

How to extract Audio Record data form Sound[SystemDialogInput[“RecordSound”] ?

When I set parameter "SoundReg" to collect Audio Steaming data - it's working After that I use Button\["Record"\] In my ...
3
votes
1answer
253 views

An ancient MIDI keyboard?

There is a demostration project http://demonstrations.wolfram.com/KeyboardAndComposer/ where you can compose Western music using a 97 keys simulated midi keyboard. I study eastern and ancient music ...
3
votes
0answers
62 views

What SampleRate and SampleDepth does Mathematica use on output?

The Play function will happily accept arbitrary values for its SampleDepth and SampleRate ...
3
votes
0answers
149 views

Is it possible to model the piano key attack?

My purpose is to model the attack of a piano key. As the key is pressed a sound must be emitted. When the key is released the sound must stop with decreasing volume. I have a partial success when ...
3
votes
0answers
124 views

Automatically Recording Sound

I was hoping I could recreate a noise cancelling set-up by recording sound from the microphone in my headset or from the computer and play it back in my speakers or headphones with the appropriate ...
2
votes
3answers
471 views

Notification sound when simulation done? [duplicate]

Possible Duplicate: Customize front end to add notifications when evaluation finishes? How to setup sound alert notification when simulation is complete? I need to do something else while ...
2
votes
1answer
456 views

Extract the left channel from an mp3 file

I'm trying to control where a sound is going to be heard, in the left For example, when I import an mp3 file, and I want to hear it only from the left ear, what should I do? I've never worked with ...
2
votes
1answer
309 views

Demonstrate aliasing effect in sound

I'm trying to demonstrate the aliasing effect using sound, that is, when the sample rate is fixed and the sound frequency is increased, we would hear the sound pitch go down when we pass the Nyquist ...
2
votes
2answers
367 views

Sound data Import Export

Can't regain the data after Export. Create an array of sampled amplitude values: 2. Visualize as sound 3. Save it 4. Get it back 5. ??? ...