Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have one speaker next to my computer which I use mostly as a headphone amplifier. On occasion I need to use it as a loudspeaker. Is it possible to quickly change the audio output from stereo to mono, either system-wide or as a plugin for a media player?

share|improve this question
    
As a side note I can do this on my android phone using the Voodoo Control app which requires a custom kernel that tweaks the headphone amp found in the galaxy phones –  daithib8 Sep 17 '11 at 8:56

4 Answers 4

You might be able to use the pulseaudio sound settings manager to change stereo to mono. Or perhaps you can try just panning everything to the left or right speaker.

share|improve this answer
    
Paning won't work. It will not mix both channels together, it will mute one of the speakers and take just the output from one of the channels. –  Rafał Cieślak Apr 22 '11 at 9:50
    
Panning is what David is asking for. Panning is the act of mixing two channels together in order to output them to one speaker, usually in order to give the impression that the sound is coming from a particular direction. Hence the name pan(orama)ing. A variant of this, called panning straight up, mixes the channels together but outputs an equal amount of the result to each speaker. Since he is only using one speaker this would also work for him. Pulseaudio volume control only adjusts the balance, where the volume at each speaker is adjusted though no mixing takes place. –  daithib8 Apr 22 '11 at 13:05

It seems there is no easy way to do this.

You can do it though, by proxying all PulseAudio output to a Jack sink. Too cumbersome to be used casually...

share|improve this answer

Find the name of your audio sink by running pacmd list-sinks | grep name:. Then run this command: pacmd load-module module-remap-sink sink_name=mono master=<name_of_audio sink_given_by_previous_command> channels=2 channel_map=mono,mono (taking care to remove the angled brackets), or add the argument to pacmd to /etc/pulse/default.pa , to have it run at startup. Then in Sound Preferences choose "Mono" as the output but remember to reduce volumes by half, since two channels are getting mixed into one, or else you'll have distortion. To test, run : speakertest -c 2 -t sine.

share|improve this answer
    
Worked like a charm! Good stuff! I had to do this because I only have 1 speaker left (of 4 speakers, using only the front connector) and the Phone Booth DVD was playing some sound in the wrong channel or something. –  Bruce van der Kooij Mar 15 '12 at 9:05
    
Am I the only one who gets system sound distortion even at low volumes when I try this? –  Wolter Hellmund Apr 23 '12 at 3:52
2  
Be sure to reduce the "Applications" volume (also found within the Sound Preferences) as well as the "Output" volume. If you play music from the terminal you can adjust that volume from there. –  daithib8 May 21 '12 at 16:04
    
For me sound get extremely faint using the new sink and it doesn't combine the two channels. –  Christian Sep 5 '12 at 21:17
2  
Just a comment for anyone who gets a little confused (as I did): when @daithib8 writes "or add the argument to pacmd to /etc/pulse/default.pa", that means doing sudo emacs /etc/pulse/default.pa (or sudo nano or whatever editor you prefer), scrolling down to the end, and then pasting everything from the command except the pacmd part in to a new line at the bottom of the file. Then save and restart :-) –  machineghost May 3 '13 at 21:40

I've cast answer 1 into a perl-script, so I don't need to remember these 2 commands:

#!/usr/bin/perl
use strict;

my @choices = ();
my $i = 0;
for (`pacmd list-sinks`) {
    if( /name:.*<(.+)>/) {
        $choices[$i++] = $1;
        print "$i:\t$1\n";
    }
}
my $choice = $choices[<>-1] or die "invalid choice";
exec (qw(pacmd load-module module-remap-sink sink_name=mono),
    "master=$choice",
    qw(channels=2 channel_map=mono,mono));

(I would've annotated that answer, but my karma is to low ;-) )

share|improve this answer
    
Worked awesomely, thanks! –  Propeller Jun 7 '13 at 14:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.