# Android Impulse Response

**URL:** <https://discourse.processing.org/t/android-impulse-response/46636>\
**Category:** Processing for Android\
**Created:** [July 1, 2025, 4:15am UTC](https://discourse.processing.org/t/android-impulse-response/46636 "2025-07-01T04:15:21Z")\
**Posts on this page:** 1\
**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 1, 2025, 4:15am UTC](https://discourse.processing.org/t/android-impulse-response/46636/1 "2025-07-01T04:15:21Z")

</div>

Very powerful tool that can detect Impulse Response with high accurate measurements and able to capture response store it then analysis it to compare the response with same material under test by getting the unique signature of the acoustic resonance to detect similarities of objects under the test …it is a prototype model working at about 40 CM between microphone and objects I have used filter in the code and Cross correlation function with APDE built in libraries

```auto

import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaRecorder;
.
.
.
.
void recordAudio() {
  int bufferSize = AudioRecord.getMinBufferSize(44100, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT);
  AudioRecord recorder = new AudioRecord(MediaRecorder.AudioSource.MIC, 44100, AudioFormat.CHANNEL_IN_MONO,
    AudioFormat.ENCODING_PCM_16BIT, bufferSize);

  if (recorder.getState() != AudioRecord.STATE_INITIALIZED) {
    status = "Failed to initialize recorder";
    return;
  }

```

Start run

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

Capture

 ![i2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/6/5/65de8b52ea200103a75c66d0cc2204e29d745ff9.jpeg)

Store captured resonance as reference

 ![i3](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/f/efb649c99c94324872fc2c0cd60fab785907c945.jpeg)

After test the same object and compared with reference it is matched and the black triangle is red

 ![i4](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/b/d/bda8bb7149472adeb20f53cf8ede7986a17066ed.jpeg)
