All Projects β†’ ArjaanAuinger β†’ Pyaudiodsptools

ArjaanAuinger / Pyaudiodsptools

Licence: mit
Numpy Audio DSP Tools

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Pyaudiodsptools

lavadsp
A bunch of lavaplayer audio filters
Stars: ✭ 55 (-64.29%)
Mutual labels:  dsp, audio-processing
Matchering
🎚️ Open Source Audio Matching and Mastering
Stars: ✭ 398 (+158.44%)
Mutual labels:  numpy, dsp
RTspice
A real-time netlist based audio circuit plugin
Stars: ✭ 51 (-66.88%)
Mutual labels:  dsp, audio-processing
pedalevite
PΓ©dale Vite β€” DIY multi-FX pedalboard for guitar/bass/etc.
Stars: ✭ 68 (-55.84%)
Mutual labels:  dsp, audio-processing
Kfr
Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
Stars: ✭ 985 (+539.61%)
Mutual labels:  dsp, audio-processing
Planeverb
Project Planeverb is a CPU based real-time wave-based acoustics engine for games. It comes with an integration with the Unity Engine.
Stars: ✭ 22 (-85.71%)
Mutual labels:  dsp, audio-processing
Dplug
Audio plugin framework. VST2/VST3/AU/AAX/LV2 for Linux/macOS/Windows.
Stars: ✭ 341 (+121.43%)
Mutual labels:  dsp, audio-processing
python-soxr
Fast and high quality sample-rate conversion library for Python
Stars: ✭ 25 (-83.77%)
Mutual labels:  dsp, audio-processing
Guitard
Node based multi effects audio processor
Stars: ✭ 31 (-79.87%)
Mutual labels:  dsp, audio-processing
Q
C++ Library for Audio Digital Signal Processing
Stars: ✭ 481 (+212.34%)
Mutual labels:  dsp, audio-processing
dsp-theory
Theory of digital signal processing (DSP): signals, filtration (IIR, FIR, CIC, MAF), transforms (FFT, DFT, Hilbert, Z-transform) etc.
Stars: ✭ 643 (+317.53%)
Mutual labels:  dsp, numpy
Edsp
A cross-platform DSP library written in C++ 11/14. This library harnesses the power of C++ templates to implement a complete set of DSP algorithms.
Stars: ✭ 116 (-24.68%)
Mutual labels:  dsp, audio-processing
facet
Facet is a live coding system for algorithmic music
Stars: ✭ 72 (-53.25%)
Mutual labels:  dsp, audio-processing
dspjargon
All the jargon you need to understand the world of Digital Signal Processing.
Stars: ✭ 37 (-75.97%)
Mutual labels:  dsp, audio-processing
fogpad
A VST reverb effect in which the reflections can be frozen, filtered, pitch shifted and ultimately disintegrated.
Stars: ✭ 61 (-60.39%)
Mutual labels:  dsp, audio-processing
DTMF-Decoder
A Java program to implement a DMTF Decoder.
Stars: ✭ 28 (-81.82%)
Mutual labels:  dsp, audio-processing
audio noise clustering
https://dodiku.github.io/audio_noise_clustering/results/ ==> An experiment with a variety of clustering (and clustering-like) techniques to reduce noise on an audio speech recording.
Stars: ✭ 24 (-84.42%)
Mutual labels:  dsp, audio-processing
TD-Faust
FAUST (Functional Audio Stream) for TouchDesigner
Stars: ✭ 38 (-75.32%)
Mutual labels:  dsp, audio-processing
Dsp Theory
Theory of digital signal processing (DSP): signals, filtration (IIR, FIR, CIC, MAF), transforms (FFT, DFT, Hilbert, Z-transform) etc.
Stars: ✭ 437 (+183.77%)
Mutual labels:  numpy, dsp
Regrader
VST delay plugin where the repeats degrade in resolution
Stars: ✭ 44 (-71.43%)
Mutual labels:  dsp, audio-processing

Logo

pyAudioDspTools is a python 3 package for manipulating audio by just using numpy. This can be from a .wav or as a stream via pyAudio for example. pyAudioDspTool's only requirement is Numpy. The package is only a few kilobytes in size and well documented. You can find the readthedocs here: https://pyaudiodsptools.readthedocs.io/en/latest/

You can use pyAudioDspTools to start learning about audio dsp because all relevant operations are in plain sight, no C or C++ code will be called and nearly no blackboxing takes place. You can also easily modify all available audio effects and start writing your own, you only need to know python and numpy as well as audio dsp basics. As this package is released under the MIT licence, you can use it as you see fit. If you want to examine the code, just open the 'pyAudioDspTools' folder in this Git and you can see all the relevant modules.

Quickstart

To install pyAudioDspTools simply open a terminal in your venv and use pip:

pip install pyAudioDspTools

The package is only a few kB in size, so it should download in an instant. After installing the package you can import it to your module in Python via:

import pyAudioDspTools

pyAudioDspTools is device centered. Every sound effect processor is a class, imagine it being like an audio-device. You first create a class/device with certain settings and then run some numpy-arrays (which is your audio data) through them. This always follows a few simple steps, depending on if you want to modify data from a .wav file or realtime-stream. All classes are ready for realtime streaming and manage all relevant variables themselves.

image of pipeline here

Using pyAudioDspTools

Below you will find 2 simple examples of processing your data. Example 1 will read a .wav file, process the data and write it to a second .wav file. Example 2 will create a stream via the pyAudio package and process everything in realtime

Example1.py : Processing from a .wav file.

    import pyAudioDspTools
    
    pyAudioDspTools.sampling_rate = 44100
    pyAudioDspTools.chunk_size = 512

    # Importing a mono .wav file and then splitting the resulting numpy-array in smaller chunks.
    full_data = pyAudioDspTools.MonoWavToNumpyFloat("some_path/your_audiofile.wav")
    split_data = pyAudioDspTools.MakeChunks(full_data)


    # Creating the class/device, which is a lowcut filter
    filter_device = pyAudioDspTools.CreateLowCutFilter(800)


    # Setting a counter and process the chunks via filter_device.apply
    counter = 0
    for counter in range(len(split_data)):
        split_data[counter] = filter_device.apply(split_data[counter])
        counter += 1


    # Merging the numpy-array back into a single big one and write it to a .wav file.
    merged_data = pyAudioDspTools.CombineChunks(split_data)
    pyAudioDspTools.NumpyFloatToWav("some_path/output_audiofile.wav", merged_data)

Example2.py : Processing a live feed with pyaudio

    # Example 2: Creating a live audio stream and processing it by running the data though a lowcut filter.
    # Is MONO.
    # Has to be manually terminated in the IDE.

    import pyaudio
    import pyAudioDspTools
    import time
    import numpy
    import sys

    pyAudioDspTools.sampling_rate = 44100
    pyAudioDspTools.chunk_size = 512

    filterdevice = pyAudioDspTools.CreateLowCutFilter(300)


    # Instantiate PyAudio
    pyaudioinstance = pyaudio.PyAudio()

    # The callback function first reads the current input and converts it to a numpy array, filters it and returns it.
    def callback(in_data, frame_count, time_info, status):
       in_data = numpy.frombuffer(in_data, dtype=numpy.float32)
       in_data = filterdevice.apply(in_data)
       #print(numpydata)
       return (in_data, pyaudio.paContinue)


    # The stream class of pyaudio. Setting all the variables, pretty self explanatory.
    stream = pyaudioinstance.open(format=pyaudio.paFloat32,
                   channels=1,
                   rate=pyAudioDspTools.sampling_rate,
                   input = True,
                   output = True,
                   frames_per_buffer = pyAudioDspTools.chunk_size,
                   stream_callback = callback)

    # start the stream 
    stream.start_stream()

    # wait
    while stream.is_active():
       time.sleep(5)
       print("Cpu load:", stream.get_cpu_load())

    # stop stream 
    stream.stop_stream()
    stream.close()

    # close PyAudio 
    pyaudioinstance.terminate()
    sys.exit()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].