[Android General] g3v0:
Disclaimer: This is not a guide on how to record impulse responses, nor do I think it's the absolute best way to go about editing one. I am not a professional in that regard, and I'm sure the pros will say something if they have something to add, as per Cunningham's Law. There's really not a lot of information on this, this is what I've learned from trial and error.

Who this is for:

You got Viper4Android/Arise/Divine installed, and they keep saying the convolver is such a sick, powerful feature. So you downloaded and tried some IRs but the ones you found have been too loud, too strong of an effect, or just not right. You're also not an audio expert (you wouldn't need this guide), and you don't know how to go about creating/editing simple IRs.

What is an impulse response?

To be honest, I don't know the exact definition either. I believe the audio you're playing is 'multiplied' by the IR to produce a new sound based on characteristics of the IR. You can google "convolution" and "impulse response" for precise definitions. It's not too important for our purposes.

Setting Up Audacity

Download Audacity and install it. It's self-explanatory.

When you start Audacity up (after installing), go to Edit -> Preferences (or Ctrl+P).

Click on Tracks (the actual parent node), set Default view mode to Spectrogram.

Click on Tracks -> Spectograms. Here set the frequencies you care more about. Personally, I set Min to 5, Max to 20000, Scale to Log as a default. You can modify it later per track.

If you care more about Bass, set Scale to Logarithmic; if you care more about higher frequencies, set Linear.

Opening/Saving IRs

The .irs files that Viper uses are just renamed .wav files. If you try to play it, it will just sound like a brief moment of static.

Use Audacity to open (File -> Open) the .irs you want to load. If it gives you a warning, select copy the file (should be default) and hit OK.

Before saving, go to Effect -> Normalize, and normalize to 0dB.

After you make changes and want to save it, go to File -> Export -> Export as WAV, and save it as one of the WAV formats. Viper works with both 16 and 32bit formats. I use the 32-bit float PCM one because I figure more bits = better quality, but that's not necessarily true.

After you save it, you should rename the extension to 'irs'. The main reason we don't want to keep it WAV is so the Android media scanner doesn't automatically add them to your songs/gallery/etc.

Note about Sample Rate

When you open one of these files, they will typically either be 44100 Hz or 48000 Hz. Most of the time, they will be 48k, but what you want depends on your device. For example, my Pixel 2XL processes at 48k for the phone speaker, but when I connect to my car Bluetooth to play music, it uses 44k. To check what your phone is processing at, play some music with the audio output you want to use (headphones, speaker, etc). Open Viper, go to Menu -> Driver Status.

Screenshot: Link

[IMG="Viper Screenshot"]https://i.imgur.com/H96UI64h.png[/IMG]

If the IR has the wrong sample rate, you need to change it. In Audacity, in the bottom left, change the Project Rate (Hz) to the correct one (as displayed in Viper). Next, select all on the track (Ctrl+A) and go to Tracks -> Resample, make sure it's the same as the project rate you just changed to, and hit OK.

Screenshot: Link

[IMG="Audacity Resample Screenshot"]https://i.imgur.com/lWRKtGu.png[/IMG]

Adjusting Gain (for IRs that are too loud or too soft)

When you apply the IR in Viper, if it's too loud, that means its gain is too high. This will sometimes also manifest itself as the volume fluctuating up and down. Typically you don't want to set your volume too high when using the convolver since it will cause this effect more often. I will give an analogy based on percent rather than dB. Basically, if the IR is telling the device to play a certain frequency at 120% max volume, the convolver will scale everything by around 83% (100/120 = 5/6 = ~83.3%), so that the 120% frequency will now play at 100%, everything that was previously at 100% will play at 83%, etc.

To adjust gain, use the slider next to the track options. Screenshot: Link

[IMG="Audacity Gain Screenshot"]https://i.imgur.com/m8O7ipT.png[/IMG]

You may also use Effect -> Normalize if you'd like.

Adjusting gain will only affect the loudness of the IR, not the overall effect.

Basic Frequency Analysis

To get a basic understanding of the frequencies in the IR, select all (Ctrl+A) and go to Analysis -> Plot Spectrum. Make sure Algorithm is "Spectrum", Axis is "Log Frequency". Function shouldn't matter too much.

You will be adjusting Size. The default is 1024. Lower values gives you a good idea of the balance across the spectrum. Higher values gives more definition to the lower bass frequencies, at the cost of less sensitivity to the higher frequencies.

Useful references for understanding frequencies:

http://www.independentrecording.net/irn/resources/freqchart/main_display.htm

http://www.audio-issues.com/music-mixing/all-the-eq-information-youll-ever-need/

https://www.teachmeaudio.com/mixing/techniques/audio-spectrum/

http://productionadvice.co.uk/using-eq/

Basic Modification

Select all (Ctrl+A) and go to Effect -> Equalization. You can mess around with the frequencies here. I will give an examples below.

A high pass filter (Effect -> High Pass Filter, in the second half of the menu) may be useful if the IR boosts ultra-low frequencies that your device can't output (it varies, but 20Hz should be a good cut off). Not always necessary.

Base Impulses and Creating Custom IRs

If you want to create a custom IR, load the base impulse for your sample rate. Download them from: Link

You can modify it as explained above, creating your own custom effect. Normalize (Effect -> Normalize) to 0dB.

Before you export, select all and go to Effect -> Truncate Silence. These are the settings I use: Link

[IMG="Truncate Silence Settings"]https://i.imgur.com/n0v5Qbw.png[/IMG]

Export it as explained above.

Example Modification

I like the SuperiorBass+ IR. It gives nice, deep bass, but I have a sub in my car, and after a certain point, I can't hear the music over the rumble with the car shaking. My car Bluetooth also only processes in 44k.

I open the SuperiorBass+.irs in Audacity, and notice the sample rate is at 48k. Screenshot: Link

I change Project Rate to 44100. Select all, go to Track -> Resample, make sure it's also 44100, and hit OK.

Select all, Analyze -> Plot Spectrum. With Size at 2048, I see there's a big boost at around 60Hz. I keep this in mind. Screenshot: Link

Next I go to Effect -> Equalization, and I create a curve that somewhat compensates for the boost. Screenshot: Link

Effect -> Normalize to 0dB.

I export by going to File -> Export -> Export as WAV, and save it in the "WAV (Microsoft) 32-bit float PCM" format. I rename it to a .irs extension, move it to my phone's /sdcard/Viper4Android/Kernel/ directory, and test it out in my car.

If any part of this guide is wrong, or you have something to add, please let me know so I can correct it (and learn :laugh:)!