gnu: bristol: Remove SSE flags on platforms other than x86_64 and i686.
[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)
18ef998b
RW
662 (arguments
663 `(#:phases
664 (modify-phases %standard-phases
665 (add-after 'unpack 'remove-sse-flags
666 (lambda* (#:key system #:allow-other-keys)
667 (when (not (or (string-prefix? "x86_64" system)
668 (string-prefix? "i686" system)))
669 (substitute* "bristol/Makefile.in"
670 (("-msse -mfpmath=sse") "")))
671 #t)))))
96250294
RW
672 (inputs
673 `(("alsa-lib" ,alsa-lib)
674 ("jack" ,jack-1)
675 ("liblo" ,liblo)
676 ("libx11" ,libx11)))
677 (native-inputs
678 `(("pkg-config" ,pkg-config)))
679 (home-page "http://bristol.sourceforge.net/")
680 (synopsis "Synthesizer emulator")
681 (description
682 "Bristol is an emulation package for a number of different 'classic'
683synthesizers including additive and subtractive and a few organs. The
684application consists of the engine, which is called bristol, and its own GUI
685library called brighton that represents all the emulations. There are
686currently more than twenty different emulations; each does sound different
687although the author maintains that the quality and accuracy of each emulation
688is subjective.")
689 (license license:gpl3+)))
690
6260d1a8
RW
691(define-public tuxguitar
692 (package
693 (name "tuxguitar")
694 (version "1.2")
695 (source (origin
696 (method url-fetch)
697 (uri (string-append
698 "mirror://sourceforge/tuxguitar/TuxGuitar/TuxGuitar-"
699 version "/tuxguitar-src-" version ".tar.gz"))
700 (sha256
701 (base32
702 "1g1yf2gd06fzdhqb8kb8dmdcmr602s9y24f01kyl4940wimgr944"))))
703 (build-system gnu-build-system)
704 (arguments
705 `(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
706 (assoc-ref %outputs "out") "/lib")
707 (string-append "PREFIX="
708 (assoc-ref %outputs "out"))
709 (string-append "SWT_PATH="
710 (assoc-ref %build-inputs "swt")
711 "/share/java/swt.jar"))
712 #:tests? #f ;no "check" target
713 #:parallel-build? #f ;not supported
714 #:phases
5f1c9498
RW
715 (modify-phases %standard-phases
716 (delete 'configure)
717 (add-before 'build 'enter-dir-and-set-flags
718 (lambda* (#:key inputs #:allow-other-keys)
719 (chdir "TuxGuitar")
720 (substitute* "GNUmakefile"
6da2e99e
RW
721 (("GCJFLAGS\\+=(.*)" _ rest)
722 (string-append "GCJFLAGS=-fsource=1.4 -fPIC " rest))
5f1c9498
RW
723 (("PROPERTIES\\?=")
724 (string-append "PROPERTIES?= -Dswt.library.path="
725 (assoc-ref inputs "swt") "/lib"))
726 (("\\$\\(GCJ\\) -o") "$(GCJ) $(LDFLAGS) -o"))
727 #t)))))
6260d1a8
RW
728 (inputs
729 `(("swt" ,swt)))
730 (native-inputs
397dbde8 731 `(("gcj" ,gcj)
6260d1a8
RW
732 ("pkg-config" ,pkg-config)))
733 (home-page "http://tuxguitar.com.ar")
734 (synopsis "Multitrack tablature editor and player")
735 (description
736 "TuxGuitar is a guitar tablature editor with player support through midi.
737It can display scores and multitrack tabs. TuxGuitar provides various
738additional features, including autoscrolling while playing, note duration
739management, bend/slide/vibrato/hammer-on/pull-off effects, support for
740tuplets, time signature management, tempo management, gp3/gp4/gp5 import and
741export.")
742 (license license:lgpl2.1+)))
2d0fd07b
RW
743
744(define-public pd
745 (package
746 (name "pd")
747 (version "0.45.4")
748 (source (origin
749 (method url-fetch)
750 (uri
751 (string-append "mirror://sourceforge/pure-data/pure-data/"
752 version "/pd-" (version-major+minor version)
753 "-" (last (string-split version #\.))
754 ".src.tar.gz"))
755 (sha256
756 (base32
757 "1ls2ap5yi2zxvmr247621g4jx0hhfds4j5704a050bn2n3l0va2p"))))
758 (build-system gnu-build-system)
759 (arguments
760 `(#:tests? #f ; no "check" target
761 #:phases
762 (modify-phases %standard-phases
763 (add-before
764 'configure 'fix-wish-path
765 (lambda _
766 (substitute* "src/s_inter.c"
767 ((" wish ") (string-append " " (which "wish8.6") " ")))
768 (substitute* "tcl/pd-gui.tcl"
769 (("exec wish ") (string-append "exec " (which "wish8.6") " ")))
770 #t))
771 (add-after
772 'unpack 'autoconf
773 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
774 (native-inputs
775 `(("autoconf" ,autoconf)
776 ("automake" ,automake)
777 ("libtool" ,libtool)
778 ("gettext" ,gnu-gettext)
779 ("pkg-config" ,pkg-config)))
780 (inputs
781 `(("tk" ,tk)
782 ("alsa-lib" ,alsa-lib)
783 ("jack" ,jack-1)))
784 (home-page "http://puredata.info")
785 (synopsis "Visual programming language for artistic performances")
786 (description
787 "Pure Data (aka Pd) is a visual programming language. Pd enables
788musicians, visual artists, performers, researchers, and developers to create
789software graphically, without writing lines of code. Pd is used to process
790and generate sound, video, 2D/3D graphics, and interface sensors, input
791devices, and MIDI. Pd can easily work over local and remote networks to
792integrate wearable technology, motor systems, lighting rigs, and other
793equipment. Pd is suitable for learning basic multimedia processing and visual
794programming methods as well as for realizing complex systems for large-scale
795projects.")
796 (license license:bsd-3)))
821664f1
RW
797
798(define-public frescobaldi
799 (package
800 (name "frescobaldi")
801 (version "2.18.1")
802 (source (origin
803 (method url-fetch)
804 (uri (string-append
805 "https://github.com/wbsoft/frescobaldi/releases/download/v"
806 version "/frescobaldi-" version ".tar.gz"))
807 (sha256
808 (base32
809 "1hflc6gck6dn17czc2ldai5j0ynfg3df8lqcggdry06qxsdbnns7"))))
810 (build-system python-build-system)
811 (inputs
812 `(("lilypond" ,lilypond)
813 ("python-pyqt-4" ,python-pyqt-4)
814 ("python-ly" ,python-ly)
815 ("poppler" ,poppler)
816 ("python-poppler-qt4" ,python-poppler-qt4)
817 ("python-sip" ,python-sip)))
818 (home-page "http://www.frescobaldi.org/")
819 (synopsis "LilyPond sheet music text editor")
820 (description
821 "Frescobaldi is a LilyPond sheet music text editor with syntax
822highlighting and automatic completion. Among other things, it can render
823scores next to the source, can capture input from MIDI or read MusicXML and
824ABC files, has a MIDI player for proof-listening, and includes a documentation
825browser.")
826 (license license:gpl2+)))
ddfddb0c 827
bf76d780
RW
828(define-public drumstick
829 (package
830 (name "drumstick")
cfac1272 831 (version "1.0.2")
bf76d780
RW
832 (source (origin
833 (method url-fetch)
834 (uri (string-append "mirror://sourceforge/drumstick/"
835 version "/drumstick-" version ".tar.bz2"))
836 (sha256
837 (base32
cfac1272 838 "0l47gy9yywrc860db5g3wdqg8yc8qdb2lqq6wvw1dfim5j0vbail"))))
bf76d780
RW
839 (build-system cmake-build-system)
840 (arguments
841 `(#:tests? #f ; no test target
842 #:configure-flags '("-DLIB_SUFFIX=")
843 #:phases
844 (modify-phases %standard-phases
845 (add-before 'configure 'fix-docbook
846 (lambda* (#:key inputs #:allow-other-keys)
847 (substitute* "cmake_admin/CreateManpages.cmake"
848 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
849 (string-append (assoc-ref inputs "docbook-xsl")
850 "/xml/xsl/docbook-xsl-"
851 ,(package-version docbook-xsl)
852 "/manpages/docbook.xsl")))
853 #t)))))
854 (inputs
855 `(("qt" ,qt)
856 ("alsa-lib" ,alsa-lib)
857 ("fluidsynth" ,fluidsynth)))
858 (native-inputs
859 `(("pkg-config" ,pkg-config)
860 ("libxslt" ,libxslt) ;for xsltproc
861 ("docbook-xsl" ,docbook-xsl)
862 ("doxygen" ,doxygen)))
863 (home-page "http://drumstick.sourceforge.net/")
864 (synopsis "C++ MIDI library")
865 (description
866 "Drumstick is a set of MIDI libraries using C++/Qt5 idioms and style. It
867includes a C++ wrapper around the ALSA library sequencer interface. A
868complementary library provides classes for processing SMF (Standard MIDI
869files: .MID/.KAR), Cakewalk (.WRK), and Overture (.OVE) file formats. A
870multiplatform realtime MIDI I/O library is also provided with various output
871backends, including ALSA, OSS, Network and FluidSynth.")
872 (license license:gpl2+)))
873
8e92cfb1
RW
874(define-public vmpk
875 (package
876 (name "vmpk")
fb492b9a 877 (version "0.6.2a")
8e92cfb1
RW
878 (source (origin
879 (method url-fetch)
880 (uri (string-append "mirror://sourceforge/vmpk/vmpk/"
fb492b9a
RW
881 (string-drop-right version 1)
882 "/vmpk-" version ".tar.bz2"))
8e92cfb1
RW
883 (sha256
884 (base32
fb492b9a 885 "0259iikvxnfdiifrh02g8xgcxikrkca4nhd3an8xzx0bd6bk8ifi"))))
8e92cfb1
RW
886 (build-system cmake-build-system)
887 (arguments
888 `(#:tests? #f ; no test target
889 #:phases
890 (modify-phases %standard-phases
891 (add-before 'configure 'fix-docbook
892 (lambda* (#:key inputs #:allow-other-keys)
893 (substitute* "cmake_admin/CreateManpages.cmake"
894 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
895 (string-append (assoc-ref inputs "docbook-xsl")
896 "/xml/xsl/docbook-xsl-"
897 ,(package-version docbook-xsl)
898 "/manpages/docbook.xsl")))
899 #t)))))
900 (inputs
901 `(("drumstick" ,drumstick)
902 ("qt" ,qt)))
903 (native-inputs
904 `(("libxslt" ,libxslt) ;for xsltproc
905 ("docbook-xsl" ,docbook-xsl)
906 ("pkg-config" ,pkg-config)))
907 (home-page "http://vmpk.sourceforge.net")
908 (synopsis "Virtual MIDI piano keyboard")
909 (description
910 "Virtual MIDI Piano Keyboard is a MIDI events generator and receiver. It
911doesn't produce any sound by itself, but can be used to drive a MIDI
912synthesizer (either hardware or software, internal or external). You can use
913the computer's keyboard to play MIDI notes, and also the mouse. You can use
914the Virtual MIDI Piano Keyboard to display the played MIDI notes from another
915instrument or MIDI file player.")
916 (license license:gpl3+)))
917
ddfddb0c
RW
918(define-public zynaddsubfx
919 (package
920 (name "zynaddsubfx")
f836fb8d 921 (version "2.5.2")
ddfddb0c
RW
922 (source (origin
923 (method url-fetch)
924 (uri (string-append
925 "mirror://sourceforge/zynaddsubfx/zynaddsubfx/"
926 version "/zynaddsubfx-" version ".tar.gz"))
927 (sha256
928 (base32
f836fb8d 929 "11yrady7xwfrzszkk2fvq81ymv99mq474h60qnirk27khdygk24m"))))
ddfddb0c 930 (build-system cmake-build-system)
00dfc97c
RW
931 (arguments
932 `(#:phases
933 (modify-phases %standard-phases
934 ;; Move SSE compiler optimization flags from generic target to
935 ;; athlon64 and core2 targets, because otherwise the build would fail
936 ;; on non-Intel machines.
937 (add-after 'unpack 'remove-sse-flags-from-generic-target
938 (lambda _
939 (substitute* "src/CMakeLists.txt"
940 (("-msse -msse2 -mfpmath=sse") "")
941 (("-march=(athlon64|core2)" flag)
942 (string-append flag " -msse -msse2 -mfpmath=sse")))
943 #t)))))
ddfddb0c
RW
944 (inputs
945 `(("liblo" ,liblo)
946 ("ntk" ,ntk)
947 ("alsa-lib" ,alsa-lib)
948 ("jack" ,jack-1)
949 ("fftw" ,fftw)
950 ("minixml" ,minixml)
951 ("libxpm" ,libxpm)
952 ("zlib" ,zlib)))
953 (native-inputs
954 `(("pkg-config" ,pkg-config)))
955 (home-page "http://zynaddsubfx.sf.net/")
956 (synopsis "Software synthesizer")
957 (description
958 "ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
959three synthesizer engines, multitimbral and polyphonic synths, microtonal
960capabilities, custom envelopes, effects, etc.")
961 (license license:gpl2)))
c493679f
RW
962
963(define-public yoshimi
964 (package
965 (name "yoshimi")
966 (version "1.3.7.1")
967 (source (origin
968 (method url-fetch)
969 (uri (string-append "mirror://sourceforge/yoshimi/"
970 (version-major+minor version)
971 "/yoshimi-" version ".tar.bz2"))
972 (sha256
973 (base32
974 "13xc1x8jrr2rn26jx4dini692ww3771d5j5xf7f56ixqr7mmdhvz"))))
975 (build-system cmake-build-system)
976 (arguments
977 `(#:tests? #f ; there are no tests
978 #:configure-flags
979 (list (string-append "-DCMAKE_INSTALL_DATAROOTDIR="
980 (assoc-ref %outputs "out") "/share"))
981 #:phases
982 (modify-phases %standard-phases
983 (add-before 'configure 'enter-dir
984 (lambda _ (chdir "src") #t))
985 ;; Move SSE compiler optimization flags from generic target to
986 ;; athlon64 and core2 targets, because otherwise the build would fail
987 ;; on non-Intel machines.
988 (add-after 'unpack 'remove-sse-flags-from-generic-target
989 (lambda _
990 (substitute* "src/CMakeLists.txt"
991 (("-msse -msse2 -mfpmath=sse") "")
992 (("-march=(athlon64|core2)" flag)
993 (string-append flag " -msse -msse2 -mfpmath=sse")))
994 #t)))))
995 (inputs
996 `(("boost" ,boost)
997 ("fftwf" ,fftwf)
998 ("alsa-lib" ,alsa-lib)
999 ("jack" ,jack-1)
1000 ("fontconfig" ,fontconfig)
1001 ("minixml" ,minixml)
1002 ("mesa" ,mesa)
1003 ("fltk" ,fltk)
1004 ("lv2" ,lv2)
1005 ("readline" ,readline)
1006 ("ncurses" ,ncurses)
1007 ("cairo" ,cairo)
1008 ("zlib" ,zlib)))
1009 (native-inputs
1010 `(("pkg-config" ,pkg-config)))
1011 (home-page "http://yoshimi.sourceforge.net/")
1012 (synopsis "Multi-paradigm software synthesizer")
1013 (description
1014 "Yoshimi is a fork of ZynAddSubFX, a feature heavy realtime software
1015synthesizer. It offers three synthesizer engines, multitimbral and polyphonic
1016synths, microtonal capabilities, custom envelopes, effects, etc. Yoshimi
1017improves on support for JACK features, such as JACK MIDI.")
1018 (license license:gpl2)))
658212eb
LF
1019
1020(define-public cursynth
1021 (package
1022 (name "cursynth")
1023 (version "1.5")
1024 (source
1025 (origin
1026 (method url-fetch)
1027 (uri (string-append "mirror://gnu/cursynth/cursynth-"
1028 version ".tar.gz"))
1029 (sha256
1030 (base32 "1dhphsya41rv8z6yqcv9l6fwbslsds4zh1y56zizi39nd996d40v"))
1031 (patches (list (search-patch "cursynth-wave-rand.patch")))))
1032 (build-system gnu-build-system)
1033 (native-inputs `(("pkg-config" ,pkg-config)))
1034 ;; TODO: See https://github.com/iyoko/cursynth/issues/4 which currently
1035 ;; prevents us from using pulseaudio
1036 (inputs `(("ncurses" ,ncurses)
1037 ("alsa" ,alsa-lib)))
1038 (home-page "http://www.gnu.org/software/cursynth")
1039 (synopsis "Polyphonic and MIDI subtractive music synthesizer using curses")
1040 (description "GNU cursynth is a polyphonic synthesizer that runs
1041graphically in the terminal. It is built on a full-featured subtractive
1042synthesis engine. Notes and parameter changes may be entered via MIDI or the
1043computer's keyboard.")
1044 (license license:gpl3+)))