+
+(define-public python-pyalsaaudio
+ (package
+ (name "python-pyalsaaudio")
+ (version "0.8.4")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyalsaaudio" version))
+ (sha256
+ (base32
+ "1180ypn9596rq4b7y7dyv627j1q0fqilmkkrckclnzsdakdgis44"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f)) ; tests require access to ALSA devices.
+ (inputs
+ `(("alsa-lib" ,alsa-lib)))
+ (home-page "http://larsimmisch.github.io/pyalsaaudio/")
+ (synopsis "ALSA wrappers for Python")
+ (description
+ "This package contains wrappers for accessing the ALSA API from Python.
+It is currently fairly complete for PCM devices, and has some support for
+mixers.")
+ (license license:psfl)))
+
+(define-public python2-pyalsaaudio
+ (package-with-python2 python-pyalsaaudio))
+
+(define-public bluez-alsa
+ (package
+ (name "bluez-alsa")
+ (version "1.2.0")
+ (source (origin
+ ;; The tarballs are mere snapshots and don't contain a
+ ;; bootstrapped build system.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Arkq/bluez-alsa.git")
+ (commit (string-append "v" version))))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1qinf41wl2ihx54zmmhanycihwjkn7dn1cicq6pp4rqbiv79b95x"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap
+ (lambda _
+ (zero? (system* "autoreconf" "-vif")))))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("bluez" ,bluez)
+ ("glib" ,glib)
+ ("libbsd" ,libbsd)
+ ("ncurses" ,ncurses)
+ ("ortp" ,ortp)
+ ("sbc" ,sbc)))
+ (home-page "https://github.com/Arkq/bluez-alsa")
+ (synopsis "Bluetooth ALSA backend")
+ (description "This project is a rebirth of a direct integration between
+Bluez and ALSA. Since Bluez >= 5, the build-in integration has been removed
+in favor of 3rd party audio applications. From now on, Bluez acts as a
+middleware between an audio application, which implements Bluetooth audio
+profile, and a Bluetooth audio device. BlueALSA registers all known Bluetooth
+audio profiles in Bluez, so in theory every Bluetooth device (with audio
+capabilities) can be connected. In order to access the audio stream, one has
+to connect to the ALSA PCM device called @code{bluealsa}. The device is based
+on the ALSA software PCM plugin.")
+ (license license:expat)))
+
+(define-public snd
+ (package
+ (name "snd")
+ (version "17.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "ftp://ccrma-ftp.stanford.edu/pub/Lisp/"
+ "snd-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1vm0dy5qlycqkima7y5ajzvazyjybifa803fabjcpncjz08c26vp"))))
+ (build-system glib-or-gtk-build-system)
+ (arguments
+ '(#:tests? #f ; no tests
+ #:out-of-source? #f ; for the 'install-doc' phase
+ #:configure-flags
+ (let* ((out (assoc-ref %outputs "out"))
+ (docdir (string-append out "/share/doc/snd")))
+ (list "--with-alsa" "--with-jack" "--with-gmp"
+ (string-append "--with-doc-dir=" docdir)))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (docdir (string-append out "/share/doc/snd")))
+ (mkdir-p docdir)
+ (for-each
+ (lambda (f)
+ (install-file f docdir))
+ (find-files "." "\\.html$|COPYING"))
+ (copy-recursively "pix" (string-append docdir "/pix"))
+ #t))))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("fftw" ,fftw)
+ ("flac" ,flac)
+ ("gmp" ,gmp)
+ ("gsl" ,gsl)
+ ("gtk+" ,gtk+)
+ ("jack" ,jack-1)
+ ("libsamplerate" ,libsamplerate)
+ ("mpc" ,mpc)
+ ("mpfr" ,mpfr)
+ ("mpg123" ,mpg123)
+ ("speex" ,speex)
+ ("timidity++" ,timidity++)
+ ("vorbis-tools" ,vorbis-tools)
+ ("wavpack" ,wavpack)))
+ (synopsis "Sound editor")
+ (home-page "https://ccrma.stanford.edu/software/snd/")
+ (description
+ "Snd is a sound editor modelled loosely after Emacs. It can be
+customized and extended using either the s7 Scheme implementation (included in
+the Snd sources), Ruby, or Forth.")
+ (license (license:non-copyleft "file://COPYING"))))
+
+(define-public noise-repellent
+ (package
+ (name "noise-repellent")
+ (version "0.1.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/lucianodato/noise-repellent.git")
+ (commit version)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0rd3dlmk3vivjmcr6x2x860y0j1d49c2j95j6ny50v184mwvn11j"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list "CC=gcc"
+ (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ #:tests? #f ; there are none
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (inputs
+ `(("lv2" ,lv2)
+ ("fftwf" ,fftwf)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/lucianodato/noise-repellent")
+ (synopsis "LV2 plugin for broadband noise reduction")
+ (description "Noise Repellent is an LV2 plugin to reduce noise. It has
+the following features:
+
+@enumerate
+@item Spectral gating and spectral subtraction suppression rule
+@item Adaptive and manual noise thresholds estimation
+@item Adjustable noise floor
+@item Adjustable offset of thresholds to perform over-subtraction
+@item Time smoothing and a masking estimation to reduce artifacts
+@item Basic onset detector to avoid transients suppression
+@item Whitening of the noise floor to mask artifacts and to recover higher
+ frequencies
+@item Option to listen to the residual signal
+@item Soft bypass
+@item Noise profile saved with the session
+@end enumerate
+")
+ (license license:lgpl3+)))
+
+(define-public cli-visualizer
+ (package
+ (name "cli-visualizer")
+ (version "1.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/dpayne/cli-visualizer/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "07zkm87f2fr8kc6531zrkya7q81sdanm6813y2f54mg13g41y6hi"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("which" ,which)))
+ (inputs
+ `(("fftw" ,fftw)
+ ("googletest" ,googletest)
+ ("ncurses" ,ncurses)
+ ("pulseaudio" ,pulseaudio)))
+ (arguments
+ '(#:test-target "test"
+ #:make-flags
+ (list (string-append "PREFIX=" %output "/bin/") "ENABLE_PULSE=1")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-sudo
+ (lambda _
+ (substitute* "install.sh" (("sudo") ""))
+ #t))
+ (add-before 'check 'set-check-environment
+ (lambda _
+ (setenv "CXX" "g++")
+ (setenv "CC" "gcc")
+ #t))
+ (add-before 'install 'make-prefix
+ (lambda _
+ (mkdir-p (string-append (assoc-ref %outputs "out") "/bin"))
+ #t))
+ (add-after 'install 'data
+ (lambda _
+ (for-each (lambda (file)
+ (install-file file
+ (string-append (assoc-ref %outputs "out")
+ "/share/doc")))
+ (find-files "examples"))
+ #t)))))
+ (home-page "https://github.com/dpayne/cli-visualizer/")
+ (synopsis "Command-line audio visualizer")
+ (description "@code{cli-visualizer} displays fast-Fourier
+transforms (FFTs) of the sound being played, as well as other graphical
+representations.")
+ (license license:expat)))
+
+(define-public cava
+ (package
+ (name "cava")
+ (version "0.6.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/karlstav/cava/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1p24lz3h4d0h82ffylqr7mq8a8x1c66flm2r2bsv1liw51n1rma2"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
+ (inputs
+ `(("fftw" ,fftw)
+ ("ncurses" ,ncurses)
+ ("pulseaudio" ,pulseaudio)))
+ (arguments
+ `(#:configure-flags
+ (list (string-append "PREFIX=" %output)
+ (string-append "FONT_DIR=" %output "/usr/share/consolefonts"))
+ #:make-flags
+ (let ((lib (string-append %output "/lib")))
+ (list (string-append "cava_LDFLAGS = -L" lib " -Wl,-rpath " lib)))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap
+ (lambda* (#:key outputs #:allow-other-keys)
+ (setenv "HOME" (getcwd))
+ (invoke "sh" "autogen.sh")))
+ (add-before 'build 'make-cava-ldflags
+ (lambda* (#:key outputs #:allow-other-keys)
+ (mkdir-p (string-append (assoc-ref outputs "out") "/lib"))))
+ (add-after 'install 'data
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each (lambda (file)
+ (install-file file
+ (string-append (assoc-ref outputs "out")
+ "/share/doc/examples")))
+ (find-files "example_files")))))))
+ (home-page "https://karlstav.github.io/cava/")
+ (synopsis "Console audio visualizer for ALSA, MPD, and PulseAudio")
+ (description "C.A.V.A. is a bar audio spectrum visualizer for the terminal
+using ALSA, MPD, PulseAudio, or a FIFO buffer as its input.")
+ (license license:expat)))