6 ms·
Show HN: Parametric Equalizer for PulseAudio
- person_of_color 6y agoDoes this use vector extensions where available?
- mcint 6y agogcc -O3 vectorizes. https://github.com/keur/prettyeq/blob/master/build_tests.sh https://github.com/keur/prettyeq/blob/master/build_tests.sh
- jcelerier 6y agoyou likely want -O3 -march=native if building for your own machine, this way you get more than the SSE2 baseline if available
- keurrr 6y agoNot by hand, but the FFT I wrote for the spectral analyzer is compiled with -ffast-math and gcc vectorizes it (verified with objdump). Same thing with the functions that change the filter parameters.
- danaos 6y agofftw3 is extremely fast and vectorized well. Why write your own FFT implementation? Did you test against pulseeffects cpu usage?
- keurrr 6y agoI can't link with fftw3 since it's GPL. The other libraries that were permissive licensed had confusing APIs and the output binaries were almost as large as my entire project. CPU usage is high but because of one poorly designed part of the GUI (eqhover.cpp)
- vortico 6y agoSurely there's one in here that would be acceptable. https://community.vcvrack.com/t/complete-list-of-c-c-fft-libraries/9153 https://community.vcvrack.com/t/complete-list-of-c-c-fft-lib...
- mrguyorama 6y agoI'm not sure I understand, why can't you use GPL code?
- keurrr 6y agoI can’t statically link with it because I would need to release my own software under the GPL.
- vortico 6y agoWhy not license your software under the GPL? For end-user applications like these, there's no reason software shouldn't be GPL, and if fact it would be better for you since it prevents companies from exploiting your work that you intended to serve the greater good for purposes of their own profit.
- Const-me 6y ago> Why not license your software under the GPL? If OP did that, I probably wouldn’t bother to improve their code: https://github.com/Const-me/prettyeq/tree/master https://github.com/Const-me/prettyeq/tree/master While my primary motivation was “for lulz”, possibility to reuse the code whenever I need a fast 1D FFT also contributed.
- Const-me 6y ago> is compiled with -ffast-math and gcc vectorizes it Automatic vectorization is extremely limited, in all compilers. Check this out, feel free to merge if it works in reality not just in the test: https://github.com/Const-me/prettyeq/tree/master https://github.com/Const-me/prettyeq/tree/master
- keurrr 6y agoThanks. I actually found your repo before seeing this post and sent you an email. Definitely going to port it back to C and merge it in. Thanks so much for this. Hand vectorizing this was on my TODO.
- PaulDavisThe1st 6y agonote that from our recent experience adding AVX to Ardour's existing SSE hand-written vector code, gcc is now able to generate SIMD code that essentially matches the performance of the hand-written versions.
- randkyp 6y agoAny way to set pre-amp to avoid clipping or is there built-in headroom / automatic gain adjust so that that is taken care of by default?
- keurrr 6y agoSo my background is I did music production in high school. I actually based the design for PrettyEQ off of the Logic Pro X equalizer and Fruity Parametric EQ 2, and those will happily let you clip. So I like the idea of leaving that to the user's discretion (move the filters slowly, especially in the lows and highs, and know your speakers well). These days, especially in EDM / Hip Hop, slight clipping in bass in somewhat stylistic. So I don't know. Maybe could be an option in the GUI that could be switched on? Would need to think about it more.
- randkyp 6y agoIf the equalization is done near the end of the audio output chain (ex: music player, defaults at 100% volume -> user sets master audio output volume to 50% -> EQ is applied) then a pre-amp is not strictly necessary if the EQ can take advantage of the extra headroom in the output channel. Otherwise, an adjustable pre-amp / gain setting would be nice, preferable with the option for it to automatically set itself to reduce by the maximum gain the EQ is applying to avoid clipping. But yeah, it should be optional; if the user wants stuff to clip, let it clip.
- ldarby 6y ago> These days, especially in EDM / Hip Hop, slight clipping in bass in somewhat stylistic. No it's not, it's just widespread incompetence and has ruined lots of music I would have liked. Having better software tools that alert when clipping is happening would be a good thing (i.e. it needs to alert when crossing over from 0dB to a distorted wave form, not just hitting 0dB without distorting, which is fine).
- qmmmur 6y agoYou know you can distort without clipping and can clip without blowing out your meters?
- Hydraulix989 6y agoAny CLI planned?
- vladvasiliu 6y agoI'd like to know the same thing. I'm currently using PulseEffects [0] for my parametric eq needs, but as I use a dedicated PC to play music, it's a bit of a pain to have to connect via vnc to control it. [0] https://github.com/wwmm/pulseeffects https://github.com/wwmm/pulseeffects
- keurrr 6y agoHah, pulseeffects was why I wrote this project. It has tons of latency, very sluggish UI, not nice to use.
- keurrr 6y agoI'm not personally into cli stuff, but most of the code in the equalizer/ directory could be used without much change. If anyone started that project and needed assistance I would for sure help out.
- Hydraulix989 6y agoI have an HTPC hooked up to my speakers in my living room that I often SSH into in order to play music while I work, hence the need for a CLI EQ.
- leetrout 6y agoI was just looking for a replacement for the app I used on Mac: Boom. I will give this a try tomorrow!
- unicornporn 6y agoYes please, that buggy piece of...
- leetrout 6y agoIt’s turned in to nagware.
- grawprog 6y agoIs the Jack aware at all? This is a pretty nice looking eq and more eq plugins are always a handy tool to have. Needing to use the pulseaudio bridge for an eq makes it difficult to use in production setup with a chain of Jack input/outputs though.
- rembicilious 6y agoBeing Jack aware would be a bonus but there are already a multitude of Jack aware EQ plugins. The feature-set of this prettyeq plugin seems aimed specifically at system-wide audio, in other words to adjust the audio on your system to match your daily use preferences, rather than production work. I might never use this sort of EQ (high-pass, lo-pass, 5 peaks) for production work. Maybe for tweaking a final mix... pulseaudio is definitely in need of some nicely integrated audio filters. Jack has many to choose from, but more are always welcome. Edit: I am not an audio pro and if this EQ is in fact aimed at production, I would love to learn more about its use cases
- keurrr 6y agoThis is pretty accurate. I wrote it to tweak songs to my speakers when I'm streaming music. I wanted something very fast, no configuration, pleasant graphics. While probably not suited for production work, the design is based off of existing production tools that I am very familiar with (Channel EQ from Logic Pro X, Parametric Eq 2 from FL Studio).
- qmmmur 6y agoIf I need to do any kind of DSP i'd much rather insert a VST plugin into the chain using Carla or similar. Way more generic and less tied to Pulse that way and usually superior in engineering.
- DyslexicAtheist 6y agohow do I build this? (there doesn't seem to be a Makefile)? very promising. have been looking for a pulseeffects replacement for some time.
- wiml 6y agoQMake, probably (it's a Qt program and there's a `.pro` file in the root)
- DyslexicAtheist 6y agoa thanks, silly me. I wondered what that was.
- jmiskovic 6y agoLooks and works great - it's simple to use and very intuitive. Very useful for badly recorded lectures, to filter out the crowd. I hope you can add a bit of polish to integrate better into OS. On XFCE the program has a nice-looking icon showing in Notification Area (system tray), but in Window Buttons (taskbar) it has a generic icon. It cannot be minimized or hidden, it can only be closed.
- jmiskovic 6y agoAfter using it some more, I have to say tweaking the spectrum while the music is playing is fun! Far better experience than dozen sliders found in graphic equilizers.
- keurrr 6y agoThat makes me so happy to hear! Since this thread is getting less active, feel free to email me at kevin@segfault.fun if you need anything else.
- bilekas 6y agoLove this, great job, will join to contribute.. Would be very interested in getting >2.0 channel support. Great job again
- keurrr 6y agoCool, yeah. Would love if you contributed that. So off the top of my head we would want to get all output sinks and display them in the GUI and, when the user switches, detect the number of channels they support and live configure to that. We would need to update the null sink, sample_spec struct, and latency. This would live in equalizer/pretty.c so that's a good place to poke around. Email me at kevin@segfault.fun if you have any questions. The pulseaudio C API can be a bit... opaque :)
- Retr0spectrum 6y agoThis is a neat project, but I'm still using PulseEffects, which appears to be more fully featured: https://github.com/wwmm/pulseeffects https://github.com/wwmm/pulseeffects
- anotheryou 6y agooh, global compressor. Sounds god sent for badly mixed movies.
- linuxSL 6y agoHow does one use this?
- keurrr 6y agoIn the project directory run: mkdir ./make ./build cd ./make qmake CONFIG+=release .. make -j<cthread_count> mv ./prettyeq ../build
- linuxSL 6y agoThanks! First try I got: equalizer/equalizer.pro:10: Parse Error ('pretty.h') Then I removed the extra pretty.h line and got: ../../gui/prettyshim.h:4:10: fatal error: QObject: No such file or directory #include <QObject> which is beyond my time to dig right now :/
- keurrr 6y agoOh, you need the qt5 shared libs to compile. I am planning to do a release in the next couple weeks that statically links the full thing so no one has to deal with this. Qt makes it very annoying to static link your project (you are stuck compiling Qt yourself), so been putting that off.
- keurrr 6y agoI didn't forget about you! I did a release statically linked with qt5. Let me know if this works for you. Email me at kevin@segfault.fun if you run into any issues. Use prettyeq-static. https://github.com/keur/prettyeq/releases/tag/v0.2-alpha https://github.com/keur/prettyeq/releases/tag/v0.2-alpha
- mxmilkb 6y agoBest PA EQ so far! Added to https://wiki.thingsandstuff.org/Audio#Processing https://wiki.thingsandstuff.org/Audio#Processing