Comments (3)
Hi! I looked at mpv's implementation and it's also using IIR filters, which is similar to NVDSP. The difference is that mpv seems to use 10 band-pass filters (BPF) instead of peaking filters, which is just a different filter / approach to doing an EQ.
I like how peaking filters only provide a boost or a cut at a specific center frequency (with a band width of Q) and leave the other frequencies intact. This means you can completely go wild and tweak the EQ exactly you want (different center frequencies, overlapping filters, different Q values etc.)
When you use BPF's to process sound you'll end up filtering 10 different bands and putting them together I think. If your bands are overlapping too much you'll get weird results and if they have too large gaps between them you're missing frequencies. (I'm not sure how mpv does it, I didn't read their code in that detail)
When using peaking filters (and shelving filters) you'll get control like you'd be using a VST like FabFilter Pro Q or like a parametric equalizer. Also, what sounds weird exactly?
I recommend playing around with Q values and taking a step back to consider what kind of setup you're really looking for. Higher Q values will result in a sharper peak, meaning you'll only be able to adjust at and near the center frequency. (meaning you'll also need more of those high Q peaks for complete control of the entire frequency field)
Does this help you out a bit?
from nvdsp.
Yes, thank you for the detailed explanation!
And for the sounding weird: when I set the gain of all of the filters to 12 it sounded distorted, but I suppose that is just a property of a peaking filter, since Winamp sounds weird in the exact same way as this does.
from nvdsp.
@rweichler oh hold on there! You should've just said distorted instead of weird. If you hear distortion when you dial up a peaking filter then you're actually hearing clipping, which can be countered easily.
All audio samples are stored as floats ranging from 1.0f
to 0.0f
and -1.0f
. So a strong signal (loud) will actually hit that 1.0f
. So if you then add gain to the signal in some way (like a peaking EQ filter) it will push beyond that 1.0f
and create horrible distortion.
The fix is easy, just lower the overall volume/gain, either do it yourself with applyGain (a value below 1.0f), or use the counterClipping methods of NVDSP.
from nvdsp.
Related Issues (20)
- How to make custom audio EQ HOT 1
- Can we save audio file after applying filters? HOT 1
- Possible bug in NVDSP.mm when copying the results back to audio buffer HOT 4
- Thread safety and efficiency HOT 11
- 3-band EQ HOT 1
- Support with AVPlayer and AVAudioPlayer HOT 1
- Some Interruption when the app go to background HOT 3
- How to filter audio that is hosted on server HOT 3
- How to implement bass boost using high pass filter? any idea? HOT 3
- Issue with headphones HOT 1
- No tag 0.0.1 HOT 1
- Fail compile HOT 1
- No tag v0.0.1 HOT 1
- RingBuffer HOT 2
- Feed it the next song... HOT 8
- How to get audio data to use from microphone. HOT 1
- can i use directly with lib `FreeStreamer` to process audio HOT 7
- BandPass filter help HOT 1
- who can help me to build a 10-band-eq example?
- Is there anyway to use NVDSP in Swift?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvdsp.