<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Chris -</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Are you operating an SDR rig or one of the digital modes (e.g., JTx, FTx, etc.)?<br>
</div>
<div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p style="margin-top: 0px; margin-bottom: 0px;">Joel W2TQ<br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">973 736 8306<br>
</p>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> pulseaudio-discuss <pulseaudio-discuss-bounces@lists.freedesktop.org> on behalf of Chris Keller <xylo04@gmail.com><br>
<b>Sent:</b> Thursday, October 14, 2021 9:25 PM<br>
<b>To:</b> pulseaudio-discuss@lists.freedesktop.org <pulseaudio-discuss@lists.freedesktop.org><br>
<b>Subject:</b> [pulseaudio-discuss] Recipe: recording sound card input and output</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi folks,
<div><br>
</div>
<div>I just spent a while figuring out how to solve a particular need and want to save it in the mailing list for posterity.</div>
<div><br>
</div>
<div>I'm an amateur radio operator, and we make extensive use of external sound cards for interfacing computers with radios for digital communication modes. I was experiencing a problem where I really wanted to record received audio (RX) to the left channel
of a file, and transmitted audio (TX) to the right channel. Doing so would let me hear exactly what the modem program heard and sent.</div>
<div><br>
</div>
<div>After much fussing, I found an arrangement that worked: set up a null-sink to represent the rx-tx stream I wanted, then use two loopbacks, one each for RX and TX. Once that was set up, recording the file was simple.</div>
<div><br>
</div>
<div><span style="font-family:monospace"># </span><span style="font-family:monospace">BurrBrown </span><span style="font-family:monospace">chipset used in SignaLink USB</span></div>
<div><font face="monospace">SOUND_CARD="BurrBrown" <br>
</font></div>
<div><font face="monospace">RADIO_RX=$(pacmd list-sources | egrep "input.*$SOUND_CARD" | grep -oP "<\K[^ >]+")<br>
RADIO_TX=$(pacmd list-sources | egrep "output.*$SOUND_CARD.*monitor" | grep -oP "<\K[^ >]+")<br>
</font></div>
<div><font face="monospace">pactl load-module module-null-sink sink_name=rxtx sink_properties=device.description=RXTX<br>
</font></div>
<div><font face="monospace">pactl load-module module-loopback source=$RADIO_RX sink=rxtx channels=1 channel_map=left<br>
</font></div>
<div><font face="monospace">pactl load-module module-loopback source=$RADIO_TX sink=rxtx channels=1 channel_map=right</font><br>
</div>
<div><br>
</div>
<div><img alt="Radio Interface Source_Sink.jpg" width="542" height="128" data-outlook-trace="F:1|T:1" src="cid:ii_kuroobec0"><br>
</div>
<div><br>
</div>
<div>Hopefully this will help someone in the future looking to record both the input and output to a sound card!</div>
<div><br>
</div>
<div>Chris Keller, K0SWE</div>
</div>
</div>
</body>
</html>