linux-initrd: Remove "usbkbd" from the default set of modules.
[jackhill/guix/guix.git] / gnu / packages / music.scm
CommitLineData
1b6826d3 1;;; GNU Guix --- Functional package management for GNU
658212eb 2;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
1b6826d3 3;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
e8069d01 4;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
1b6826d3
RW
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages music)
22 #:use-module (guix utils)
23 #:use-module (guix packages)
24 #:use-module (guix download)
8e80244a 25 #:use-module (guix git-download)
1b6826d3
RW
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix build-system gnu)
8b9ec354 28 #:use-module (guix build-system cmake)
821664f1 29 #:use-module (guix build-system python)
8e80244a 30 #:use-module (guix build-system waf)
1b6826d3 31 #:use-module (gnu packages)
ddfddb0c 32 #:use-module (gnu packages algebra)
c267cc15 33 #:use-module (gnu packages audio)
2d0fd07b 34 #:use-module (gnu packages autotools)
8b9ec354
RW
35 #:use-module (gnu packages base) ;libbdf
36 #:use-module (gnu packages boost)
1b6826d3 37 #:use-module (gnu packages bison)
e8069d01 38 #:use-module (gnu packages cdrom)
8b9ec354
RW
39 #:use-module (gnu packages code)
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages compression)
1b6826d3 42 #:use-module (gnu packages docbook)
bf76d780 43 #:use-module (gnu packages doxygen)
1b6826d3 44 #:use-module (gnu packages flex)
8e80244a 45 #:use-module (gnu packages fltk)
1b6826d3
RW
46 #:use-module (gnu packages fonts)
47 #:use-module (gnu packages fontutils)
6260d1a8 48 #:use-module (gnu packages gcc)
1b6826d3
RW
49 #:use-module (gnu packages gettext)
50 #:use-module (gnu packages ghostscript)
ec8da0e2 51 #:use-module (gnu packages gl)
8e80244a 52 #:use-module (gnu packages glib)
c267cc15 53 #:use-module (gnu packages gnome)
1b6826d3
RW
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages guile)
c267cc15 56 #:use-module (gnu packages image)
1b6826d3 57 #:use-module (gnu packages imagemagick)
6260d1a8 58 #:use-module (gnu packages java)
c267cc15
RW
59 #:use-module (gnu packages linux) ; for alsa-utils
60 #:use-module (gnu packages man)
61 #:use-module (gnu packages mp3)
e8069d01 62 #:use-module (gnu packages ncurses)
1b6826d3 63 #:use-module (gnu packages netpbm)
821664f1 64 #:use-module (gnu packages pdf)
1b6826d3
RW
65 #:use-module (gnu packages perl)
66 #:use-module (gnu packages pkg-config)
d231bb35 67 #:use-module (gnu packages pulseaudio) ;libsndfile
1b6826d3 68 #:use-module (gnu packages python)
8b9ec354 69 #:use-module (gnu packages qt)
d231bb35 70 #:use-module (gnu packages rdf)
c493679f 71 #:use-module (gnu packages readline)
1b6826d3 72 #:use-module (gnu packages rsync)
2d0fd07b 73 #:use-module (gnu packages tcl)
1b6826d3
RW
74 #:use-module (gnu packages texinfo)
75 #:use-module (gnu packages texlive)
e8069d01 76 #:use-module (gnu packages video)
8b9ec354 77 #:use-module (gnu packages web)
c267cc15 78 #:use-module (gnu packages xml)
ddfddb0c 79 #:use-module (gnu packages xorg)
c267cc15 80 #:use-module (gnu packages xiph)
2d0fd07b
RW
81 #:use-module (gnu packages zip)
82 #:use-module ((srfi srfi-1) #:select (last)))
1b6826d3 83
e8069d01
PW
84(define-public cmus
85 (package
86 (name "cmus")
87 (version "2.7.1")
88 (source (origin
89 (method url-fetch)
90 (uri (string-append
91 "https://github.com/" name "/" name "/archive/v"
92 version ".tar.gz"))
566fc7fa 93 (file-name (string-append name "-" version ".tar.gz"))
e8069d01
PW
94 (sha256
95 (base32
96 "0raixgjavkm7hxppzsc5zqbfbh2bhjcmbiplhnsxsmyj8flafyc1"))))
97 (build-system gnu-build-system)
98 (arguments
99 `(#:tests? #f ; cmus does not include tests
100 #:phases
101 (modify-phases %standard-phases
102 (replace
103 'configure
104 (lambda* (#:key outputs #:allow-other-keys)
105 (let ((out (assoc-ref outputs "out")))
106
107 ;; It's an idiosyncratic configure script that doesn't
108 ;; understand --prefix=..; it wants prefix=.. instead.
109 (zero?
110 (system* "./configure"
111 (string-append "prefix=" out)))))))))
112 ;; TODO: cmus optionally supports the following formats, which haven't yet
113 ;; been added to Guix:
114 ;;
115 ;; - Roar, libroar
116 ;;
117 ;; - DISCID_LIBS, apparently different from cd-discid which is included in
118 ;; Guix. See <http://sourceforge.net/projects/discid/>
119 (native-inputs
120 `(("pkg-config" ,pkg-config)))
121 (inputs
122 `(("alsa-lib" ,alsa-lib)
123 ("ao" ,ao)
124 ("ffmpeg" ,ffmpeg)
125 ("flac" ,flac)
126 ("jack" ,jack-1)
127 ("libcddb" ,libcddb)
128 ("libcdio-paranoia" ,libcdio-paranoia)
129 ("libcue" ,libcue)
130 ("libmad" ,libmad)
131 ("libmodplug" ,libmodplug)
132 ("libmpcdec" ,libmpcdec)
133 ("libsamplerate" ,libsamplerate)
134 ("libvorbis" ,libvorbis)
135 ("ncurses" ,ncurses)
136 ("opusfile" ,opusfile)
137 ("pulseaudio" ,pulseaudio)
138 ("wavpack" ,wavpack)))
139 (home-page "https://cmus.github.io/")
140 (synopsis "Small console music player")
141 (description "Cmus is a small and fast console music player. It supports
142many input formats and provides a customisable Vi-style user interface.")
143 (license license:gpl2+)))
144
d231bb35
RW
145(define-public hydrogen
146 (package
147 (name "hydrogen")
148 (version "0.9.5.1")
149 (source (origin
150 (method url-fetch)
151 (uri (string-append
152 "mirror://sourceforge/hydrogen/Hydrogen/"
153 (version-prefix version 3) "%20Sources/"
154 "hydrogen-" version ".tar.gz"))
155 (sha256
156 (base32
157 "1fvyp6gfzcqcc90dmaqbm11p272zczz5pfz1z4lj33nfr7z0bqgb"))))
158 (build-system gnu-build-system)
159 (arguments
160 `(#:tests? #f ;no "check" target
161 #:phases
162 ;; TODO: Add scons-build-system and use it here.
163 (modify-phases %standard-phases
164 (delete 'configure)
165 (add-after 'unpack 'scons-propagate-environment
166 (lambda _
167 ;; By design, SCons does not, by default, propagate
168 ;; environment variables to subprocesses. See:
169 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
170 ;; Here, we modify the Sconstruct file to arrange for
171 ;; environment variables to be propagated.
172 (substitute* "Sconstruct"
173 (("^env = Environment\\(")
174 "env = Environment(ENV=os.environ, "))))
175 (replace 'build
176 (lambda* (#:key inputs outputs #:allow-other-keys)
177 (let ((out (assoc-ref outputs "out")))
178 (zero? (system* "scons"
179 (string-append "prefix=" out)
180 "lrdf=0" ; cannot be found
181 "lash=1")))))
182 (add-before
183 'install
184 'fix-img-install
185 (lambda _
186 ;; The whole ./data/img directory is copied to the target first.
187 ;; Scons complains about existing files when we try to install all
188 ;; images a second time.
189 (substitute* "Sconstruct"
190 (("os.path.walk\\(\"./data/img/\",install_images,env\\)") ""))
191 #t))
192 (replace 'install (lambda _ (zero? (system* "scons" "install")))))))
193 (native-inputs
194 `(("scons" ,scons)
195 ("python" ,python-2)
196 ("pkg-config" ,pkg-config)))
197 (inputs
198 `(("zlib" ,zlib)
199 ("libtar" ,libtar)
200 ("alsa-lib" ,alsa-lib)
201 ("jack" ,jack-1)
202 ("lash" ,lash)
203 ;;("lrdf" ,lrdf) ;FIXME: cannot be found by scons
204 ("qt" ,qt-4)
205 ("libsndfile" ,libsndfile)))
206 (home-page "http://www.hydrogen-music.org")
207 (synopsis "Drum machine")
208 (description
209 "Hydrogen is an advanced drum machine for GNU/Linux. Its main goal is to
210enable professional yet simple and intuitive pattern-based drum programming.")
211 (license license:gpl2+)))
212
8c454dcd
RW
213(define-public klick
214 (package
215 (name "klick")
216 (version "0.12.2")
217 (source (origin
218 (method url-fetch)
219 (uri (string-append "http://das.nasophon.de/download/klick-"
220 version ".tar.gz"))
221 (sha256
222 (base32
223 "0hmcaywnwzjci3pp4xpvbijnnwvibz7gf9xzcdjbdca910y5728j"))))
224 (build-system gnu-build-system)
225 (arguments
226 `(#:tests? #f ;no "check" target
227 #:phases
228 ;; TODO: Add scons-build-system and use it here.
229 (modify-phases %standard-phases
230 (delete 'configure)
231 (replace 'build
232 (lambda* (#:key inputs outputs #:allow-other-keys)
233 (let ((out (assoc-ref outputs "out")))
234 (mkdir-p out)
235 (zero? (system* "scons" (string-append "PREFIX=" out))))))
236 (replace 'install (lambda _ (zero? (system* "scons" "install")))))))
237 (inputs
238 `(("boost" ,boost)
239 ("jack" ,jack-1)
240 ("libsndfile" ,libsndfile)
241 ("libsamplerate" ,libsamplerate)
242 ("liblo" ,liblo)
243 ("rubberband" ,rubberband)))
244 (native-inputs
245 `(("scons" ,scons)
246 ("python" ,python-2)
247 ("pkg-config" ,pkg-config)))
248 (home-page "http://das.nasophon.de/klick/")
249 (synopsis "Metronome for JACK")
250 (description
251 "klick is an advanced command-line based metronome for JACK. It allows
252you to define complex tempo maps for entire songs or performances.")
253 (license license:gpl2+)))
254
1b6826d3
RW
255(define-public lilypond
256 (package
257 (name "lilypond")
398abcf8 258 (version "2.19.33")
1b6826d3
RW
259 (source (origin
260 (method url-fetch)
261 (uri (string-append
262 "http://download.linuxaudio.org/lilypond/sources/v"
263 (version-major+minor version) "/"
264 name "-" version ".tar.gz"))
265 (sha256
266 (base32
398abcf8 267 "0s4vbbfy4xwq4da4kmlnndalmcyx2jaz7y8praah2146qbnr90xh"))))
1b6826d3
RW
268 (build-system gnu-build-system)
269 (arguments
127b04d7 270 `(#:tests? #f ; out-test/collated-files.html fails
1b6826d3 271 #:out-of-source? #t
409be57b 272 #:make-flags '("conf=www") ;to generate images for info manuals
127b04d7 273 #:configure-flags
409be57b
RW
274 (list "CONFIGURATION=www"
275 (string-append "--with-texgyre-dir="
127b04d7
RW
276 (assoc-ref %build-inputs "font-tex-gyre")
277 "/share/fonts/opentype/"))
1b6826d3 278 #:phases
a8bc747a 279 (modify-phases %standard-phases
409be57b
RW
280 (add-after 'unpack 'fix-path-references
281 (lambda _
a8bc747a
RW
282 (substitute* "scm/backend-library.scm"
283 (("\\(search-executable '\\(\"gs\"\\)\\)")
409be57b
RW
284 (string-append "\"" (which "gs") "\""))
285 (("\"/bin/sh\"")
286 (string-append "\"" (which "sh") "\"")))
a8bc747a
RW
287 #t))
288 (add-before 'configure 'prepare-configuration
289 (lambda _
290 (substitute* "configure"
291 (("SHELL=/bin/sh") "SHELL=sh"))
409be57b
RW
292 (setenv "out" "www")
293 (setenv "conf" "www")
294 #t))
295 (add-after 'install 'install-info
296 (lambda _
297 (zero? (system* "make"
298 "-j" (number->string (parallel-job-count))
299 "conf=www" "install-info")))))))
1b6826d3
RW
300 (inputs
301 `(("guile" ,guile-1.8)
302 ("font-dejavu" ,font-dejavu)
127b04d7 303 ("font-tex-gyre" ,font-tex-gyre)
1b6826d3
RW
304 ("fontconfig" ,fontconfig)
305 ("freetype" ,freetype)
306 ("ghostscript" ,ghostscript)
307 ("pango" ,pango)
308 ("python" ,python-2)))
309 (native-inputs
310 `(("bison" ,bison)
311 ("perl" ,perl)
312 ("flex" ,flex)
313 ("fontforge" ,fontforge)
314 ("dblatex" ,dblatex)
315 ("gettext" ,gnu-gettext)
316 ("imagemagick" ,imagemagick)
317 ("netpbm" ,netpbm) ;for pngtopnm
318 ("texlive" ,texlive) ;metafont and metapost
319 ("texinfo" ,texinfo)
320 ("texi2html" ,texi2html)
321 ("rsync" ,rsync)
322 ("pkg-config" ,pkg-config)
323 ("zip" ,zip)))
324 (home-page "http://www.lilypond.org/")
325 (synopsis "Music typesetting")
326 (description
327 "GNU LilyPond is a music typesetter, which produces high-quality sheet
328music. Music is input in a text file containing control sequences which are
329interpreted by LilyPond to produce the final document. It is extendable with
330Guile.")
331 (license license:gpl3+)))
c267cc15 332
8e80244a
RW
333(define-public non-sequencer
334 ;; The latest tagged release is three years old and uses a custom build
335 ;; system, so we take the last commit affecting the "sequencer" directory.
336 (let ((commit "1d9bd576"))
337 (package
338 (name "non-sequencer")
339 (version (string-append "1.9.5-" commit))
340 (source (origin
341 (method git-fetch)
342 (uri (git-reference
343 (url "git://git.tuxfamily.org/gitroot/non/non.git")
344 (commit commit)))
345 (sha256
346 (base32
347 "0pkkw8q6d55j38xm7r4rwpdv1wy00a44h8c4wrn7vbgpq9nij46y"))
348 (file-name (string-append name "-" version "-checkout"))))
349 (build-system waf-build-system)
350 (arguments
351 `(#:tests? #f ;no "check" target
e591a4d6
RW
352 #:configure-flags
353 (list "--project=sequencer"
354 ;; Disable the use of SSE unless on x86_64.
355 ,@(if (not (string-prefix? "x86_64" (or (%current-target-system)
356 (%current-system))))
357 '("--disable-sse")
358 '()))
d8c317df
SB
359 #:phases
360 (modify-phases %standard-phases
361 (add-before
362 'configure 'set-flags
363 (lambda _
364 ;; Compile with C++11, required by libsigc++.
365 (setenv "CXXFLAGS" "-std=c++11")
366 #t)))
8e80244a
RW
367 #:python ,python-2))
368 (inputs
369 `(("jack" ,jack-1)
370 ("libsigc++" ,libsigc++)
371 ("liblo" ,liblo)
372 ("ntk" ,ntk)))
373 (native-inputs
374 `(("pkg-config" ,pkg-config)))
375 (home-page "http://non.tuxfamily.org/wiki/Non%20Sequencer")
376 (synopsis "Pattern-based MIDI sequencer")
377 (description
378 "The Non Sequencer is a powerful, lightweight, real-time,
379pattern-based MIDI sequencer. It utilizes the JACK Audio Connection Kit for
380MIDI I/O and the NTK GUI toolkit for its user interface. Everything in Non
381Sequencer happens on-line, in real-time. Music can be composed live, while the
382transport is rolling.")
383 (license license:gpl2+))))
384
c267cc15
RW
385(define-public solfege
386 (package
387 (name "solfege")
388 (version "3.22.2")
389 (source (origin
390 (method url-fetch)
391 (uri (string-append
392 "mirror://gnu/solfege/solfege-"
393 version ".tar.xz"))
394 (sha256
395 (base32
396 "1w25rxdbj907nsx285k9nm480pvy12w3yknfh4n1dfv17cwy072i"))))
397 (build-system gnu-build-system)
398 (arguments
399 `(#:tests? #f ; xmllint attempts to download DTD
400 #:test-target "test"
401 #:phases
402 (alist-cons-after
403 'unpack 'fix-configuration
404 (lambda* (#:key inputs #:allow-other-keys)
405 (substitute* "default.config"
406 (("csound=csound")
407 (string-append "csound="
408 (assoc-ref inputs "csound")
409 "/bin/csound"))
410 (("/usr/bin/aplay")
411 (string-append (assoc-ref inputs "aplay")
412 "/bin/aplay"))
413 (("/usr/bin/timidity")
414 (string-append (assoc-ref inputs "timidity")
415 "/bin/timidity"))
416 (("/usr/bin/mpg123")
417 (string-append (assoc-ref inputs "mpg123")
418 "/bin/mpg123"))
419 (("/usr/bin/ogg123")
420 (string-append (assoc-ref inputs "ogg123")
421 "/bin/ogg123"))))
422 (alist-cons-before
423 'build 'patch-python-shebangs
424 (lambda _
425 ;; Two python scripts begin with a Unicode BOM, so patch-shebang
426 ;; has no effect.
427 (substitute* '("solfege/parsetree.py"
428 "solfege/presetup.py")
429 (("#!/usr/bin/python") (string-append "#!" (which "python")))))
430 (alist-cons-before
431 'build 'add-sitedirs
432 ;; .pth files are not automatically interpreted unless the
433 ;; directories containing them are added as "sites". The directories
434 ;; are then added to those in the PYTHONPATH. This is required for
435 ;; the operation of pygtk and pygobject.
436 (lambda _
437 (substitute* "run-solfege.py"
438 (("import os")
439 "import os, site
440for path in [path for path in sys.path if 'site-packages' in path]: site.addsitedir(path)")))
441 (alist-cons-before
442 'build 'adjust-config-file-prefix
443 (lambda* (#:key outputs #:allow-other-keys)
444 (substitute* "run-solfege.py"
445 (("prefix = os.path.*$")
446 (string-append "prefix = " (assoc-ref outputs "out")))))
447 (alist-cons-after
448 'install 'wrap-program
449 (lambda* (#:key inputs outputs #:allow-other-keys)
450 ;; Make sure 'solfege' runs with the correct PYTHONPATH. We
451 ;; also need to modify GDK_PIXBUF_MODULE_FILE for SVG support.
452 (let* ((out (assoc-ref outputs "out"))
453 (path (getenv "PYTHONPATH"))
454 (rsvg (assoc-ref inputs "librsvg"))
455 (pixbuf (find-files rsvg "^loaders\\.cache$")))
456 (wrap-program (string-append out "/bin/solfege")
457 `("PYTHONPATH" ":" prefix (,path))
458 `("GDK_PIXBUF_MODULE_FILE" ":" prefix ,pixbuf))))
459 %standard-phases)))))))
460 (inputs
461 `(("python" ,python-2)
462 ("pygtk" ,python2-pygtk)
463 ("gettext" ,gnu-gettext)
464 ("gtk" ,gtk+)
465 ;; TODO: Lilypond is optional. Produces errors at build time:
466 ;; Drawing systems...Error: /undefinedresult in --glyphshow--
467 ;; Fontconfig is needed to fix one of the errors, but other similar
468 ;; errors remain.
469 ;;("lilypond" ,lilypond)
470 ("librsvg" ,librsvg) ; needed at runtime for icons
471 ("libpng" ,libpng) ; needed at runtime for icons
472 ;; players needed at runtime
473 ("aplay" ,alsa-utils)
474 ("csound" ,csound) ; optional, needed for some exercises
475 ("mpg123" ,mpg123)
476 ("ogg123" ,vorbis-tools)
477 ("timidity" ,timidity++)))
478 (native-inputs
479 `(("pkg-config" ,pkg-config)
480 ("txt2man" ,txt2man)
481 ("libxml2" ,libxml2) ; for tests
482 ("ghostscript" ,ghostscript)
483 ;;("fontconfig" ,fontconfig) ; only needed with lilypond
484 ;;("freetype" ,freetype) ; only needed with lilypond
485 ("texinfo" ,texinfo)))
486 (home-page "https://www.gnu.org/software/solfege/")
487 (synopsis "Ear training")
488 (description
489 "GNU Solfege is a program for practicing musical ear-training. With it,
490you can practice your recognition of various musical intervals and chords. It
491features a statistics overview so you can monitor your progress across several
492sessions. Solfege is also designed to be extensible so you can easily write
493your own lessons.")
494 (license license:gpl3+)))
6260d1a8 495
8b9ec354
RW
496(define-public powertabeditor
497 (package
498 (name "powertabeditor")
d19cf783 499 (version "2.0.0-alpha8")
8b9ec354
RW
500 (source (origin
501 (method url-fetch)
502 (uri (string-append
503 "https://github.com/powertab/powertabeditor/archive/"
504 version ".tar.gz"))
505 (file-name (string-append name "-" version ".tar.gz"))
506 (sha256
507 (base32
d19cf783 508 "0gaa2x209v3azql8ak3r1n9a9qbxjx2ssirvwdxwklv2lmfqkm82"))
8b9ec354
RW
509 (modules '((guix build utils)))
510 (snippet
511 '(begin
512 ;; Remove bundled sources for external libraries
513 (delete-file-recursively "external")
514 (substitute* "CMakeLists.txt"
515 (("include_directories\\(\\$\\{PROJECT_SOURCE_DIR\\}/external/.*") "")
8b9ec354
RW
516 (("add_subdirectory\\(external\\)") ""))
517 (substitute* "test/CMakeLists.txt"
518 (("include_directories\\(\\$\\{PROJECT_SOURCE_DIR\\}/external/.*") ""))
519
520 ;; Add install target
521 (substitute* "source/CMakeLists.txt"
522 (("qt5_use_modules")
523 (string-append
524 "install(TARGETS powertabeditor "
525 "RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)\n"
526 "install(FILES data/tunings.json DESTINATION "
527 "${CMAKE_INSTALL_PREFIX}/share/powertabeditor/)\n"
528 "qt5_use_modules")))
529 #t))))
530 (build-system cmake-build-system)
531 (arguments
7e11d113 532 `(#:modules ((guix build cmake-build-system)
8b9ec354
RW
533 (guix build utils)
534 (ice-9 match))
535 #:configure-flags
536 ;; CMake appears to lose the RUNPATH for some reason, so it has to be
537 ;; explicitly set with CMAKE_INSTALL_RPATH.
7e11d113
RW
538 (list "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
539 "-DCMAKE_ENABLE_PRECOMPILED_HEADERS=OFF" ; if ON pte_tests cannot be built
540 (string-append "-DCMAKE_INSTALL_RPATH="
8b9ec354
RW
541 (string-join (map (match-lambda
542 ((name . directory)
543 (string-append directory "/lib")))
544 %build-inputs) ";")))
545 #:phases
546 (modify-phases %standard-phases
7e11d113
RW
547 (replace
548 'check
549 (lambda _
550 (zero? (system* "bin/pte_tests"
551 ;; Exclude this failing test
552 "~Formats/PowerTabOldImport/Directions"))))
553 (add-before
554 'configure 'fix-tests
555 (lambda _
556 ;; Tests cannot be built with precompiled headers
557 (substitute* "test/CMakeLists.txt"
558 (("cotire\\(pte_tests\\)") ""))
559 #t))
8b9ec354
RW
560 (add-before
561 'configure 'remove-third-party-libs
562 (lambda* (#:key inputs #:allow-other-keys)
563 ;; Link with required static libraries, because we're not
564 ;; using the bundled version of withershins.
565 (substitute* '("source/CMakeLists.txt"
566 "test/CMakeLists.txt")
7e11d113 567 (("target_link_libraries\\((powertabeditor|pte_tests)" _ target)
8b9ec354
RW
568 (string-append "target_link_libraries(" target " "
569 (assoc-ref inputs "binutils")
570 "/lib/libbfd.a "
d6902798 571 (assoc-ref inputs "libiberty")
8b9ec354
RW
572 "/lib/libiberty.a "
573 "dl")))
574 #t)))))
575 (inputs
576 `(("boost" ,boost)
577 ("alsa-lib" ,alsa-lib)
578 ("qt" ,qt)
579 ("withershins" ,withershins)
d6902798 580 ("libiberty" ,libiberty) ;for withershins
8b9ec354
RW
581 ("binutils" ,binutils) ;for -lbfd and -liberty (for withershins)
582 ("timidity" ,timidity++)
583 ("pugixml" ,pugixml)
584 ("rtmidi" ,rtmidi)
585 ("rapidjson" ,rapidjson)
586 ("zlib" ,zlib)))
587 (native-inputs
588 `(("catch" ,catch-framework)
589 ("pkg-config" ,pkg-config)))
590 (home-page "http://powertabs.net")
591 (synopsis "Guitar tablature editor")
592 (description
593 "Power Tab Editor 2.0 is the successor to the famous original Power Tab
594Editor. It is compatible with Power Tab Editor 1.7 and Guitar Pro.")
595 (license license:gpl3+)))
596
ec8da0e2
RW
597(define-public setbfree
598 (package
599 (name "setbfree")
600 (version "0.8.0")
601 (source (origin
602 (method url-fetch)
603 (uri
604 (string-append
605 "https://github.com/pantherb/setBfree/releases/download/v"
606 version "/setbfree-" version ".tar.gz"))
607 (sha256
608 (base32
609 "045bgp7qsigpbrhk7qvgvliwiy26sajifwn7f2jvk90ckfqnlw4b"))))
610 (build-system gnu-build-system)
611 (arguments
612 `(#:tests? #f ; no "check" target
613 #:make-flags
614 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
615 (string-append "FONTFILE="
616 (assoc-ref %build-inputs "font-bitstream-vera")
b42d4508
RW
617 "/share/fonts/truetype/VeraBd.ttf")
618 ;; Disable unsupported optimization flags on non-x86
619 ,@(let ((system (or (%current-target-system)
620 (%current-system))))
621 (if (or (string-prefix? "x86_64" system)
622 (string-prefix? "i686" system))
623 '()
624 '("OPTIMIZATIONS=-ffast-math -fomit-frame-pointer -O3"))))
ec8da0e2
RW
625 #:phases
626 (modify-phases %standard-phases
627 (add-before 'build 'set-CC-variable
628 (lambda _ (setenv "CC" "gcc") #t))
629 (delete 'configure))))
630 (inputs
631 `(("jack" ,jack-1)
632 ("lv2" ,lv2)
633 ("zita-convolver" ,zita-convolver)
634 ("glu" ,glu)
635 ("ftgl" ,ftgl)
636 ("font-bitstream-vera" ,font-bitstream-vera)))
637 (native-inputs
638 `(("help2man" ,help2man)
639 ("pkg-config" ,pkg-config)))
640 (home-page "http://setbfree.org")
641 (synopsis "Tonewheel organ")
642 (description
643 "setBfree is a MIDI-controlled, software synthesizer designed to imitate
644the sound and properties of the electromechanical organs and sound
645modification devices that brought world-wide fame to the names and products of
646Laurens Hammond and Don Leslie.")
647 (license license:gpl2+)))
648
96250294
RW
649(define-public bristol
650 (package
651 (name "bristol")
652 (version "0.60.11")
653 (source (origin
654 (method url-fetch)
655 (uri (string-append "mirror://sourceforge/bristol/bristol/"
656 (version-major+minor version)
657 "/bristol-" version ".tar.gz"))
658 (sha256
659 (base32
660 "1fi2m4gmvxdi260821y09lxsimq82yv4k5bbgk3kyc3x1nyhn7vx"))))
661 (build-system gnu-build-system)
662 (inputs
663 `(("alsa-lib" ,alsa-lib)
664 ("jack" ,jack-1)
665 ("liblo" ,liblo)
666 ("libx11" ,libx11)))
667 (native-inputs
668 `(("pkg-config" ,pkg-config)))
669 (home-page "http://bristol.sourceforge.net/")
670 (synopsis "Synthesizer emulator")
671 (description
672 "Bristol is an emulation package for a number of different 'classic'
673synthesizers including additive and subtractive and a few organs. The
674application consists of the engine, which is called bristol, and its own GUI
675library called brighton that represents all the emulations. There are
676currently more than twenty different emulations; each does sound different
677although the author maintains that the quality and accuracy of each emulation
678is subjective.")
679 (license license:gpl3+)))
680
6260d1a8
RW
681(define-public tuxguitar
682 (package
683 (name "tuxguitar")
684 (version "1.2")
685 (source (origin
686 (method url-fetch)
687 (uri (string-append
688 "mirror://sourceforge/tuxguitar/TuxGuitar/TuxGuitar-"
689 version "/tuxguitar-src-" version ".tar.gz"))
690 (sha256
691 (base32
692 "1g1yf2gd06fzdhqb8kb8dmdcmr602s9y24f01kyl4940wimgr944"))))
693 (build-system gnu-build-system)
694 (arguments
695 `(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
696 (assoc-ref %outputs "out") "/lib")
697 (string-append "PREFIX="
698 (assoc-ref %outputs "out"))
699 (string-append "SWT_PATH="
700 (assoc-ref %build-inputs "swt")
701 "/share/java/swt.jar"))
702 #:tests? #f ;no "check" target
703 #:parallel-build? #f ;not supported
704 #:phases
5f1c9498
RW
705 (modify-phases %standard-phases
706 (delete 'configure)
707 (add-before 'build 'enter-dir-and-set-flags
708 (lambda* (#:key inputs #:allow-other-keys)
709 (chdir "TuxGuitar")
710 (substitute* "GNUmakefile"
6da2e99e
RW
711 (("GCJFLAGS\\+=(.*)" _ rest)
712 (string-append "GCJFLAGS=-fsource=1.4 -fPIC " rest))
5f1c9498
RW
713 (("PROPERTIES\\?=")
714 (string-append "PROPERTIES?= -Dswt.library.path="
715 (assoc-ref inputs "swt") "/lib"))
716 (("\\$\\(GCJ\\) -o") "$(GCJ) $(LDFLAGS) -o"))
717 #t)))))
6260d1a8
RW
718 (inputs
719 `(("swt" ,swt)))
720 (native-inputs
397dbde8 721 `(("gcj" ,gcj)
6260d1a8
RW
722 ("pkg-config" ,pkg-config)))
723 (home-page "http://tuxguitar.com.ar")
724 (synopsis "Multitrack tablature editor and player")
725 (description
726 "TuxGuitar is a guitar tablature editor with player support through midi.
727It can display scores and multitrack tabs. TuxGuitar provides various
728additional features, including autoscrolling while playing, note duration
729management, bend/slide/vibrato/hammer-on/pull-off effects, support for
730tuplets, time signature management, tempo management, gp3/gp4/gp5 import and
731export.")
732 (license license:lgpl2.1+)))
2d0fd07b
RW
733
734(define-public pd
735 (package
736 (name "pd")
737 (version "0.45.4")
738 (source (origin
739 (method url-fetch)
740 (uri
741 (string-append "mirror://sourceforge/pure-data/pure-data/"
742 version "/pd-" (version-major+minor version)
743 "-" (last (string-split version #\.))
744 ".src.tar.gz"))
745 (sha256
746 (base32
747 "1ls2ap5yi2zxvmr247621g4jx0hhfds4j5704a050bn2n3l0va2p"))))
748 (build-system gnu-build-system)
749 (arguments
750 `(#:tests? #f ; no "check" target
751 #:phases
752 (modify-phases %standard-phases
753 (add-before
754 'configure 'fix-wish-path
755 (lambda _
756 (substitute* "src/s_inter.c"
757 ((" wish ") (string-append " " (which "wish8.6") " ")))
758 (substitute* "tcl/pd-gui.tcl"
759 (("exec wish ") (string-append "exec " (which "wish8.6") " ")))
760 #t))
761 (add-after
762 'unpack 'autoconf
763 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
764 (native-inputs
765 `(("autoconf" ,autoconf)
766 ("automake" ,automake)
767 ("libtool" ,libtool)
768 ("gettext" ,gnu-gettext)
769 ("pkg-config" ,pkg-config)))
770 (inputs
771 `(("tk" ,tk)
772 ("alsa-lib" ,alsa-lib)
773 ("jack" ,jack-1)))
774 (home-page "http://puredata.info")
775 (synopsis "Visual programming language for artistic performances")
776 (description
777 "Pure Data (aka Pd) is a visual programming language. Pd enables
778musicians, visual artists, performers, researchers, and developers to create
779software graphically, without writing lines of code. Pd is used to process
780and generate sound, video, 2D/3D graphics, and interface sensors, input
781devices, and MIDI. Pd can easily work over local and remote networks to
782integrate wearable technology, motor systems, lighting rigs, and other
783equipment. Pd is suitable for learning basic multimedia processing and visual
784programming methods as well as for realizing complex systems for large-scale
785projects.")
786 (license license:bsd-3)))
821664f1
RW
787
788(define-public frescobaldi
789 (package
790 (name "frescobaldi")
791 (version "2.18.1")
792 (source (origin
793 (method url-fetch)
794 (uri (string-append
795 "https://github.com/wbsoft/frescobaldi/releases/download/v"
796 version "/frescobaldi-" version ".tar.gz"))
797 (sha256
798 (base32
799 "1hflc6gck6dn17czc2ldai5j0ynfg3df8lqcggdry06qxsdbnns7"))))
800 (build-system python-build-system)
801 (inputs
802 `(("lilypond" ,lilypond)
803 ("python-pyqt-4" ,python-pyqt-4)
804 ("python-ly" ,python-ly)
805 ("poppler" ,poppler)
806 ("python-poppler-qt4" ,python-poppler-qt4)
807 ("python-sip" ,python-sip)))
808 (home-page "http://www.frescobaldi.org/")
809 (synopsis "LilyPond sheet music text editor")
810 (description
811 "Frescobaldi is a LilyPond sheet music text editor with syntax
812highlighting and automatic completion. Among other things, it can render
813scores next to the source, can capture input from MIDI or read MusicXML and
814ABC files, has a MIDI player for proof-listening, and includes a documentation
815browser.")
816 (license license:gpl2+)))
ddfddb0c 817
bf76d780
RW
818(define-public drumstick
819 (package
820 (name "drumstick")
cfac1272 821 (version "1.0.2")
bf76d780
RW
822 (source (origin
823 (method url-fetch)
824 (uri (string-append "mirror://sourceforge/drumstick/"
825 version "/drumstick-" version ".tar.bz2"))
826 (sha256
827 (base32
cfac1272 828 "0l47gy9yywrc860db5g3wdqg8yc8qdb2lqq6wvw1dfim5j0vbail"))))
bf76d780
RW
829 (build-system cmake-build-system)
830 (arguments
831 `(#:tests? #f ; no test target
832 #:configure-flags '("-DLIB_SUFFIX=")
833 #:phases
834 (modify-phases %standard-phases
835 (add-before 'configure 'fix-docbook
836 (lambda* (#:key inputs #:allow-other-keys)
837 (substitute* "cmake_admin/CreateManpages.cmake"
838 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
839 (string-append (assoc-ref inputs "docbook-xsl")
840 "/xml/xsl/docbook-xsl-"
841 ,(package-version docbook-xsl)
842 "/manpages/docbook.xsl")))
843 #t)))))
844 (inputs
845 `(("qt" ,qt)
846 ("alsa-lib" ,alsa-lib)
847 ("fluidsynth" ,fluidsynth)))
848 (native-inputs
849 `(("pkg-config" ,pkg-config)
850 ("libxslt" ,libxslt) ;for xsltproc
851 ("docbook-xsl" ,docbook-xsl)
852 ("doxygen" ,doxygen)))
853 (home-page "http://drumstick.sourceforge.net/")
854 (synopsis "C++ MIDI library")
855 (description
856 "Drumstick is a set of MIDI libraries using C++/Qt5 idioms and style. It
857includes a C++ wrapper around the ALSA library sequencer interface. A
858complementary library provides classes for processing SMF (Standard MIDI
859files: .MID/.KAR), Cakewalk (.WRK), and Overture (.OVE) file formats. A
860multiplatform realtime MIDI I/O library is also provided with various output
861backends, including ALSA, OSS, Network and FluidSynth.")
862 (license license:gpl2+)))
863
8e92cfb1
RW
864(define-public vmpk
865 (package
866 (name "vmpk")
fb492b9a 867 (version "0.6.2a")
8e92cfb1
RW
868 (source (origin
869 (method url-fetch)
870 (uri (string-append "mirror://sourceforge/vmpk/vmpk/"
fb492b9a
RW
871 (string-drop-right version 1)
872 "/vmpk-" version ".tar.bz2"))
8e92cfb1
RW
873 (sha256
874 (base32
fb492b9a 875 "0259iikvxnfdiifrh02g8xgcxikrkca4nhd3an8xzx0bd6bk8ifi"))))
8e92cfb1
RW
876 (build-system cmake-build-system)
877 (arguments
878 `(#:tests? #f ; no test target
879 #:phases
880 (modify-phases %standard-phases
881 (add-before 'configure 'fix-docbook
882 (lambda* (#:key inputs #:allow-other-keys)
883 (substitute* "cmake_admin/CreateManpages.cmake"
884 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
885 (string-append (assoc-ref inputs "docbook-xsl")
886 "/xml/xsl/docbook-xsl-"
887 ,(package-version docbook-xsl)
888 "/manpages/docbook.xsl")))
889 #t)))))
890 (inputs
891 `(("drumstick" ,drumstick)
892 ("qt" ,qt)))
893 (native-inputs
894 `(("libxslt" ,libxslt) ;for xsltproc
895 ("docbook-xsl" ,docbook-xsl)
896 ("pkg-config" ,pkg-config)))
897 (home-page "http://vmpk.sourceforge.net")
898 (synopsis "Virtual MIDI piano keyboard")
899 (description
900 "Virtual MIDI Piano Keyboard is a MIDI events generator and receiver. It
901doesn't produce any sound by itself, but can be used to drive a MIDI
902synthesizer (either hardware or software, internal or external). You can use
903the computer's keyboard to play MIDI notes, and also the mouse. You can use
904the Virtual MIDI Piano Keyboard to display the played MIDI notes from another
905instrument or MIDI file player.")
906 (license license:gpl3+)))
907
ddfddb0c
RW
908(define-public zynaddsubfx
909 (package
910 (name "zynaddsubfx")
f836fb8d 911 (version "2.5.2")
ddfddb0c
RW
912 (source (origin
913 (method url-fetch)
914 (uri (string-append
915 "mirror://sourceforge/zynaddsubfx/zynaddsubfx/"
916 version "/zynaddsubfx-" version ".tar.gz"))
917 (sha256
918 (base32
f836fb8d 919 "11yrady7xwfrzszkk2fvq81ymv99mq474h60qnirk27khdygk24m"))))
ddfddb0c 920 (build-system cmake-build-system)
00dfc97c
RW
921 (arguments
922 `(#:phases
923 (modify-phases %standard-phases
924 ;; Move SSE compiler optimization flags from generic target to
925 ;; athlon64 and core2 targets, because otherwise the build would fail
926 ;; on non-Intel machines.
927 (add-after 'unpack 'remove-sse-flags-from-generic-target
928 (lambda _
929 (substitute* "src/CMakeLists.txt"
930 (("-msse -msse2 -mfpmath=sse") "")
931 (("-march=(athlon64|core2)" flag)
932 (string-append flag " -msse -msse2 -mfpmath=sse")))
933 #t)))))
ddfddb0c
RW
934 (inputs
935 `(("liblo" ,liblo)
936 ("ntk" ,ntk)
937 ("alsa-lib" ,alsa-lib)
938 ("jack" ,jack-1)
939 ("fftw" ,fftw)
940 ("minixml" ,minixml)
941 ("libxpm" ,libxpm)
942 ("zlib" ,zlib)))
943 (native-inputs
944 `(("pkg-config" ,pkg-config)))
945 (home-page "http://zynaddsubfx.sf.net/")
946 (synopsis "Software synthesizer")
947 (description
948 "ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
949three synthesizer engines, multitimbral and polyphonic synths, microtonal
950capabilities, custom envelopes, effects, etc.")
951 (license license:gpl2)))
c493679f
RW
952
953(define-public yoshimi
954 (package
955 (name "yoshimi")
956 (version "1.3.7.1")
957 (source (origin
958 (method url-fetch)
959 (uri (string-append "mirror://sourceforge/yoshimi/"
960 (version-major+minor version)
961 "/yoshimi-" version ".tar.bz2"))
962 (sha256
963 (base32
964 "13xc1x8jrr2rn26jx4dini692ww3771d5j5xf7f56ixqr7mmdhvz"))))
965 (build-system cmake-build-system)
966 (arguments
967 `(#:tests? #f ; there are no tests
968 #:configure-flags
969 (list (string-append "-DCMAKE_INSTALL_DATAROOTDIR="
970 (assoc-ref %outputs "out") "/share"))
971 #:phases
972 (modify-phases %standard-phases
973 (add-before 'configure 'enter-dir
974 (lambda _ (chdir "src") #t))
975 ;; Move SSE compiler optimization flags from generic target to
976 ;; athlon64 and core2 targets, because otherwise the build would fail
977 ;; on non-Intel machines.
978 (add-after 'unpack 'remove-sse-flags-from-generic-target
979 (lambda _
980 (substitute* "src/CMakeLists.txt"
981 (("-msse -msse2 -mfpmath=sse") "")
982 (("-march=(athlon64|core2)" flag)
983 (string-append flag " -msse -msse2 -mfpmath=sse")))
984 #t)))))
985 (inputs
986 `(("boost" ,boost)
987 ("fftwf" ,fftwf)
988 ("alsa-lib" ,alsa-lib)
989 ("jack" ,jack-1)
990 ("fontconfig" ,fontconfig)
991 ("minixml" ,minixml)
992 ("mesa" ,mesa)
993 ("fltk" ,fltk)
994 ("lv2" ,lv2)
995 ("readline" ,readline)
996 ("ncurses" ,ncurses)
997 ("cairo" ,cairo)
998 ("zlib" ,zlib)))
999 (native-inputs
1000 `(("pkg-config" ,pkg-config)))
1001 (home-page "http://yoshimi.sourceforge.net/")
1002 (synopsis "Multi-paradigm software synthesizer")
1003 (description
1004 "Yoshimi is a fork of ZynAddSubFX, a feature heavy realtime software
1005synthesizer. It offers three synthesizer engines, multitimbral and polyphonic
1006synths, microtonal capabilities, custom envelopes, effects, etc. Yoshimi
1007improves on support for JACK features, such as JACK MIDI.")
1008 (license license:gpl2)))
658212eb
LF
1009
1010(define-public cursynth
1011 (package
1012 (name "cursynth")
1013 (version "1.5")
1014 (source
1015 (origin
1016 (method url-fetch)
1017 (uri (string-append "mirror://gnu/cursynth/cursynth-"
1018 version ".tar.gz"))
1019 (sha256
1020 (base32 "1dhphsya41rv8z6yqcv9l6fwbslsds4zh1y56zizi39nd996d40v"))
1021 (patches (list (search-patch "cursynth-wave-rand.patch")))))
1022 (build-system gnu-build-system)
1023 (native-inputs `(("pkg-config" ,pkg-config)))
1024 ;; TODO: See https://github.com/iyoko/cursynth/issues/4 which currently
1025 ;; prevents us from using pulseaudio
1026 (inputs `(("ncurses" ,ncurses)
1027 ("alsa" ,alsa-lib)))
1028 (home-page "http://www.gnu.org/software/cursynth")
1029 (synopsis "Polyphonic and MIDI subtractive music synthesizer using curses")
1030 (description "GNU cursynth is a polyphonic synthesizer that runs
1031graphically in the terminal. It is built on a full-featured subtractive
1032synthesis engine. Notes and parameter changes may be entered via MIDI or the
1033computer's keyboard.")
1034 (license license:gpl3+)))