Equalizer

From RGB-Pi Wiki
Revision as of 03:44, 26 September 2020 by RTomas (talk | contribs)
Jump to: navigation, search

The new equalizer presets are based on Retroarch DSP Filter sound engine. The following are some basic steps for creating your custom filters/presets and make them avaialble in the system:

1. Connect to the Pi via sftp and navigate to /home/pi/RGB-Pi/data/dsp_filters. In this folder you'll see the current system presets *.dsp files. 2. Create a new file or copy an existing preset to start. Do note that file names cannot contain spaces. Also you should always create both mono and stereo versions of your presets. Example: MyPreset(Mono).dsp MyPreset(Stereo).dsp 3. Edit the preset file and customize the same. Example:

  1. filters indicates the number of filters you want to apply

filters = 11

  1. filter names correspond to the *.so binary files contained in the folder

filter0 = eq filter1 = reverb filter2 = crystalizer filter3 = chorus filter4 = echo filter5 = phaser filter6 = tremolo filter7 = vibrato filter8 = wahwah filter9 = iir filter10 = panning

  1. EQ
  2. Beta factor for Kaiser window.
  3. Lower values will allow better frequency resolution, but more ripple.
  4. eq_window_beta = 4.0
  5. The block size on which FFT is done.
  6. Too high value requires more processing as well as longer latency but
  7. allows finer-grained control over the spectrum.
  8. eq_block_size_log2 = 8
  9. An array of which frequencies to control.
  10. You can create an arbitrary amount of these sampling points.
  11. The EQ will try to create a frequency response which fits well to these points.
  12. The filter response is linearly interpolated between sampling points here.
  13. It is implied that 0 Hz (DC) and Nyquist have predefined gains of 0 dB which are interpolated against.
  14. If you want a "peak" in the spectrum or similar, you have to define close points to say, 0 dB.
  15. E.g.: A boost of 3 dB at 1 kHz can be expressed as.
  16. eq_frequencies = "500 1000 2000"
  17. eq_gains = "0 3 0"
  18. Due to frequency domain smearing, you will not get exactly +3 dB at 1 kHz.
  19. By default, this filter has a flat frequency response.
  20. Full range example
  21. eq_frequencies = "32 64 125 250 500 1000 2000 4000 8000 16000 20000"
  22. eq_gains = "6 9 12 7 6 5 7 9 11 6 0"
  23. Low pass filter for the QSound chip from CPS-1/2.
  24. Some games have aliasing due low quality samples, so you can hear some annoying noisy near 11 kHz
  25. eq_frequencies = "8000 10000 12500 16000 20000"
  26. eq_gains = "0 -30 -30 -30 -30"
    1. Reverb
  1. Defaults:
  2. reverb_drytime = 0.43
  3. reverb_wettime = 0.4
  4. reverb_damping = 0.8
  5. reverb_roomwidth = 0.56
  6. reverb_roomsize = 0.56
    1. Cristalyzer
  1. Controls dry/wet-ness of effect. 0.0 = none, 10.0 = max.
  2. crystalizer_intensity = 5.0
    1. Chorus
  1. Controls the base delay of the chorus (milliseconds).
  2. chorus_delay_ms = 25.0
  3. Controls the depth of the delay. The delay will vary between delay_ms +/- depth_ms.
  4. chorus_depth_ms = 1.0
  5. Frequency of LFO which controls delay.
  6. chorus_lfo_freq = 0.5
  7. Controls dry/wet-ness of effect. 1.0 = full chorus, 0.0 = no chorus.
  8. chorus_drywet = 0.8
    1. Echo
  1. Somewhat fancy Echo filter. Can take any number of echo channels with varying delays (ms) and feedback factors.
  2. Echo output from all channels can be fed back into each other to create a somewhat reverb-like effect if desired.
  3. Defaults, 200 ms delay echo with feedback:
  4. Delay in ms. Takes an array with multiple channels.
  5. echo_delay = "200"
  6. Feedback factor for echo.
  7. echo_feedback = "0.5"
  8. Overall echo amplification. If too high, the echo becomes unstable due to feedback.
  9. echo_amp = "0.2"
  10. Reverby preset.
  11. echo_delay = " 60 80 120 172 200 320 380"
  12. echo_feedback = "0.5 0.5 0.4 0.3 0.5 0.3 0.2"
  13. echo_amp = "0.12"
    1. Phaser
  1. Defaults:
  2. phaser_lfo_freq = 0.4
  3. phaser_lfo_start_phase = 0.0
  4. phaser_feedback = 0.0
  5. phaser_depth = 0.4
  6. phaser_dry_wet = 0.5
  7. phaser_stages = 2
    1. Tremolo
  1. Defaults:
  2. tremolo_frequency = 4.0
  3. tremolo_depth = 0.9
    1. Vibrato
  1. Defaults:
  2. vibrato_frequency = 5.0
  3. vibrato_depth = 0.5
    1. WahWah
  1. Defaults:
  2. wahwah_lfo_freq = 1.5
  3. wahwah_lfo_start_phase = 0.0
  4. wahwah_freq_offset = 0.3
  5. wahwah_depth = 0.7
  6. wahwah_resonance = 2.5


    1. IIR
  1. Defaults:
  2. iir_frequency = 1024.0
  3. iir_quality = 0.707
  4. iir_gain = 0.0
  5. iir_type = LPF
  6. Filter types:
  7. LPF: Low-pass
  8. HPF: High-pass
  9. BPCSGF: Band-pass #1
  10. BPZPGF: Band-pass #2
  11. APF: Allpass
  12. NOTCH: Notch filter
  13. RIAA_phono: RIAA record/tape deemphasis
  14. PEQ: peaking band EQ
  15. BBOOST: Bassboost
  16. LSH: Low-shelf
  17. HSH: High-shelf
  18. RIAA_CD: CD de-emphasis
  19. Filters out some harsh sounds on the upper end
  20. iir_type = RIAA_CD
  21. BassBoost example
  22. iir_gain = 10.0
  23. iir_type = BBOOST
  24. iir_frequency = 200.0
  25. High self dampen
  26. iir_gain = -12.0
  27. iir_type = HSH
  28. iir_frequency = 8000.0
    1. Panning
  1. Gains are linear
  2. The default. Left and right channels map to each other.
  3. panning_left_mix = "1.0 0.0"
  4. panning_right_mix = "0.0 1.0"
  5. Swap left and right channels:
  6. panning_left_mix = "0.0 1.0"
  7. panning_right_mix = "1.0 0.0"
  8. Stereo Mono:
  9. panning_left_mix = "0.5 0.5"
  10. panning_right_mix = "0.5 0.5"
  11. Mono on one speaker:
  12. panning_left_mix = "0.5 0.5"
  13. panning_right_mix = "0.0 0.0"