Difference between revisions of "Equalizer"

From RGB-Pi Wiki
Jump to: navigation, search
Line 1: Line 1:
 
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:
 
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.
+
== Steps ==
In this folder you'll see the current system presets *.dsp files.
+
1. Connect to the Pi via sftp and navigate to /home/pi/RGB-Pi/data/dsp_filters.</br>
2. Create a new file or copy an existing preset to start.
+
In this folder you'll see the current system presets *.dsp files.</br></br>
Do note that file names '''cannot contain spaces'''.
+
2. Create a new file or copy an existing preset to start.</br>
Also you should always create both mono and stereo versions of your presets. Example:
+
'''Do note that file names cannot contain spaces'''</br>
MyPreset(Mono).dsp
+
Also you should always create both mono and stereo versions of your presets. Example:</br>
MyPreset(Stereo).dsp
+
MyPreset(Mono).dsp
3. Edit the preset file and customize the same. Example:
+
MyPreset(Stereo).dsp
 +
3. Edit the preset file and customize the same.</br></br>
 +
4. Save the file and reboot the system. Your presets will be available from the Equalizer option in Sound menu.
  
# filters indicates the number of filters you want to apply
+
== Filter.dsp example file ==
filters = 11
+
# filters indicates the number of filters you want to apply
# filter names correspond to the *.so binary files contained in the folder
+
filters = 11
filter0 = eq
+
# filter names correspond to the *.so binary files contained in the folder
filter1 = reverb
+
filter0 = eq
filter2 = crystalizer
+
filter1 = reverb
filter3 = chorus
+
filter2 = crystalizer
filter4 = echo
+
filter3 = chorus
filter5 = phaser
+
filter4 = echo
filter6 = tremolo
+
filter5 = phaser
filter7 = vibrato
+
filter6 = tremolo
filter8 = wahwah
+
filter7 = vibrato
filter9 = iir
+
filter8 = wahwah
filter10 = panning
+
filter9 = iir
 
+
filter10 = panning
# EQ
+
#
+
# EQ
# Beta factor for Kaiser window.
+
#
# Lower values will allow better frequency resolution, but more ripple.
+
# Beta factor for Kaiser window.
# eq_window_beta = 4.0
+
# Lower values will allow better frequency resolution, but more ripple.
#
+
# eq_window_beta = 4.0
# The block size on which FFT is done.
+
#
# Too high value requires more processing as well as longer latency but
+
# The block size on which FFT is done.
# allows finer-grained control over the spectrum.
+
# Too high value requires more processing as well as longer latency but
# eq_block_size_log2 = 8
+
# allows finer-grained control over the spectrum.
#
+
# eq_block_size_log2 = 8
# An array of which frequencies to control.
+
#
# You can create an arbitrary amount of these sampling points.
+
# An array of which frequencies to control.
# The EQ will try to create a frequency response which fits well to these points.
+
# You can create an arbitrary amount of these sampling points.
# The filter response is linearly interpolated between sampling points here.
+
# The EQ will try to create a frequency response which fits well to these points.
#
+
# The filter response is linearly interpolated between sampling points here.
# It is implied that 0 Hz (DC) and Nyquist have predefined gains of 0 dB which are interpolated against.
+
#
# If you want a "peak" in the spectrum or similar, you have to define close points to say, 0 dB.
+
# It is implied that 0 Hz (DC) and Nyquist have predefined gains of 0 dB which are interpolated against.
#
+
# If you want a "peak" in the spectrum or similar, you have to define close points to say, 0 dB.
# E.g.: A boost of 3 dB at 1 kHz can be expressed as.
+
#
# eq_frequencies = "500 1000 2000"
+
# E.g.: A boost of 3 dB at 1 kHz can be expressed as.
# eq_gains = "0 3 0"
+
# eq_frequencies = "500 1000 2000"
# Due to frequency domain smearing, you will not get exactly +3 dB at 1 kHz.
+
# eq_gains = "0 3 0"
#
+
# Due to frequency domain smearing, you will not get exactly +3 dB at 1 kHz.
# By default, this filter has a flat frequency response.
+
#
# Full range example
+
# By default, this filter has a flat frequency response.
# eq_frequencies = "32 64 125 250 500 1000 2000 4000 8000 16000 20000"
+
# Full range example
# eq_gains = "6 9 12 7 6 5 7 9 11 6 0"
+
# eq_frequencies = "32 64 125 250 500 1000 2000 4000 8000 16000 20000"
#
+
# eq_gains = "6 9 12 7 6 5 7 9 11 6 0"
# Low pass filter for the QSound chip from CPS-1/2.
+
#
# Some games have aliasing due low quality samples, so you can hear some annoying noisy near 11 kHz
+
# Low pass filter for the QSound chip from CPS-1/2.
# eq_frequencies = "8000 10000 12500 16000 20000"
+
# Some games have aliasing due low quality samples, so you can hear some annoying noisy near 11 kHz
# eq_gains = "0 -30 -30 -30 -30"
+
# eq_frequencies = "8000 10000 12500 16000 20000"
 
+
# eq_gains = "0 -30 -30 -30 -30"  
## Reverb
+
#
+
## Reverb
# Defaults:
+
#
# reverb_drytime = 0.43
+
# Defaults:
# reverb_wettime = 0.4
+
# reverb_drytime = 0.43
# reverb_damping = 0.8
+
# reverb_wettime = 0.4
# reverb_roomwidth = 0.56
+
# reverb_damping = 0.8
# reverb_roomsize = 0.56
+
# reverb_roomwidth = 0.56
 
+
# reverb_roomsize = 0.56
## Cristalyzer
+
#
+
## Cristalyzer
# Controls dry/wet-ness of effect. 0.0 = none, 10.0 = max.
+
#
# crystalizer_intensity = 5.0
+
# Controls dry/wet-ness of effect. 0.0 = none, 10.0 = max.
 
+
# crystalizer_intensity = 5.0
## Chorus
+
#
+
## Chorus
# Controls the base delay of the chorus (milliseconds).
+
#
# chorus_delay_ms = 25.0
+
# Controls the base delay of the chorus (milliseconds).
#
+
# chorus_delay_ms = 25.0
# Controls the depth of the delay. The delay will vary between delay_ms +/- depth_ms.
+
#
# chorus_depth_ms = 1.0
+
# Controls the depth of the delay. The delay will vary between delay_ms +/- depth_ms.
#
+
# chorus_depth_ms = 1.0
# Frequency of LFO which controls delay.
+
#
# chorus_lfo_freq = 0.5
+
# Frequency of LFO which controls delay.
#
+
# chorus_lfo_freq = 0.5
# Controls dry/wet-ness of effect. 1.0 = full chorus, 0.0 = no chorus.
+
#
# chorus_drywet = 0.8
+
# Controls dry/wet-ness of effect. 1.0 = full chorus, 0.0 = no chorus.
 
+
# chorus_drywet = 0.8
## Echo
+
#
+
## Echo
# Somewhat fancy Echo filter. Can take any number of echo channels with varying delays (ms) and feedback factors.
+
#
# Echo output from all channels can be fed back into each other to create a somewhat reverb-like effect if desired.
+
# Somewhat fancy Echo filter. Can take any number of echo channels with varying delays (ms) and feedback factors.
#
+
# Echo output from all channels can be fed back into each other to create a somewhat reverb-like effect if desired.
# Defaults, 200 ms delay echo with feedback:
+
#
# Delay in ms. Takes an array with multiple channels.
+
# Defaults, 200 ms delay echo with feedback:
# echo_delay = "200"
+
# Delay in ms. Takes an array with multiple channels.
# Feedback factor for echo.
+
# echo_delay = "200"
# echo_feedback = "0.5"
+
# Feedback factor for echo.
# Overall echo amplification. If too high, the echo becomes unstable due to feedback.
+
# echo_feedback = "0.5"
# echo_amp = "0.2"
+
# Overall echo amplification. If too high, the echo becomes unstable due to feedback.
#
+
# echo_amp = "0.2"
# Reverby preset.
+
#
# echo_delay    = " 60  80 120 172 200 320 380"
+
# Reverby preset.
# echo_feedback = "0.5 0.5 0.4 0.3 0.5 0.3 0.2"
+
# echo_delay    = " 60  80 120 172 200 320 380"
#
+
# echo_feedback = "0.5 0.5 0.4 0.3 0.5 0.3 0.2"
# echo_amp = "0.12"
+
#
 
+
# echo_amp = "0.12"
## Phaser
+
#
+
## Phaser
# Defaults:
+
#
# phaser_lfo_freq = 0.4
+
# Defaults:
# phaser_lfo_start_phase = 0.0
+
# phaser_lfo_freq = 0.4
# phaser_feedback = 0.0
+
# phaser_lfo_start_phase = 0.0
# phaser_depth = 0.4
+
# phaser_feedback = 0.0
# phaser_dry_wet = 0.5
+
# phaser_depth = 0.4
# phaser_stages = 2
+
# phaser_dry_wet = 0.5
 
+
# phaser_stages = 2
## Tremolo
+
#
+
## Tremolo
# Defaults:
+
#
# tremolo_frequency = 4.0
+
# Defaults:
# tremolo_depth = 0.9
+
# tremolo_frequency = 4.0
 
+
# tremolo_depth = 0.9
## Vibrato
+
#
+
## Vibrato
# Defaults:
+
#
# vibrato_frequency = 5.0
+
# Defaults:
# vibrato_depth = 0.5
+
# vibrato_frequency = 5.0
 
+
# vibrato_depth = 0.5
## WahWah
+
#
+
## WahWah
# Defaults:
+
#
# wahwah_lfo_freq = 1.5
+
# Defaults:
# wahwah_lfo_start_phase = 0.0
+
# wahwah_lfo_freq = 1.5
# wahwah_freq_offset = 0.3
+
# wahwah_lfo_start_phase = 0.0
# wahwah_depth = 0.7
+
# wahwah_freq_offset = 0.3
# wahwah_resonance = 2.5
+
# wahwah_depth = 0.7
 
+
# wahwah_resonance = 2.5
 
+
## IIR
+
## IIR
#
+
#
# Defaults:
+
# Defaults:
# iir_frequency = 1024.0
+
# iir_frequency = 1024.0
# iir_quality = 0.707
+
# iir_quality = 0.707
# iir_gain = 0.0
+
# iir_gain = 0.0
# iir_type = LPF
+
# iir_type = LPF
#
+
#
# Filter types:
+
# Filter types:
# LPF: Low-pass
+
# LPF: Low-pass
# HPF: High-pass
+
# HPF: High-pass
# BPCSGF: Band-pass #1
+
# BPCSGF: Band-pass #1
# BPZPGF: Band-pass #2
+
# BPZPGF: Band-pass #2
# APF: Allpass
+
# APF: Allpass
# NOTCH: Notch filter
+
# NOTCH: Notch filter
# RIAA_phono: RIAA record/tape deemphasis
+
# RIAA_phono: RIAA record/tape deemphasis
# PEQ: peaking band EQ
+
# PEQ: peaking band EQ
# BBOOST: Bassboost
+
# BBOOST: Bassboost
# LSH: Low-shelf
+
# LSH: Low-shelf
# HSH: High-shelf
+
# HSH: High-shelf
# RIAA_CD: CD de-emphasis
+
# RIAA_CD: CD de-emphasis
#
+
#
# Filters out some harsh sounds on the upper end
+
# Filters out some harsh sounds on the upper end
# iir_type = RIAA_CD
+
# iir_type = RIAA_CD
# BassBoost example
+
# BassBoost example
# iir_gain = 10.0
+
# iir_gain = 10.0
# iir_type = BBOOST
+
# iir_type = BBOOST
# iir_frequency = 200.0
+
# iir_frequency = 200.0
# High self dampen
+
# High self dampen
# iir_gain = -12.0
+
# iir_gain = -12.0
# iir_type = HSH
+
# iir_type = HSH
# iir_frequency = 8000.0
+
# iir_frequency = 8000.0
 
+
## Panning
+
## Panning
#
+
#
# Gains are linear
+
# Gains are linear
#
+
#
# The default. Left and right channels map to each other.
+
# The default. Left and right channels map to each other.
# panning_left_mix = "1.0 0.0"
+
# panning_left_mix = "1.0 0.0"
# panning_right_mix = "0.0 1.0"
+
# panning_right_mix = "0.0 1.0"
#
+
#
# Swap left and right channels:
+
# Swap left and right channels:
# panning_left_mix = "0.0 1.0"
+
# panning_left_mix = "0.0 1.0"
# panning_right_mix = "1.0 0.0"
+
# panning_right_mix = "1.0 0.0"
#
+
#
# Stereo Mono:
+
# Stereo Mono:
# panning_left_mix = "0.5 0.5"
+
# panning_left_mix = "0.5 0.5"
# panning_right_mix = "0.5 0.5"
+
# panning_right_mix = "0.5 0.5"
#
+
#
# Mono on one speaker:
+
# Mono on one speaker:
# panning_left_mix = "0.5 0.5"
+
# panning_left_mix = "0.5 0.5"
# panning_right_mix = "0.0 0.0"
+
# panning_right_mix = "0.0 0.0"

Revision as of 04:59, 26 September 2020

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:

Steps

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.

4. Save the file and reboot the system. Your presets will be available from the Equalizer option in Sound menu.

Filter.dsp example file

# filters indicates the number of filters you want to apply
filters = 11
# 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

# EQ
#
# Beta factor for Kaiser window.
# Lower values will allow better frequency resolution, but more ripple.
# eq_window_beta = 4.0
#
# The block size on which FFT is done.
# Too high value requires more processing as well as longer latency but
# allows finer-grained control over the spectrum.
# eq_block_size_log2 = 8
#
# An array of which frequencies to control.
# You can create an arbitrary amount of these sampling points.
# The EQ will try to create a frequency response which fits well to these points.
# The filter response is linearly interpolated between sampling points here.
#
# It is implied that 0 Hz (DC) and Nyquist have predefined gains of 0 dB which are interpolated against.
# If you want a "peak" in the spectrum or similar, you have to define close points to say, 0 dB.
#
# E.g.: A boost of 3 dB at 1 kHz can be expressed as.
# eq_frequencies = "500 1000 2000"
# eq_gains = "0 3 0"
# Due to frequency domain smearing, you will not get exactly +3 dB at 1 kHz.
#
# By default, this filter has a flat frequency response.
# Full range example
# eq_frequencies = "32 64 125 250 500 1000 2000 4000 8000 16000 20000"
# eq_gains = "6 9 12 7 6 5 7 9 11 6 0"
#
# Low pass filter for the QSound chip from CPS-1/2.
# Some games have aliasing due low quality samples, so you can hear some annoying noisy near 11 kHz
# eq_frequencies = "8000 10000 12500 16000 20000"
# eq_gains = "0 -30 -30 -30 -30" 

## Reverb
#
# Defaults:
# reverb_drytime = 0.43
# reverb_wettime = 0.4
# reverb_damping = 0.8
# reverb_roomwidth = 0.56
# reverb_roomsize = 0.56

## Cristalyzer
#
# Controls dry/wet-ness of effect. 0.0 = none, 10.0 = max.
# crystalizer_intensity = 5.0

## Chorus
#
# Controls the base delay of the chorus (milliseconds).
# chorus_delay_ms = 25.0
#
# Controls the depth of the delay. The delay will vary between delay_ms +/- depth_ms.
# chorus_depth_ms = 1.0
#
# Frequency of LFO which controls delay.
# chorus_lfo_freq = 0.5
#
# Controls dry/wet-ness of effect. 1.0 = full chorus, 0.0 = no chorus.
# chorus_drywet = 0.8

## Echo
#
# Somewhat fancy Echo filter. Can take any number of echo channels with varying delays (ms) and feedback factors.
# Echo output from all channels can be fed back into each other to create a somewhat reverb-like effect if desired.
#
# Defaults, 200 ms delay echo with feedback:
# Delay in ms. Takes an array with multiple channels.
# echo_delay = "200"
# Feedback factor for echo.
# echo_feedback = "0.5"
# Overall echo amplification. If too high, the echo becomes unstable due to feedback.
# echo_amp = "0.2"
#
# Reverby preset.
# echo_delay    = " 60  80 120 172 200 320 380"
# echo_feedback = "0.5 0.5 0.4 0.3 0.5 0.3 0.2"
#
# echo_amp = "0.12"

## Phaser
#
# Defaults:
# phaser_lfo_freq = 0.4
# phaser_lfo_start_phase = 0.0
# phaser_feedback = 0.0
# phaser_depth = 0.4
# phaser_dry_wet = 0.5
# phaser_stages = 2

## Tremolo
#
# Defaults:
# tremolo_frequency = 4.0
# tremolo_depth = 0.9

## Vibrato
#
# Defaults:
# vibrato_frequency = 5.0
# vibrato_depth = 0.5

## WahWah
#
# Defaults:
# wahwah_lfo_freq = 1.5
# wahwah_lfo_start_phase = 0.0
# wahwah_freq_offset = 0.3
# wahwah_depth = 0.7
# wahwah_resonance = 2.5

## IIR
#
# Defaults:
# iir_frequency = 1024.0
# iir_quality = 0.707
# iir_gain = 0.0
# iir_type = LPF
#
# Filter types:
# LPF: Low-pass
# HPF: High-pass
# BPCSGF: Band-pass #1
# BPZPGF: Band-pass #2
# APF: Allpass
# NOTCH: Notch filter
# RIAA_phono: RIAA record/tape deemphasis
# PEQ: peaking band EQ
# BBOOST: Bassboost
# LSH: Low-shelf
# HSH: High-shelf
# RIAA_CD: CD de-emphasis
#
# Filters out some harsh sounds on the upper end
# iir_type = RIAA_CD
# BassBoost example
# iir_gain = 10.0
# iir_type = BBOOST
# iir_frequency = 200.0
# High self dampen
# iir_gain = -12.0
# iir_type = HSH
# iir_frequency = 8000.0

## Panning
#
# Gains are linear
#
# The default. Left and right channels map to each other.
# panning_left_mix = "1.0 0.0"
# panning_right_mix = "0.0 1.0"
#
# Swap left and right channels:
# panning_left_mix = "0.0 1.0"
# panning_right_mix = "1.0 0.0"
#
# Stereo Mono:
# panning_left_mix = "0.5 0.5"
# panning_right_mix = "0.5 0.5"
#
# Mono on one speaker:
# panning_left_mix = "0.5 0.5"
# panning_right_mix = "0.0 0.0"