Subject: [bug#62771] [PATCH 9/9] gnu: Add easyeffects.

From: 'Brendan Tildesley <[email-masked]>
Date: Tue, 11 Apr 2023 18:09:55 +1000

From: Brendan Tildesley <[email-masked]>

* gnu/packages/audio.scm (easyeffects): New variable.
---
 gnu/packages/audio.scm | 98 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 519ca1493d..d9c736be71 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -71,6 +71,7 @@ (define-module (gnu packages audio)
   #:use-module (gnu packages build-tools)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cpp)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages documentation)
@@ -80,6 +81,7 @@ (define-module (gnu packages audio)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fltk)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
@@ -111,6 +113,7 @@ (define-module (gnu packages audio)
   #:use-module (gnu packages onc-rpc)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages pulseaudio)  ;libsndfile, libsamplerate
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-science)
@@ -122,6 +125,7 @@ (define-module (gnu packages audio)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages tbb)
   #:use-module (gnu packages telephony)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
@@ -6378,3 +6382,97 @@ (define-public cubeb
       (description "Cubeb is Mozilla's cross-platform audio library.")
       (home-page "https://github.com/mozilla/cubeb")
       (license license:isc))))
+
+(define-public easyeffects
+  (package
+    (name "easyeffects")
+    (version "7.0.1") ; later version require gtk 4.10
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/wwmm/easyeffects")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "0c49yd4dfh7qarq5h651dgxdbs71is4pp1sl8r0gfswqji6bv39w"))))
+    (build-system meson-build-system)
+    (native-inputs
+     (list `(,glib "bin") ;for glib-compile-resources
+           gcc-11 ; for #include <source_location>
+           gettext-minimal
+           itstool
+           pkg-config))
+    (inputs
+     (list fftwf
+           fmt
+           gsl
+           gtk
+           json-modern-cxx ;nlohmann_json
+           libadwaita
+           libbs2b
+           libebur128
+           libportal
+           libsamplerate
+           libsigc++
+           libsndfile
+           lilv
+           pango-next
+           pipewire
+           rnnoise
+           speex
+           speexdsp
+           tbb
+           zita-convolver))
+    ;; Propagating these allows EasyEffects to find the plugins via their
+    ;; search-path specification
+    (propagated-inputs
+     (list calf
+           lsp-plugins
+           lv2
+           mda-lv2
+           rubberband
+           zam-plugins))
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'skip-gtk-update-icon-cache
+           (lambda _ ; Remove dependency on needless desktop cache stuff.
+             (substitute* "meson.build"
+               (("gtk_update_icon_cache: true") "gtk_update_icon_cache: false")
+               (("update_desktop_database: true") "update_desktop_database: false")))))))
+    (home-page "https://github.com/wwmm/easyeffects")
+    (synopsis "Realtime Audio effects interface for Pipewire")
+    (description "EasyEffects is an advanced audio manipulation tool providing
+a graphical user interface to apply various effects and filters to audio
+streams using Pipewire.  Effects can be applied in real time to audio inputs or
+outputs such as a microphone to reduce noise or apply many other effects
+including:
+
+@itemize
+@item Auto gain
+@item Bass enhancer
+@item Bass loudness
+@item Compressor
+@item Convolver
+@item Crossfeed
+@item Crystalizer
+@item De-esser
+@item Delay
+@item Echo Canceller
+@item Equalizer
+@item Exciter
+@item Filter (low-pass, high-pass, band-pass and band-reject modes)
+@item Gate
+@item Limiter
+@item Loudness
+@item Maximizer
+@item Multiband compressor
+@item Multiband gate
+@item Noise reduction
+@item Pitch
+@item Reverberation
+@item Speech Processor
+@item Stereo tools
+@end itemize")
+    (license license:gpl3+)))
-- 
2.39.2