Package: audioFX
audioFX - A Python Library for Audio Effects1. DescriptionThis python package contains functionality to apply a variety of effects to audio data.GitHub Repository|PyPi Repository2. InstallationInstall via pip:pip install audioFX3. Get startedHere is a basic example on how to load a wave file, apply some effects and save the resulting audio:from audioFX.Fx import Fx
from librosa import load
import soundfile

infile = 'test.wav'
outfile = 'my_processed_audio_file.wav'

x, sr = load(infile)

fx = Fx(sr)

fx_chain = {"tremolo": 0.8,
              "flanger": 0.2
              }

optional_parameters = {"flanger_frequency": 0.75,
                         "flanger_depth": 9.75,
                         "flanger_delay": 0.9375
                         }

y = fx.process_audio(x, fx_chain, optional_parameters)
soundfile.write(outfile, y, sr)First, with "from audioFX.Fx import Fx" you import the FX processor of the audioFX library.Instantiate the FX processor with fx = Fx(sr), where sr is the samplerate of the audio you work with.You define an effect chain through a dictionary. In the example above, the audio is first fed through a tremolo module, and then through a flanger module.
The values that are assigned to the single effects correspond to the dry/wet portion of the effect. A value of 0 will result in the effect turned completely off, while 1 will result in a completely processed signal.
The effects are applied in the order in which you defined them in that dictionary. See the next section for all possible effects.You can (but don't have to) define an additional dictionary in which you pass further parameters to your effects chain.
All possible parameters are listed in the next section.Apply the effect chain by calling the process_audio function as shown above.4. Implemented EffectsCurrently, audio-fx supports the effect types listed in the table below. We are actively about to include more effects, please drop an issue if you are interested in a particular one.Effect TypeDescriptionflangerA classical flanger effect.wahwahWahwah periodically blends in a low pass filter.tremoloA classical tremolo effect.distortionDistorts the signal.chorusA classical chorus effect.pitchPitch shift on the original signal.  By using the dry/wet value in the effect chain, the original pitch and shifted pitch signals are merged together.griffinThis effect applies an sftf to the signal and converts the signal back by using the griffin-lim algorithm.  By restricting the iterations of griffin-lim (see optional parameters), you can achieve pretty robotic sounds.timestretchThis effect allows you to make your audio slower/faster. Note: with this effect, the dry/wet value does work differently! It does not specify the portion of the effect, but the stretch-factor. E.g., if you set the value 2.0, the audio will be played in double speed.As described above, you can instantiate a dictionary to define further parameters for the effect chain.
Possible parameters are listed below. For parameters that are not specified, the default will be taken.ParameterTypeAffected Effect Type:DescriptionDefaultflanger_frequencyfloatflangerFrequency of flanger1.0flanger_depthfloatflangerDepth of flanger10.0flanger_delayfloatflangerDelay of flanger1.0chorus_frequencyfloatchorusFrequency of chorus2.0chorus_depthfloatchorusDepth of chorus0.9chorus_delayfloatchorusDelay of chorus25.0tremolo_alphafloattremoloAlpha of tremolo1.0tremolo_modfreqfloattremoloFrequency of tremolo10.0distortion_alphafloatdistortionDegree of distortion5.0wahwah_dampfloatwahwahDamping factor of wahwah0.49wahwah_minffloatwahwahMinimum frequency100.0wahwah_maxffloatwahwahMaximum frequency2000.0wahwah_wahffloatwahwahFrequency of wahwah bandpass modulation2000.0pitch_semitonesfloatpitchNumber of semitones to shift the signal12.0pitch_mirrorboolpitchIf True, pitch shift is additionally applied in the other direction.Falsegriffin_itersintgriffinNumber of iterations of the griffin-lim reconstruction. The less, the more robotic.05. AcknowledgementsParts of the code are derived fromhttps://github.com/wybiral/python-musicalandhttps://github.com/gened1080/guitar-effects.