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