3

Let's say I'm jamming on my guitar with a song I'm listening to on YouTube. It's a song that is tuned a half step down. I would like to play that song half a step higher so I don't have to keep re-tuning my guitar (or use a capo, play different chords, or anything like that) to play along.

How can I shift the frequency of all of the audio output of my computer?

  • using Ubuntu 14.04.1 LTS
2
  • 1
    Any audio software (even free ones like Audacity) can shift the frequency of a particular sound source, but I don't think that you can shift the frequency of all global sources coming through your sound card (I would guess not).
    – meatspace
    Commented Apr 15, 2015 at 20:44
  • Get it as a mp3 and google 'transpose mp3' - transposr.com/mp3 for example. Thats probably easier than changing all sound output.
    – Allman
    Commented Apr 16, 2015 at 8:04

1 Answer 1

0

To my knowledge there is no UI which comes with Ubuntu through which you can tweak the sample rate and audio bit depth which would have made the job easier. But the audio configuration files for the sound server can be found under /etc/pulse/. The daemon.conf file under this path is the one which we need to change our settings.

Open a terminal and issue the following command with sudo.

gedit /etc/pulse/daemon.conf

Copy the entire contains of the file and save it in a plain text file somewhere in your home folder. This is just a backup, in case something goes wrong you can get back the original settings and restore it.

Now at the bottom of the file you will find these lines.

; default-sample-format = s16le
; default-sample-rate = 44100
; default-sample-channels = 2
; default-channel-map = front-left,front-right

Here ; are used for commenting. So to make a setting take effect you need to un-comment it by removing the ; and change the setting value to the desired one. For example you like to change the frequency to 192000 Hz, so you should change the

; default-sample-rate = 44100

to this

default-sample-rate = 192000

After you are done editing the file save it. Now for the change to take effect you need to restart the sound server. You can simply reboot the system or enter the following commands to restart the server without rebooting your system.

pulseaudio --kill
pulseaudio --start

And that's it. There are also many other settings in the /etc/pulse/daemon.conf file which you might find useful so take a good look at the file when you open it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .