<div dir="ltr">Joel,<div><br></div><div>In this particular case I'm working on integrating the VARA-FM digital mode into the <a href="https://getpat.io/">Pat</a> Winlink client. However, I'm excited that this approach will work for other similar use cases. With just a little more work, I can feed pre-recorded audio into decoder/modem programs for automated tests! This was already possible in some modem programs (e.g. WSJT-X) that had built in such functionality, but doing it through PulseAudio makes the approach repeatable for pretty much any software modem!</div><div><br></div><div>Chris</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 15, 2021 at 4:20 AM Joel <<a href="mailto:jm-hotmail@hotmail.com">jm-hotmail@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div 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="gmail-m_8584134862494889316Signature">
<div>
<div id="gmail-m_8584134862494889316divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);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="gmail-m_8584134862494889316appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_8584134862494889316divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> pulseaudio-discuss <<a href="mailto:pulseaudio-discuss-bounces@lists.freedesktop.org" target="_blank">pulseaudio-discuss-bounces@lists.freedesktop.org</a>> on behalf of Chris Keller <<a href="mailto:xylo04@gmail.com" target="_blank">xylo04@gmail.com</a>><br>
<b>Sent:</b> Thursday, October 14, 2021 9:25 PM<br>
<b>To:</b> <a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freedesktop.org</a> <<a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freedesktop.org</a>><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" src="cid:17c84ae175818f9c89e1"><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>
</div>

</blockquote></div>