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
and
pactl load-module module-loopback latency_msec=1
But none worked as expected...
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:
then the source and sink are picked automatically. To get the name of your sinks and sources you can use
pactl list sources
andpactl 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 likealsa_output.pci-0000_00_14.2.analog-stereo
.But the easier way is likely to just simply use
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.