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 sounds before, so I didn't know where to start. The Documentation Center seems very undocumented on this topic.

  • 1
    $\begingroup$ MMA does not have native mp3 import. You'll need to convert it into a supported format, then import, and you can then manipulate it. $\endgroup$
    – ciao
    Commented Feb 22, 2014 at 10:53
  • $\begingroup$ And can't the mp3 be converted inside MMA? Also, what formats are you talking about? $\endgroup$
    – Arcotick
    Commented Feb 22, 2014 at 10:57
  • 1
    $\begingroup$ You could, I suppose, convert it in MMA, but there are far easier ways, including open-source. Search the doc. center for "sound", see the "sound and sonification", "the representation of sound", "audio formats", and the tutorials therein. $\endgroup$
    – ciao
    Commented Feb 22, 2014 at 11:01
  • 2
    $\begingroup$ The supported formats for sound import are here $\endgroup$ Commented Feb 22, 2014 at 13:04
  • $\begingroup$ @Arcotick so if you solve the issue with the supported formats, do I understand you correctly, that you want then extract just a channel from that stereo sound? for instance left channel is voice and right channel guitar. you want to extract the voice channel into a mono? $\endgroup$
    – Stefan
    Commented Feb 22, 2014 at 14:55

1 Answer 1


The first step is to convert the sounds to one of the supported formats. I recommend WAV or FLAC. Then you can Import it. You'll get an expression of the form

Sound[SampledSoundList[{leftChannel, rightChannel}, sampleRate]]

where rightChannel and leftChannel are numerical lists of amplitudes.

Generally, if you want to hear the sound from just the left speaker, you need to create an all-zero amplitude list of the same length for the right channel too.

For example, after extracting data from the above expression, you can re-create it as

Sound[SampledSoundList[{leftChannel, 0*rightChannel}, sampleRate]]

to mute the right channel.

  • $\begingroup$ i thought more of something like: Sound[SampledSoundList[sound[[1, 1, channel]], sample_freq]]. totally overseeing the muting effect by multiplying with zero ;) $\endgroup$
    – Stefan
    Commented Feb 22, 2014 at 18:46
  • $\begingroup$ @Stefan Yours is the way to go to extract one channel. But as I understood the question the OP wanted the sound to come only from the left channel and not the right one, hence the need for an all-zero right channel. $\endgroup$
    – Szabolcs
    Commented Feb 22, 2014 at 23:09

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.