# Android soundcard TX/RX

**URL:** <https://discourse.processing.org/t/android-soundcard-tx-rx/46785>\
**Category:** Processing for Android\
**Created:** [July 25, 2025, 1:11am UTC](https://discourse.processing.org/t/android-soundcard-tx-rx/46785 "2025-07-25T01:11:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [July 25, 2025, 1:11am UTC](https://discourse.processing.org/t/android-soundcard-tx-rx/46785/1 "2025-07-25T01:11:15Z")

</div>

This project using Android soundcard as TX/RX at the same time and

Generates sine, square, NRZ (Non-Return-to-Zero), and noise waveforms

Supports pulse modulation with adjustable PRF (Pulse Repetition Frequency) and pulse width

Frequency range from 20Hz to 20kHz

Real-time FFT (Fast Fourier Transform) analysis of microphone input

Peak frequency detection with noise filtering

Spectrum visualization

Frequency sweep with configurable start/end frequencies, step size, and delay

Three sweep modes:  
UP, DOWN, and BETWEEN adjustable 2 frequencies

Optional mute duration between frequency steps  
sliders for frequency, PRF, and pulse width control

Buttons for playback control, waveform selection, and special functions  
Separate windows for sweep control and microphone analysis

Ability to save reference spectra

Similarity scoring between live and reference signals  
Custom FFT implementation  
Hanning window for spectral analysis  
Peak detection with accurate frequency measurement  
Noise filtering and smoothing

Playback controls

Waveform selection

Pulse modulation toggle

Frequency and analysis displays

Sweep mode selection

Parameter configuration

Start/stop controls  
Mic Sensitivity adjustment  
Mic Delay control  
10 frequencies history display

Here is Main menu with accurate frequency reading

 ![11a](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/b/1/b115569049e1edc8a213539424b6d913d9429c8f.jpeg)

Sweep menu

 ![22a](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/1/0/109f3c95886f4b2e99cab98d0fc1a0e122494a49.jpeg)

Mic control and frequencies history record

 ![33a](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/9/b/9bd0219a018e850c9b2e59d93794a758759504a8.jpeg)

Could save and compare and match up to 10 peaks the stored spectrum has white color live spectrum different color

 ![4a](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/5/6/569e31f78ac14f40348f7fe5f0a2ade177580f78.jpeg)

---

<div class="post-metadata">

**Author:** ![shedMusic](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/shedmusic/32/601_2.png) [@shedMusic](https://discourse.processing.org/u/shedMusic)\
**Post date:** [July 25, 2025, 8:29am UTC](https://discourse.processing.org/t/android-soundcard-tx-rx/46785/2 "2025-07-25T08:29:47Z")

</div>

Looks interesting…  
Is it available to download somewhere?

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [July 27, 2025, 5:46pm UTC](https://discourse.processing.org/t/android-soundcard-tx-rx/46785/4 "2025-07-27T17:46:26Z")

</div>

> [@shedMusic](#):
>
> Is it available to download somewhere?

This is the first prototype and some enhancement I am working on when finished I am going to post it on GitHub

---

<div class="post-metadata">

**Author:** ![shedMusic](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/shedmusic/32/601_2.png) [@shedMusic](https://discourse.processing.org/u/shedMusic)\
**Post date:** [July 27, 2025, 6:09pm UTC](https://discourse.processing.org/t/android-soundcard-tx-rx/46785/5 "2025-07-27T18:09:57Z")

</div>

Ok … I’ll watch out for future posts 👍

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [July 27, 2025, 10:39pm UTC](https://discourse.processing.org/t/android-soundcard-tx-rx/46785/9 "2025-07-27T22:39:16Z")

</div>

The heart of this project is to break the capabilities of the sound card by manipulating the timing to get the shortest spectrum analysis time… which is similar to using direct ports on the Arduino, but with a different technique… and it actually worked.

SAMPLE\_RATE = 48000;  
FFT\_SIZE = 1024;  
Needs 21.33 ms time

When a small time delay is added to the microphone signal, the delay will appear in the FFT analysis time, and when the microphone delay is zero, the FFT analysis speed is completely different.

Echo peaks appears with mic delay with no delay the peak is clean indeed it’s taking less than 4 ms rather 21.33 ms

Here added about 50 ms delay to the mic

 ![adddelay](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/f/0/f0ae3307eeefdb404b841e4e694c7e125b7c5f9a.jpeg)

The peaks appear with echo or decay and sample time rise to 50 ms + real time

 ![decay](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/c/3/c3ea862bbd71d2abccf51579d272880a5ead6aef.jpeg)

Without mic delay sampling less 1 ms but in real it could reach up to just 4 ms

 ![withoutdelay](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/0/2/02957b64a77a426f88ef15bc049f5714671133c3.jpeg)

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [July 31, 2025, 12:43am UTC](https://discourse.processing.org/t/android-soundcard-tx-rx/46785/11 "2025-07-31T00:43:05Z")

</div>

Going deep  
Using USB sound card in place of headset or interal mic/speaker and it’s work

 ![soundcard](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/0/e0ebf81add2b75159bc391127a728ac0fdbfdbcb.jpeg)

Request permission

 ![permission](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/1/4/1472048d6a76286917d185a2f035e44d190b3009.jpeg)

It’s work

 ![USB](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/6/0/60584ee87008929ea77f78fc99737bb1e131c2b1.jpeg)

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [July 31, 2025, 1:15am UTC](https://discourse.processing.org/t/android-soundcard-tx-rx/46785/12 "2025-07-31T01:15:16Z")

</div>

With this connection the sound card record it self

 ![config](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/d/0/d093a96c4fc60cae2eb30ffa9de049e4c6fe550c.jpeg)

 ![feedback](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/c/a/ca9d8199f6291050617a9843e77b22e6e9a9aac0.jpeg)

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [September 6, 2025, 8:30pm UTC](https://discourse.processing.org/t/android-soundcard-tx-rx/46785/13 "2025-09-06T20:30:44Z")

</div>

New idea under construction but the hard part passed thinking to replace sliders and buttons with VR Box Bluetooth remote control

 ![Screenshot_2025-09-06-23-11-59-364](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/1/1/11932409aaf3976fbc35f3977980becf23108036.jpeg)

 ![Screenshot_2025-09-06-23-07-09-236](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/9/5/95bd78b807dbb42058e350d9c0a9cd73ffda10b3.jpeg)
