I have an external sound card. It is connected to my laptop via USB and to piano via a jack - jack cable.

I can record sounds from piano (using Audacity) but I cannot hear the sounds in the live mode.

How can I enable live mode? How can I hear the sounds while I am playing piano?

I already tried:

gst-launch pulsesrc ! pulsesink


pactl load-module module-loopback latency_msec=1

But none worked as expected...

  • 1
    @Sneetsher See this chat room where we struggled to fix the problem... Unfortunately, no solution yet. Commented Jan 29, 2014 at 7:26

1 Answer 1


Your problem is likely that the automatically picked source and/or sink for the loopback module is wrong. If you don't specify the source and sink when loading the module, e.g. with:

pactl load-module module-loopback latency_msec=1 source=1 sink=0

then the source and sink are picked automatically. To get the name of your sinks and sources you can use pactl list sources and pactl list sinks. From that output you can use in the above command the number id of the source, or its name, which can be something like alsa_output.pci-0000_00_14.2.analog-stereo.

But the easier way is likely to just simply use

pactl load-module module-loopback latency_msec=1

and then launch pavucontrol, go to the Recording tab, change Show: Applications to Show: All streams. Now you can see from where the loopback module is recording, change it to the source from which your piano sound is coming. Then go to the Playback tab, and do similiarily and change the output of the loopback module to the sound sink where you would like to hear your piano.

  • 1
    I used pactl list commands to get sources and sinks and then I run pactl ... with source=2 and sink=1 - I still don't hear the sounds from piano. When some sounds were played on laptop they entered in an infinite cycle... :-) I unplugged the USB cable, quickly. The problem is that I can record sounds very clear from piano using the external audio card, but I cannot hear them live in headphones (that are connected to the external audio card). Commented Jan 11, 2014 at 16:28
  • The loopback works for me but about every 1.5 minutes there is a pause for about 1 second. I played with the buffer handling using the pulse audio daemon.conf but it doesn't fix the issue. Doing this increases the latency but the pauses don't go away. Is there a separate way to increase the buffer size of JUST the loopback? is there a separate issue that I am encountering? Processor is not maxed, issue persists when computer is idle. Other audio such as through shairport-sync does not have the same issue so I think its the loopback command only that's impacted. Commented Oct 2, 2019 at 22:37

You must log in to answer this question.

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