gnu: zynaddsubfx: Update to 2.5.2.
[jackhill/guix/guix.git] / gnu / packages / music.scm
index 59bec64..a217a89 100644 (file)
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system python)
   #:use-module (guix build-system waf)
   #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base) ;libbdf
   #:use-module (gnu packages boost)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages cdrom)
   #:use-module (gnu packages code)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -52,7 +57,9 @@
   #:use-module (gnu packages linux) ; for alsa-utils
   #:use-module (gnu packages man)
   #:use-module (gnu packages mp3)
+  #:use-module (gnu packages ncurses)
   #:use-module (gnu packages netpbm)
+  #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio) ;libsndfile
   #:use-module (gnu packages qt)
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages rsync)
+  #:use-module (gnu packages tcl)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages texlive)
+  #:use-module (gnu packages video)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages xorg)
   #:use-module (gnu packages xiph)
-  #:use-module (gnu packages zip))
+  #:use-module (gnu packages zip)
+  #:use-module ((srfi srfi-1) #:select (last)))
+
+(define-public cmus
+  (package
+    (name "cmus")
+    (version "2.7.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/" name "/" name "/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0raixgjavkm7hxppzsc5zqbfbh2bhjcmbiplhnsxsmyj8flafyc1"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; cmus does not include tests
+       #:phases
+       (modify-phases %standard-phases
+         (replace
+          'configure
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+
+              ;; It's an idiosyncratic configure script that doesn't
+              ;; understand --prefix=..; it wants prefix=.. instead.
+              (zero?
+               (system* "./configure"
+                        (string-append "prefix=" out)))))))))
+    ;; TODO: cmus optionally supports the following formats, which haven't yet
+    ;; been added to Guix:
+    ;;
+    ;; - Roar, libroar
+    ;;
+    ;; - DISCID_LIBS, apparently different from cd-discid which is included in
+    ;;   Guix.  See <http://sourceforge.net/projects/discid/>
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("ao" ,ao)
+       ("ffmpeg" ,ffmpeg)
+       ("flac" ,flac)
+       ("jack" ,jack-1)
+       ("libcddb" ,libcddb)
+       ("libcdio-paranoia" ,libcdio-paranoia)
+       ("libcue" ,libcue)
+       ("libmad" ,libmad)
+       ("libmodplug" ,libmodplug)
+       ("libmpcdec" ,libmpcdec)
+       ("libsamplerate" ,libsamplerate)
+       ("libvorbis" ,libvorbis)
+       ("ncurses" ,ncurses)
+       ("opusfile" ,opusfile)
+       ("pulseaudio" ,pulseaudio)
+       ("wavpack" ,wavpack)))
+     (home-page "https://cmus.github.io/")
+     (synopsis "Small console music player")
+     (description "Cmus is a small and fast console music player.  It supports
+many input formats and provides a customisable Vi-style user interface.")
+     (license license:gpl2+)))
 
 (define-public hydrogen
   (package
@@ -180,7 +252,7 @@ you to define complex tempo maps for entire songs or performances.")
 (define-public lilypond
   (package
     (name "lilypond")
-    (version "2.18.2")
+    (version "2.19.27")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -189,26 +261,36 @@ you to define complex tempo maps for entire songs or performances.")
                     name "-" version ".tar.gz"))
               (sha256
                (base32
-                "01xs9x2wjj7w9appaaqdhk15r1xvvdbz9qwahzhppfmhclvp779j"))))
+                "11v4jr4qj1jpqvjw1ww7riv8pxfyasif8mf16l447f1xq1ifhkhs"))))
     (build-system gnu-build-system)
     (arguments
-     `(;; Tests fail with this error:
-       ;; Undefined subroutine &main::get_index called at
-       ;; ./lilypond-2.18.2/Documentation/lilypond-texi2html.init line 2127.
-       #:tests? #f
+     `(#:tests? #f ; out-test/collated-files.html fails
        #:out-of-source? #t
+       #:configure-flags
+       (list (string-append "--with-texgyre-dir="
+                            (assoc-ref %build-inputs "font-tex-gyre")
+                            "/share/fonts/opentype/"))
        #:phases
-       (alist-cons-before
-        'configure 'prepare-configuration
-        (lambda _
-          (substitute* "configure"
-            (("SHELL=/bin/sh") "SHELL=sh"))
-          (setenv "out" "")
-          #t)
-        %standard-phases)))
+       (modify-phases %standard-phases
+         (add-after 'unpack 'hardcode-path-to-gs
+          (lambda* (#:key inputs #:allow-other-keys)
+            (substitute* "scm/backend-library.scm"
+              (("\\(search-executable '\\(\"gs\"\\)\\)")
+               (string-append "\""
+                              (assoc-ref inputs "ghostscript")
+                              "/bin/gs"
+                              "\"" )))
+            #t))
+         (add-before 'configure 'prepare-configuration
+          (lambda _
+            (substitute* "configure"
+              (("SHELL=/bin/sh") "SHELL=sh"))
+            (setenv "out" "")
+            #t)))))
     (inputs
      `(("guile" ,guile-1.8)
        ("font-dejavu" ,font-dejavu)
+       ("font-tex-gyre" ,font-tex-gyre)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
        ("ghostscript" ,ghostscript)
@@ -257,7 +339,21 @@ Guile.")
       (build-system waf-build-system)
       (arguments
        `(#:tests? #f ;no "check" target
-         #:configure-flags '("--project=sequencer")
+         #:configure-flags
+         (list "--project=sequencer"
+               ;; Disable the use of SSE unless on x86_64.
+               ,@(if (not (string-prefix? "x86_64" (or (%current-target-system)
+                                                       (%current-system))))
+                     '("--disable-sse")
+                     '()))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before
+            'configure 'set-flags
+            (lambda _
+              ;; Compile with C++11, required by libsigc++.
+              (setenv "CXXFLAGS" "-std=c++11")
+              #t)))
          #:python ,python-2))
       (inputs
        `(("jack" ,jack-1)
@@ -578,7 +674,7 @@ Laurens Hammond and Don Leslie.")
     (inputs
      `(("swt" ,swt)))
     (native-inputs
-     `(("gcj" ,gcj-4.8)
+     `(("gcj" ,gcj)
        ("pkg-config" ,pkg-config)))
     (home-page "http://tuxguitar.com.ar")
     (synopsis "Multitrack tablature editor and player")
@@ -590,3 +686,132 @@ management, bend/slide/vibrato/hammer-on/pull-off effects, support for
 tuplets, time signature management, tempo management, gp3/gp4/gp5 import and
 export.")
     (license license:lgpl2.1+)))
+
+(define-public pd
+  (package
+    (name "pd")
+    (version "0.45.4")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "mirror://sourceforge/pure-data/pure-data/"
+                              version "/pd-" (version-major+minor version)
+                              "-" (last (string-split version #\.))
+                              ".src.tar.gz"))
+              (sha256
+               (base32
+                "1ls2ap5yi2zxvmr247621g4jx0hhfds4j5704a050bn2n3l0va2p"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no "check" target
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+          'configure 'fix-wish-path
+          (lambda _
+            (substitute* "src/s_inter.c"
+              (("  wish ") (string-append "  " (which "wish8.6") " ")))
+            (substitute* "tcl/pd-gui.tcl"
+              (("exec wish ") (string-append "exec " (which "wish8.6") " ")))
+            #t))
+         (add-after
+          'unpack 'autoconf
+          (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("gettext" ,gnu-gettext)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("tk" ,tk)
+       ("alsa-lib" ,alsa-lib)
+       ("jack" ,jack-1)))
+    (home-page "http://puredata.info")
+    (synopsis "Visual programming language for artistic performances")
+    (description
+     "Pure Data (aka Pd) is a visual programming language.  Pd enables
+musicians, visual artists, performers, researchers, and developers to create
+software graphically, without writing lines of code.  Pd is used to process
+and generate sound, video, 2D/3D graphics, and interface sensors, input
+devices, and MIDI.  Pd can easily work over local and remote networks to
+integrate wearable technology, motor systems, lighting rigs, and other
+equipment.  Pd is suitable for learning basic multimedia processing and visual
+programming methods as well as for realizing complex systems for large-scale
+projects.")
+    (license license:bsd-3)))
+
+(define-public frescobaldi
+  (package
+    (name "frescobaldi")
+    (version "2.18.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/wbsoft/frescobaldi/releases/download/v"
+                    version "/frescobaldi-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1hflc6gck6dn17czc2ldai5j0ynfg3df8lqcggdry06qxsdbnns7"))))
+    (build-system python-build-system)
+    (inputs
+     `(("lilypond" ,lilypond)
+       ("python-pyqt-4" ,python-pyqt-4)
+       ("python-ly" ,python-ly)
+       ("poppler" ,poppler)
+       ("python-poppler-qt4" ,python-poppler-qt4)
+       ("python-sip" ,python-sip)))
+    (home-page "http://www.frescobaldi.org/")
+    (synopsis "LilyPond sheet music text editor")
+    (description
+     "Frescobaldi is a LilyPond sheet music text editor with syntax
+highlighting and automatic completion.  Among other things, it can render
+scores next to the source, can capture input from MIDI or read MusicXML and
+ABC files, has a MIDI player for proof-listening, and includes a documentation
+browser.")
+    (license license:gpl2+)))
+
+(define-public zynaddsubfx
+  (package
+    (name "zynaddsubfx")
+    (version "2.5.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://sourceforge/zynaddsubfx/zynaddsubfx/"
+                    version "/zynaddsubfx-" version ".tar.gz"))
+              (sha256
+               (base32
+                "11yrady7xwfrzszkk2fvq81ymv99mq474h60qnirk27khdygk24m"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; Move SSE compiler optimization flags from generic target to
+         ;; athlon64 and core2 targets, because otherwise the build would fail
+         ;; on non-Intel machines.
+         (add-after 'unpack 'remove-sse-flags-from-generic-target
+          (lambda _
+            (substitute* "src/CMakeLists.txt"
+              (("-msse -msse2 -mfpmath=sse") "")
+              (("-march=(athlon64|core2)" flag)
+               (string-append flag " -msse -msse2 -mfpmath=sse")))
+            #t)))))
+    (inputs
+     `(("liblo" ,liblo)
+       ("ntk" ,ntk)
+       ("alsa-lib" ,alsa-lib)
+       ("jack" ,jack-1)
+       ("fftw" ,fftw)
+       ("minixml" ,minixml)
+       ("libxpm" ,libxpm)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://zynaddsubfx.sf.net/")
+    (synopsis "Software synthesizer")
+    (description
+     "ZynAddSubFX is a feature heavy realtime software synthesizer.  It offers
+three synthesizer engines, multitimbral and polyphonic synths, microtonal
+capabilities, custom envelopes, effects, etc.")
+    (license license:gpl2)))