gnu: zita-convolver: Drop the '-march=native' optimization.
[jackhill/guix/guix.git] / gnu / packages / audio.scm
index 388e4ea..ebae5d5 100644 (file)
@@ -42,6 +42,8 @@
   #:use-module (gnu packages databases)
   #:use-module (gnu packages file)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages fltk)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages python)
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages webkit)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages xorg)
   #:use-module (gnu packages zip)
   #:use-module (srfi srfi-1))
 
@@ -127,7 +131,7 @@ Filter) modules follow the convention of 1V / Octave.")
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (home-page "http://aubio.org/")
-    (synopsis "A library for audio labelling")
+    (synopsis "Library for audio labelling")
     (description
      "aubio is a tool designed for the extraction of annotations from audio
 signals.  Its features include segmenting a sound file before each of its
@@ -151,13 +155,11 @@ streams from live audio.")
                          libdir "/vamp" "\"]"))))
      #t))
 
-(define-public ardour-3
+(define-public ardour
   (package
     (name "ardour")
-    (version "3.5.403")
+    (version "4.4")
     (source (origin
-              ;; The project only provides tarballs upon individual request
-              ;; (or after payment) so we take the code from git.
               (method git-fetch)
               (uri (git-reference
                     (url "git://git.ardour.org/ardour/ardour.git")
@@ -170,14 +172,15 @@ streams from live audio.")
                     "libs/ardour/revision.cc"
                   (lambda (port)
                     (format port "#include \"ardour/revision.h\"
-namespace ARDOUR { const char* revision = \"3.5-403-gec2cb31\" ; }"))))
+namespace ARDOUR { const char* revision = \"4.4-210-ga4daf93\" ; }"))))
               (sha256
                (base32
-                "01b0wxh0wlxjfz5j8gcwwqhxc6q2kn4njz2fcmzv9fr3xaya5dbp"))
+                "1gnrcnq2ksnh7fsa301v1c4p5dqrbqpjylf02rg3za3ab58wxi7l"))
               (file-name (string-append name "-" version))))
     (build-system waf-build-system)
     (arguments
-     `(#:phases
+     `(#:configure-flags '("--cxx11") ; required by gtkmm
+       #:phases
        (modify-phases %standard-phases
          (add-after
           'unpack 'set-rpath-in-LDFLAGS
@@ -229,36 +232,6 @@ record, edit, mix and master audio and MIDI projects.  It is targeted at audio
 engineers, musicians, soundtrack editors and composers.")
     (license license:gpl2+)))
 
-(define-public ardour
-  (package (inherit ardour-3)
-    (name "ardour")
-    ;; We pick the commit after 4.1 because it fixes a build problem.
-    (version "4.1-5aa834e")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "git://git.ardour.org/ardour/ardour.git")
-                    (commit (cadr (string-split version #\-)))))
-              (snippet
-               ;; Ardour expects this file to exist at build time.  It can be
-               ;; created from a git checkout with:
-               ;;   ./waf create_stored_revision
-               '(call-with-output-file
-                    "libs/ardour/revision.cc"
-                  (lambda (port)
-                    (format port "#include \"ardour/revision.h\"
-namespace ARDOUR { const char* revision = \"4.1\" ; }"))))
-              (sha256
-               (base32
-                "0pfmxlscnwyqmgc89cdwrsk1769lr89dirfnpjbxj9zgcns6zqgb"))
-              (file-name (string-append name "-" version))))
-    (arguments
-     (substitute-keyword-arguments (package-arguments ardour-3)
-       ((#:phases phases)
-        `(modify-phases ,phases
-           (replace 'set-rpath-in-LDFLAGS
-                    ,(ardour-rpath-phase (version-prefix version 1)))))))))
-
 (define-public azr3
   (package
     (name "azr3")
@@ -301,9 +274,8 @@ plugins are provided.")
     (version "0.0.60")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "mirror://sourceforge/calf/calf/"
-                    version "/calf-" version ".tar.gz"))
+              (uri (string-append "http://calf-studio-gear.org/files/calf-"
+                                  version ".tar.gz"))
               (sha256
                (base32
                 "019fwg00jv217a5r767z7szh7vdrarybac0pr2sk26xp81kibrx9"))))
@@ -340,7 +312,7 @@ tools (analyzer, mono/stereo tools, crossovers).")
 (define-public csound
   (package
     (name "csound")
-    (version "6.04")
+    (version "6.05")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -348,8 +320,14 @@ tools (analyzer, mono/stereo tools, crossovers).")
                     version "/Csound" version ".tar.gz"))
               (sha256
                (base32
-                "1030w38lxdwjz1irr32m9cl0paqmgr02lab2m7f7j1yihwxj1w0g"))))
+                "0a1sni6lr7qpwywpggbkp0ia3h9bwwgf9i87gsag8ra2h30v82hd"))))
     (build-system cmake-build-system)
+    (arguments
+     ;; Work around this error on x86_64 with libc 2.22+:
+     ;;    libmvec.so.1: error adding symbols: DSO missing from command line
+     (if (string-prefix? "x86_64" (or (%current-target-system) (%current-system)))
+         '(#:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-lmvec"))
+         '()))
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("boost" ,boost)
@@ -558,7 +536,7 @@ patches that can be used with softsynths such as Timidity and WildMidi.")
 (define-public guitarix
   (package
     (name "guitarix")
-    (version "0.32.3")
+    (version "0.34.0")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -566,18 +544,16 @@ patches that can be used with softsynths such as Timidity and WildMidi.")
                    version ".tar.bz2"))
              (sha256
               (base32
-               "1ybc5jk7fj6n8qh9ajzl1f6fzdmzab4nwjrh4fsylm94dn1jv0if"))))
+               "0pamaq8iybsaglq6y1m1rlmz4wgbs2r6m24bj7x4fwg4grjvzjl8"))))
     (build-system waf-build-system)
     (arguments
      `(#:tests? #f ; no "check" target
        #:python ,python-2
        #:configure-flags
        (list
-        ;; FIXME: dsp2cc fails for src/faust/tonestack_engl.dsp, so we use the
-        ;; generated C++ files rather than compiling them from Faust sources.
-        "--no-faust"
         ;; Add the output lib directory to the RUNPATH.
-        (string-append "--ldflags=-Wl,-rpath=" %output "/lib"))))
+        (string-append "--ldflags=-Wl,-rpath=" %output "/lib")
+        "--cxxflags=-std=c++11")))
     (inputs
      `(("libsndfile" ,libsndfile)
        ("boost" ,boost)
@@ -589,13 +565,14 @@ patches that can be used with softsynths such as Timidity and WildMidi.")
        ("jack" ,jack-1)
        ("gtkmm" ,gtkmm-2)
        ("gtk+" ,gtk+-2)
+       ("webkitgtk/gtk+-2" ,webkitgtk/gtk+-2)
        ("fftwf" ,fftwf)
        ("lrdf" ,lrdf)
        ("zita-resampler" ,zita-resampler)
        ("zita-convolver" ,zita-convolver)))
     (native-inputs
      `(("gperf" ,gperf)
-       ;;("faust" ,faust) ; dsp2cc fails for src/faust/tonestack_engl.dsp
+       ("faust" ,faust)
        ("intltool" ,intltool)
        ("gettext" ,gnu-gettext)
        ("pkg-config" ,pkg-config)))
@@ -614,6 +591,56 @@ from a simple noise gate to modulation effects like flanger, phaser or
 auto-wah.")
     (license license:gpl2+)))
 
+(define-public rakarrack
+  (package
+    (name "rakarrack")
+    (version "0.6.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/rakarrack/rakarrack/"
+                                  "rakarrack-" version "/rakarrack-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32
+                "1rpf63pdn54c4yg13k7cb1w1c7zsvl97c4qxcpz41c8l91xd55kn"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (substitute* '("src/process.C"
+                                 "src/global.h")
+                    (("#include <Fl/") "#include <FL/"))
+                  #t))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("alsa-utils" ,alsa-utils)
+       ("fltk" ,fltk)
+       ("libx11" ,libx11)
+       ("libxext" ,libxext)
+       ("libxfixes" ,libxfixes)
+       ("libxft" ,libxft)
+       ("libxrender" ,libxrender)
+       ("libxpm" ,libxpm)
+       ("fontconfig" ,fontconfig)
+       ("freetype" ,freetype)
+       ("jack" ,jack-1)
+       ("alsa-lib" ,alsa-lib)
+       ("libsndfile" ,libsndfile)
+       ("libsamplerate" ,libsamplerate)
+       ("zlib" ,zlib)))
+    (home-page "http://rakarrack.sourceforge.net/")
+    (synopsis "Audio effects processor")
+    (description
+     "Rakarrack is a richly featured multi-effects processor emulating a
+guitar effects pedalboard.  Effects include compressor, expander, noise gate,
+equalizers, exciter, flangers, chorus, various delay and reverb effects,
+distortion modules and many more.  Most of the effects engine is built from
+modules found in the excellent software synthesizer ZynAddSubFX.  Presets and
+user interface are optimized for guitar, but Rakarrack processes signals in
+stereo while it does not apply internal band-limiting filtering, and thus is
+well suited to all musical instruments and vocals.")
+    ;; The code is explicitly licensed under the GPL version 2 only.
+    (license license:gpl2)))
+
 (define-public ir
   (package
     (name "ir")
@@ -670,11 +697,12 @@ especially for creating reverb effects.  It supports impulse responses with 1,
     (build-system gnu-build-system)
     (inputs
      `(("alsa-lib" ,alsa-lib)
-       ("bdb" ,bdb)
        ("readline" ,readline)))
     ;; uuid.h is included in the JACK type headers
+    ;; db.h is included in the libjack metadata headers
     (propagated-inputs
-     `(("libuuid" ,util-linux)))
+     `(("libuuid" ,util-linux)
+       ("bdb" ,bdb)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (home-page "http://jackaudio.org/")
@@ -690,6 +718,9 @@ synchronous execution of all clients, and low latency operation.")
     ;; licensed under the LGPL in order to allow for proprietary usage.
     (license (list license:gpl2+ license:lgpl2.1+))))
 
+;; Packages depending on JACK should always prefer jack-1.  Both jack-1 and
+;; jack-2 implement the same API.  JACK2 is provided primarily as a client
+;; program for users who might benefit from the D-BUS features.
 (define-public jack-2
   (package (inherit jack-1)
     (name "jack2")
@@ -706,7 +737,8 @@ synchronous execution of all clients, and low latency operation.")
                "03b0iiyk3ng3vh5s8gaqwn565vik7910p56mlbk512bw3dhbdwc8"))))
     (build-system waf-build-system)
     (arguments
-     `(#:tests? #f  ; no check target
+     `(#:python ,python-2
+       #:tests? #f  ; no check target
        #:configure-flags '("--dbus"
                            "--alsa")
        #:phases
@@ -719,13 +751,22 @@ synchronous execution of all clients, and low latency operation.")
               ((".*CFLAGS.*-Wall.*" m)
                (string-append m
                               "    conf.env.append_unique('LINKFLAGS',"
-                              "'-Wl,-rpath=" %output "/lib')\n"))))))))
+                              "'-Wl,-rpath=" %output "/lib')\n")))))
+         (add-after 'install 'wrap-python-scripts
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            ;; Make sure 'jack_control' runs with the correct PYTHONPATH.
+            (let* ((out (assoc-ref outputs "out"))
+                   (path (getenv "PYTHONPATH")))
+              (wrap-program (string-append out "/bin/jack_control")
+                `("PYTHONPATH" ":" prefix (,path))))
+            #t)))))
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("dbus" ,dbus)
        ("expat" ,expat)
        ("libsamplerate" ,libsamplerate)
        ("opus" ,opus)
+       ("python2-dbus" ,python2-dbus)
        ("readline" ,readline)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -744,7 +785,16 @@ synchronous execution of all clients, and low latency operation.")
                (base32
                 "1f1hcq74n3ziw8bk97mn5a1vgw028dxikv3fchaxd430pbbhqgl9"))))
     (build-system waf-build-system)
-    (arguments `(#:tests? #f)) ; no check target
+    (arguments
+     `(#:tests? #f ; no check target
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+          'configure 'set-flags
+          (lambda _
+            ;; Compile with C++11, required by gtkmm.
+            (setenv "CXXFLAGS" "-std=c++11")
+            #t)))))
     (inputs
      `(("lv2" ,lv2)
        ("lilv" ,lilv)
@@ -767,15 +817,20 @@ plugin function as a JACK application.")
   (package
     (name "ladspa")
     (version "1.13")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append
-                   "http://www.ladspa.org/download/ladspa_sdk_"
-                   version
-                   ".tgz"))
-             (sha256
-              (base32
-               "0srh5n2l63354bc0srcrv58rzjkn4gv8qjqzg8dnq3rs4m7kzvdm"))))
+    (source
+     (origin
+       (method url-fetch)
+       ;; Since the official link is dead,
+       ;; we download the tarball from Debian or Internet Archive.
+       (uri (list (string-append "http://http.debian.net"
+                                 "/debian/pool/main/l/ladspa-sdk/ladspa-sdk_"
+                                 version ".orig.tar.gz")
+                  (string-append "https://web.archive.org/web/20140717172251/"
+                                 "http://www.ladspa.org/download/ladspa_sdk_"
+                                 version ".tgz")))
+       (sha256
+        (base32
+         "0srh5n2l63354bc0srcrv58rzjkn4gv8qjqzg8dnq3rs4m7kzvdm"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f  ; the "test" target is a listening test only
@@ -793,7 +848,9 @@ plugin function as a JACK application.")
               (("^CC.*")            "CC = gcc\n")
               (("^CPP.*")           "CPP = g++\n"))))
         (alist-delete 'build %standard-phases))))
-    (home-page "http://ladspa.org")
+    ;; Since the home page is gone, we provide a link to the archived version.
+    (home-page
+     "https://web.archive.org/web/20140729190945/http://www.ladspa.org/")
     (synopsis "Linux Audio Developer's Simple Plugin API (LADSPA)")
     (description
      "LADSPA is a standard that allows software audio processors and effects
@@ -1052,7 +1109,25 @@ lv2-c++-tools.")
                 "0mmhdqiyb3c9dzvxspm8h2v8jibhi8pfjxnf6m0wn744y1ia2a8f"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:tests? #f)) ; no check target
+     `(#:tests? #f  ; no check target
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'unpack 'use-full-library-paths
+          (lambda* (#:key inputs #:allow-other-keys)
+            (substitute* "Alc/backends/pulseaudio.c"
+              (("#define PALIB \"libpulse\\.so\\.0\"")
+               (string-append "#define PALIB \""
+                              (assoc-ref inputs "pulseaudio")
+                              "/lib/libpulse.so.0"
+                              "\"")))
+            (substitute* "Alc/backends/alsa.c"
+              (("LoadLib\\(\"libasound\\.so\\.2\"\\)")
+               (string-append "LoadLib(\""
+                              (assoc-ref inputs "alsa-lib")
+                              "/lib/libasound.so.2"
+                              "\")")))
+            #t)))))
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("pulseaudio" ,pulseaudio)))
@@ -1328,11 +1403,11 @@ disks as various audio file formats.")
               (method url-fetch)
               (uri (string-append
                     "https://code.soundsoftware.ac.uk"
-                    "/attachments/download/1514/vamp-plugin-sdk-"
+                    "/attachments/download/1520/vamp-plugin-sdk-"
                     version ".tar.gz"))
               (sha256
                (base32
-                "1s986w0mfh1m0870qd7i50hdzayls8kc3shfqf9651jzwdk34lxa"))))
+                "0pzq0yy2kdl3jgfc2aqmh5m55nk1ild0hq8mydiiw35c6y0mglyh"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                      ; no check target
@@ -1632,7 +1707,7 @@ portions of LAME.")
     (inputs
      ;; TODO: Add ASIHPI.
      `(("alsa-lib" ,alsa-lib)
-       ("jack" ,jack-2)))
+       ("jack" ,jack-1)))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)
@@ -1659,14 +1734,14 @@ interface.")
 (define-public qsynth
   (package
     (name "qsynth")
-    (version "0.3.9")
+    (version "0.4.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append
              "mirror://sourceforge/qsynth/qsynth-" version ".tar.gz"))
        (sha256
-        (base32 "08kyn6cl755l9i1grzjx8yi3f8mgiz4gx0hgqad1n0d8yz85087b"))))
+        (base32 "1chc89v9hcjw3k4rvzakl8g56wv24kh48fzv1gfs4iv8vhyl3j4x"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f)) ; no "check" phase
@@ -1689,12 +1764,13 @@ synthesizer written in C++.")
        (method url-fetch)
        (uri (string-append "https://github.com/Themaister/RSound/archive/v"
                            version ".tar.gz"))
+       (file-name (string-append name "-" version))
        (sha256
         (base32 "1wzs40c0k5zpkmm5ffl6c17xmr399sxli7ys0fbb9ib0fd334knx"))))
     (build-system gnu-build-system)
     (inputs
      `(("alsa-lib" ,alsa-lib)
-       ("jack" ,jack-2)
+       ("jack" ,jack-1)
        ("ao" ,ao)
        ("libsamplerate" ,libsamplerate)
        ("openal" ,openal)
@@ -1720,6 +1796,39 @@ directly to a different computer on your LAN network.  It is an audio daemon
 with a much different focus than most other audio daemons.")
     (license license:gpl3+)))
 
+(define-public xjackfreak
+  (package
+    (name "xjackfreak")
+    (version "1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/johnhldavis/xjackfreak/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0xj6gpxfnw9jbdgwgm0x23xgfvj2kwmwb1nk0drw8lxgcchkq7d9"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (list (string-append "docdir=" (assoc-ref %outputs "out")
+                            "/share/doc/xjackfreak"))))
+    (inputs
+     `(("jack" ,jack-1)
+       ("libx11" ,libx11)
+       ("libxt" ,libxt)
+       ("libxext" ,libxext)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "https://github.com/johnhldavis/xjackfreak")
+    (synopsis "JACK audio frequency analyzer and display")
+    (description
+     "XJackFreak is an audio analysis and equalizing tool for the Jack Audio
+Connection Kit.  It can display the FFT of any input, modify it and output the
+result.")
+    (license license:gpl3+)))
+
 (define-public zita-convolver
   (package
     (name "zita-convolver")
@@ -1730,6 +1839,11 @@ with a much different focus than most other audio daemons.")
                     "http://kokkinizita.linuxaudio.org"
                     "/linuxaudio/downloads/zita-convolver-"
                     version ".tar.bz2"))
+              (snippet
+               ;; Don't optimize for a specific processor architecture.
+               '(substitute* "libs/Makefile"
+                  (("^CXXFLAGS \\+= -march=native") "")))
+              (modules '((guix build utils)))
               (sha256
                (base32
                 "14qrnczhp5mbwhky64il7kxc4hl1mmh495v60va7i2qnhasr6zmz"))))
@@ -1772,6 +1886,11 @@ engine.")
                     "http://kokkinizita.linuxaudio.org"
                     "/linuxaudio/downloads/zita-resampler-"
                     version ".tar.bz2"))
+              (snippet
+               ;; Don't optimize for a specific processor architecture.
+               '(substitute* '("apps/Makefile" "libs/Makefile")
+                  (("^CXXFLAGS \\+= -march=native") "")))
+              (modules '((guix build utils)))
               (sha256
                (base32
                 "0r9ary5sc3y8vba5pad581ha7mgsrlyai83w7w4x2fmhfy64q0wq"))))
@@ -1851,3 +1970,56 @@ access to ALSA PCM devices, taking care of the many functions required to
 open, initialise and use a hw: device in mmap mode, and providing floating
 point audio data.")
     (license license:gpl3+)))
+
+(define-public cuetools
+  (package
+    (name "cuetools")
+    (version "1.4.1")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://github.com/svend/cuetools/archive/"
+                                 version ".tar.gz"))
+             (file-name (string-append name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "01xi3rvdmil9nawsha04iagjylqr1l9v9vlzk99scs8c207l58i4"))))
+    (build-system gnu-build-system)
+    ;; The source tarball is not bootstrapped.
+    (arguments
+     `(#:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'bootstrap
+            (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
+    ;; Bootstrapping tools
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("flex" ,flex)
+       ("bison" ,bison)))
+    (synopsis "Cue and toc file parsers and utilities")
+    (description "Cuetools is a set of programs that are useful for manipulating
+and using CUE sheet (cue) files and Table of Contents (toc) files.  CUE and TOC
+files are a way to represent the layout of a data or audio CD in a
+machine-readable ASCII format.")
+    (home-page "https://github.com/svend/cuetools")
+    (license license:gpl2+)))
+
+(define-public shntool
+  (package
+    (name "shntool")
+    (version "3.0.10")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "http://etree.org/shnutils/shntool/dist/src/"
+                                 "shntool-" version ".tar.gz"))
+             (sha256
+              (base32
+               "00i1rbjaaws3drkhiczaign3lnbhr161b7rbnjr8z83w8yn2wc3l"))))
+    (build-system gnu-build-system)
+    (synopsis "WAVE audio data processing tool")
+    (description "shntool is a multi-purpose WAVE data processing and reporting
+utility.  File formats are abstracted from its core, so it can process any file
+that contains WAVE data, compressed or not---provided there exists a format
+module to handle that particular file type.")
+    (home-page "http://etree.org/shnutils/shntool/")
+    (license license:gpl3+)))