Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tristancacqueray/simple-dsp
A simple digital signal processor
https://github.com/tristancacqueray/simple-dsp
Last synced: 14 days ago
JSON representation
A simple digital signal processor
- Host: GitHub
- URL: https://github.com/tristancacqueray/simple-dsp
- Owner: TristanCacqueray
- License: apache-2.0
- Created: 2023-07-03T14:24:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-05T13:27:46.000Z (5 months ago)
- Last Synced: 2024-10-11T01:48:05.333Z (27 days ago)
- Language: Haskell
- Size: 68.4 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-dsp
This library provides DSP primitives along with a simple audio player.
## Overview and scope
The goal of simple-dsp is to implement IIR filters for sound processing, for example, to remove the low frequencies from an input sound.
Learning resources:
- https://ocw.mit.edu/courses/6-003-signals-and-systems-fall-2011/ (complete)
- https://dspguru.com/dsp/howtos/implement-iir-filters/ (presentation)
- https://en.wikipedia.org/wiki/Digital_biquad_filter (reference)## Usage
Use the [SimpleDSP.IIR](./src/SimpleDSP/IIR.hs) in your application.
Start the audio player by passing a sound file:
```ShellSession
cabal run -O0 exe:simple-dsp-player -- ~/86quantoc.flac
```![simple-dsp](https://github.com/TristanCacqueray/simple-dsp/assets/154392/57207ef1-6efe-4b64-9574-d118d1d61471)
## SDL_GL_CreateContext error and nix
If the program fails with:
```ShellSession
simple-dsp-player: SDLCallFailed {sdlExceptionCaller = "SDL.Video.glCreateContext", sdlFunction = "SDL_GL_CreateContext", sdlExceptionError = "Invalid window"}
```You need to use `nixGL`. To install the right version (see hspkgs input to match the nixpkgs pin):
```ShellSession
nix profile install --override-input nixpkgs github:NixOS/nixpkgs/b79cc961fe98b158ea051ae3c71616872ffe8212 --impure github:guibou/nixGL
```Then run:
```ShellSession
nixGL cabal run exe:simple-dsp-player -- $SOUND_FILE_PATH
```