guix: Support authentication when fetching from SVN.
[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>
a763ce7d 3;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
e8069d01 4;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
aa0edd3f 5;;; Copyright © 2016 Al McElrath <hello@yrns.org>
b7367762 6;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
3f7a182d 7;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
21f05134 8;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
6d3ef286 9;;; Copyright © 2016 John J. Foerch <jjfoerch@earthlink.net>
1b6826d3
RW
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages music)
27 #:use-module (guix utils)
28 #:use-module (guix packages)
29 #:use-module (guix download)
8e80244a 30 #:use-module (guix git-download)
1b6826d3
RW
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix build-system gnu)
8b9ec354 33 #:use-module (guix build-system cmake)
821664f1 34 #:use-module (guix build-system python)
8e80244a 35 #:use-module (guix build-system waf)
1b6826d3 36 #:use-module (gnu packages)
ddfddb0c 37 #:use-module (gnu packages algebra)
c267cc15 38 #:use-module (gnu packages audio)
2d0fd07b 39 #:use-module (gnu packages autotools)
b7367762 40 #:use-module (gnu packages backup)
8b9ec354 41 #:use-module (gnu packages base) ;libbdf
1b6826d3 42 #:use-module (gnu packages bison)
b7367762 43 #:use-module (gnu packages boost)
e8069d01 44 #:use-module (gnu packages cdrom)
8b9ec354
RW
45 #:use-module (gnu packages code)
46 #:use-module (gnu packages check)
47 #:use-module (gnu packages compression)
aa0edd3f 48 #:use-module (gnu packages curl)
13416a10 49 #:use-module (gnu packages cyrus-sasl)
1b6826d3 50 #:use-module (gnu packages docbook)
99828fa7 51 #:use-module (gnu packages documentation)
13416a10 52 #:use-module (gnu packages file)
1b6826d3 53 #:use-module (gnu packages flex)
8e80244a 54 #:use-module (gnu packages fltk)
1b6826d3
RW
55 #:use-module (gnu packages fonts)
56 #:use-module (gnu packages fontutils)
3bf429af 57 #:use-module (gnu packages freedesktop)
6260d1a8 58 #:use-module (gnu packages gcc)
aa0edd3f 59 #:use-module (gnu packages gnupg)
1b6826d3
RW
60 #:use-module (gnu packages gettext)
61 #:use-module (gnu packages ghostscript)
ec8da0e2 62 #:use-module (gnu packages gl)
8e80244a 63 #:use-module (gnu packages glib)
c267cc15 64 #:use-module (gnu packages gnome)
770305f4 65 #:use-module (gnu packages graphics)
1b6826d3
RW
66 #:use-module (gnu packages gtk)
67 #:use-module (gnu packages guile)
c267cc15 68 #:use-module (gnu packages image)
1b6826d3 69 #:use-module (gnu packages imagemagick)
6260d1a8 70 #:use-module (gnu packages java)
c267cc15
RW
71 #:use-module (gnu packages linux) ; for alsa-utils
72 #:use-module (gnu packages man)
73 #:use-module (gnu packages mp3)
3bf429af 74 #:use-module (gnu packages mpd)
e8069d01 75 #:use-module (gnu packages ncurses)
1b6826d3 76 #:use-module (gnu packages netpbm)
821664f1 77 #:use-module (gnu packages pdf)
1b6826d3
RW
78 #:use-module (gnu packages perl)
79 #:use-module (gnu packages pkg-config)
d231bb35 80 #:use-module (gnu packages pulseaudio) ;libsndfile
1b6826d3 81 #:use-module (gnu packages python)
8b9ec354 82 #:use-module (gnu packages qt)
d231bb35 83 #:use-module (gnu packages rdf)
c493679f 84 #:use-module (gnu packages readline)
1b6826d3 85 #:use-module (gnu packages rsync)
21d18113 86 #:use-module (gnu packages sdl)
2d0fd07b 87 #:use-module (gnu packages tcl)
1b6826d3 88 #:use-module (gnu packages texinfo)
8f9ac901 89 #:use-module (gnu packages tex)
13416a10 90 #:use-module (gnu packages tls)
e8069d01 91 #:use-module (gnu packages video)
8b9ec354 92 #:use-module (gnu packages web)
c30a66de 93 #:use-module (gnu packages wxwidgets)
c267cc15 94 #:use-module (gnu packages xml)
ddfddb0c 95 #:use-module (gnu packages xorg)
c267cc15 96 #:use-module (gnu packages xiph)
2d0fd07b
RW
97 #:use-module (gnu packages zip)
98 #:use-module ((srfi srfi-1) #:select (last)))
1b6826d3 99
c30a66de
RW
100(define-public aria-maestosa
101 (package
102 (name "aria-maestosa")
103 (version "1.4.11")
104 (source (origin
105 (method url-fetch)
106 (uri (string-append "mirror://sourceforge/ariamaestosa/ariamaestosa/"
107 version "/AriaSrc-" version ".tar.bz2"))
108 (sha256
109 (base32
110 "0gf9z96z83jiabxhpl856j15vl9flfgs6x1r0r6hc7g2xvwag0vy"))))
111 (build-system gnu-build-system)
112 (arguments
113 `(#:tests? #f ;no tests
114 #:phases
115 ;; TODO: Add scons-build-system and use it here.
116 (modify-phases %standard-phases
117 (delete 'configure)
118 (add-after 'unpack 'scons-propagate-environment
119 (lambda _
120 ;; By design, SCons does not, by default, propagate
121 ;; environment variables to subprocesses. See:
122 ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
123 ;; Here, we modify the SConstruct file to arrange for
124 ;; environment variables to be propagated.
125 (substitute* "SConstruct"
126 (("env = Environment\\(\\)")
127 "env = Environment(ENV=os.environ)")
128 ;; Scons errors out when copying subdirectories from Resources,
129 ;; so we move them instead.
130 (("Copy") "Move")
131 ;; We move the "score" and "Documentation" directories at once,
132 ;; so we have to ignore files contained therein.
133 (("if \".svn\" in file" line)
134 (string-append line
135 " or \"score/\" in file"
136 " or \"Documentation/\" in file")))
137 #t))
138 (replace 'build (lambda _ (zero? (system* "scons"))))
139 (replace 'install
140 (lambda* (#:key outputs #:allow-other-keys)
141 (let ((out (assoc-ref outputs "out")))
142 (and
143 (zero? (system* "scons"
144 (string-append "prefix=" out)
145 "install"))
146 ;; Fix directory permissions
147 (begin
148 (chmod (string-append out "/share/Aria/Documentation") #o555)
149 (chmod (string-append out "/share/Aria/score") #o555)
150 #t))))))))
151 (inputs
152 `(("wxwidgets" ,wxwidgets)
153 ("glib" ,glib)
154 ("alsa-lib" ,alsa-lib)))
155 (native-inputs
156 `(("scons" ,scons)
157 ("pkg-config" ,pkg-config)))
158 (home-page "http://ariamaestosa.sourceforge.net/")
159 (synopsis "MIDI sequencer and editor")
160 (description
161 "Aria Maestosa is a MIDI sequencer and editor. It lets you compose, edit
162and play MIDI files with a few clicks in a user-friendly interface offering
163score, keyboard, guitar, drum and controller views.")
164 (license license:gpl3+)))
165
e8069d01
PW
166(define-public cmus
167 (package
168 (name "cmus")
169 (version "2.7.1")
170 (source (origin
171 (method url-fetch)
172 (uri (string-append
173 "https://github.com/" name "/" name "/archive/v"
174 version ".tar.gz"))
566fc7fa 175 (file-name (string-append name "-" version ".tar.gz"))
e8069d01
PW
176 (sha256
177 (base32
178 "0raixgjavkm7hxppzsc5zqbfbh2bhjcmbiplhnsxsmyj8flafyc1"))))
179 (build-system gnu-build-system)
180 (arguments
181 `(#:tests? #f ; cmus does not include tests
182 #:phases
183 (modify-phases %standard-phases
184 (replace
185 'configure
186 (lambda* (#:key outputs #:allow-other-keys)
187 (let ((out (assoc-ref outputs "out")))
188
189 ;; It's an idiosyncratic configure script that doesn't
190 ;; understand --prefix=..; it wants prefix=.. instead.
191 (zero?
192 (system* "./configure"
193 (string-append "prefix=" out)))))))))
194 ;; TODO: cmus optionally supports the following formats, which haven't yet
195 ;; been added to Guix:
196 ;;
197 ;; - Roar, libroar
198 ;;
199 ;; - DISCID_LIBS, apparently different from cd-discid which is included in
200 ;; Guix. See <http://sourceforge.net/projects/discid/>
201 (native-inputs
202 `(("pkg-config" ,pkg-config)))
203 (inputs
204 `(("alsa-lib" ,alsa-lib)
205 ("ao" ,ao)
206 ("ffmpeg" ,ffmpeg)
207 ("flac" ,flac)
208 ("jack" ,jack-1)
209 ("libcddb" ,libcddb)
210 ("libcdio-paranoia" ,libcdio-paranoia)
211 ("libcue" ,libcue)
212 ("libmad" ,libmad)
213 ("libmodplug" ,libmodplug)
214 ("libmpcdec" ,libmpcdec)
215 ("libsamplerate" ,libsamplerate)
216 ("libvorbis" ,libvorbis)
217 ("ncurses" ,ncurses)
218 ("opusfile" ,opusfile)
219 ("pulseaudio" ,pulseaudio)
220 ("wavpack" ,wavpack)))
221 (home-page "https://cmus.github.io/")
222 (synopsis "Small console music player")
223 (description "Cmus is a small and fast console music player. It supports
224many input formats and provides a customisable Vi-style user interface.")
225 (license license:gpl2+)))
226
d231bb35
RW
227(define-public hydrogen
228 (package
229 (name "hydrogen")
b7367762 230 (version "0.9.6.1")
d231bb35
RW
231 (source (origin
232 (method url-fetch)
233 (uri (string-append
b7367762
EF
234 "https://github.com/hydrogen-music/hydrogen/archive/"
235 version ".tar.gz"))
d231bb35
RW
236 (sha256
237 (base32
b7367762
EF
238 "0vxnaqfmcv7hhk0cj67imdcqngspnck7f0wfmvhfgfqa7x1xznll"))))
239 (build-system cmake-build-system)
d231bb35 240 (arguments
b7367762 241 `(#:test-target "tests"))
d231bb35 242 (native-inputs
b7367762 243 `(("cppunit" ,cppunit)
d231bb35
RW
244 ("pkg-config" ,pkg-config)))
245 (inputs
b7367762 246 `(("alsa-lib" ,alsa-lib)
d231bb35 247 ("jack" ,jack-1)
b7367762 248 ;; ("ladspa" ,ladspa) ; cannot find during configure
d231bb35 249 ("lash" ,lash)
b7367762
EF
250 ("libarchive" ,libarchive)
251 ("libsndfile" ,libsndfile)
252 ("libtar" ,libtar)
253 ("lrdf" ,lrdf)
d231bb35 254 ("qt" ,qt-4)
b7367762 255 ("zlib" ,zlib)))
d231bb35
RW
256 (home-page "http://www.hydrogen-music.org")
257 (synopsis "Drum machine")
258 (description
259 "Hydrogen is an advanced drum machine for GNU/Linux. Its main goal is to
260enable professional yet simple and intuitive pattern-based drum programming.")
261 (license license:gpl2+)))
262
8c454dcd
RW
263(define-public klick
264 (package
265 (name "klick")
266 (version "0.12.2")
267 (source (origin
268 (method url-fetch)
269 (uri (string-append "http://das.nasophon.de/download/klick-"
270 version ".tar.gz"))
271 (sha256
272 (base32
273 "0hmcaywnwzjci3pp4xpvbijnnwvibz7gf9xzcdjbdca910y5728j"))))
274 (build-system gnu-build-system)
275 (arguments
276 `(#:tests? #f ;no "check" target
277 #:phases
278 ;; TODO: Add scons-build-system and use it here.
279 (modify-phases %standard-phases
280 (delete 'configure)
281 (replace 'build
282 (lambda* (#:key inputs outputs #:allow-other-keys)
283 (let ((out (assoc-ref outputs "out")))
284 (mkdir-p out)
285 (zero? (system* "scons" (string-append "PREFIX=" out))))))
286 (replace 'install (lambda _ (zero? (system* "scons" "install")))))))
287 (inputs
288 `(("boost" ,boost)
289 ("jack" ,jack-1)
290 ("libsndfile" ,libsndfile)
291 ("libsamplerate" ,libsamplerate)
292 ("liblo" ,liblo)
293 ("rubberband" ,rubberband)))
294 (native-inputs
295 `(("scons" ,scons)
296 ("python" ,python-2)
297 ("pkg-config" ,pkg-config)))
298 (home-page "http://das.nasophon.de/klick/")
299 (synopsis "Metronome for JACK")
300 (description
301 "klick is an advanced command-line based metronome for JACK. It allows
302you to define complex tempo maps for entire songs or performances.")
303 (license license:gpl2+)))
304
048bfba1
RW
305(define-public gtklick
306 (package
307 (name "gtklick")
308 (version "0.6.4")
309 (source (origin
310 (method url-fetch)
311 (uri (string-append "http://das.nasophon.de/download/gtklick-"
312 version ".tar.gz"))
313 (sha256
314 (base32
315 "0dq1km6njnzsqdqyf6wzir9g733z0mc9vmxfg2383k3c2a2di6bp"))))
316 (build-system python-build-system)
317 (arguments
318 `(#:tests? #f ; no tests
319 #:python ,python-2
320 #:phases
321 (modify-phases %standard-phases
322 (add-before 'build 'add-sitedirs
323 ;; .pth files are not automatically interpreted unless the
324 ;; directories containing them are added as "sites". The directories
325 ;; are then added to those in the PYTHONPATH. This is required for
326 ;; the operation of pygtk.
327 (lambda _
328 (substitute* "gtklick/gtklick.py"
329 (("import pygtk")
330 "import pygtk, site, sys
331for path in [path for path in sys.path if 'site-packages' in path]: site.addsitedir(path)"))))
332 (add-after 'unpack 'inject-store-path-to-klick
333 (lambda* (#:key inputs #:allow-other-keys)
334 (substitute* "gtklick/klick_backend.py"
335 (("KLICK_PATH = 'klick'")
336 (string-append "KLICK_PATH = '"
337 (assoc-ref inputs "klick")
338 "/bin/klick'")))
339 #t)))))
340 (inputs
341 `(("klick" ,klick)
342 ("python2-pyliblo" ,python2-pyliblo)
343 ("python2-pygtk" ,python2-pygtk)))
344 (native-inputs
345 `(("gettext" ,gnu-gettext)))
346 (home-page "http://das.nasophon.de/gtklick/")
347 (synopsis "Simple metronome with an easy-to-use graphical interface")
348 (description
349 "Gtklick is a simple metronome with an easy-to-use graphical user
350interface. It is implemented as a frontend to @code{klick}.")
351 (license license:gpl2+)))
352
1b6826d3
RW
353(define-public lilypond
354 (package
355 (name "lilypond")
398abcf8 356 (version "2.19.33")
1b6826d3
RW
357 (source (origin
358 (method url-fetch)
359 (uri (string-append
360 "http://download.linuxaudio.org/lilypond/sources/v"
361 (version-major+minor version) "/"
362 name "-" version ".tar.gz"))
363 (sha256
364 (base32
398abcf8 365 "0s4vbbfy4xwq4da4kmlnndalmcyx2jaz7y8praah2146qbnr90xh"))))
1b6826d3
RW
366 (build-system gnu-build-system)
367 (arguments
127b04d7 368 `(#:tests? #f ; out-test/collated-files.html fails
1b6826d3 369 #:out-of-source? #t
409be57b 370 #:make-flags '("conf=www") ;to generate images for info manuals
127b04d7 371 #:configure-flags
409be57b
RW
372 (list "CONFIGURATION=www"
373 (string-append "--with-texgyre-dir="
127b04d7
RW
374 (assoc-ref %build-inputs "font-tex-gyre")
375 "/share/fonts/opentype/"))
1b6826d3 376 #:phases
a8bc747a 377 (modify-phases %standard-phases
409be57b
RW
378 (add-after 'unpack 'fix-path-references
379 (lambda _
a8bc747a
RW
380 (substitute* "scm/backend-library.scm"
381 (("\\(search-executable '\\(\"gs\"\\)\\)")
409be57b
RW
382 (string-append "\"" (which "gs") "\""))
383 (("\"/bin/sh\"")
384 (string-append "\"" (which "sh") "\"")))
a8bc747a
RW
385 #t))
386 (add-before 'configure 'prepare-configuration
387 (lambda _
388 (substitute* "configure"
7affb2c1
RW
389 (("SHELL=/bin/sh") "SHELL=sh")
390 ;; When checking the fontforge version do not consider the
391 ;; version string that's part of the directory.
392 (("head -n") "tail -n"))
409be57b
RW
393 (setenv "out" "www")
394 (setenv "conf" "www")
395 #t))
396 (add-after 'install 'install-info
397 (lambda _
398 (zero? (system* "make"
399 "-j" (number->string (parallel-job-count))
400 "conf=www" "install-info")))))))
1b6826d3
RW
401 (inputs
402 `(("guile" ,guile-1.8)
403 ("font-dejavu" ,font-dejavu)
127b04d7 404 ("font-tex-gyre" ,font-tex-gyre)
1b6826d3
RW
405 ("fontconfig" ,fontconfig)
406 ("freetype" ,freetype)
407 ("ghostscript" ,ghostscript)
408 ("pango" ,pango)
409 ("python" ,python-2)))
410 (native-inputs
411 `(("bison" ,bison)
412 ("perl" ,perl)
413 ("flex" ,flex)
414 ("fontforge" ,fontforge)
415 ("dblatex" ,dblatex)
416 ("gettext" ,gnu-gettext)
417 ("imagemagick" ,imagemagick)
418 ("netpbm" ,netpbm) ;for pngtopnm
419 ("texlive" ,texlive) ;metafont and metapost
420 ("texinfo" ,texinfo)
421 ("texi2html" ,texi2html)
422 ("rsync" ,rsync)
423 ("pkg-config" ,pkg-config)
424 ("zip" ,zip)))
425 (home-page "http://www.lilypond.org/")
426 (synopsis "Music typesetting")
427 (description
428 "GNU LilyPond is a music typesetter, which produces high-quality sheet
429music. Music is input in a text file containing control sequences which are
430interpreted by LilyPond to produce the final document. It is extendable with
431Guile.")
55ca5e80
LC
432 (license license:gpl3+)
433
434 ;; On armhf and mips64el, building the documentation sometimes leads to
435 ;; more than an hour of silence, so double the max silent time.
436 (properties `((max-silent-time . 7200)))))
c267cc15 437
8e80244a
RW
438(define-public non-sequencer
439 ;; The latest tagged release is three years old and uses a custom build
440 ;; system, so we take the last commit affecting the "sequencer" directory.
698bd297 441 (let ((commit "1d9bd576f6bf7ea240af5f7a60260592750af0dd"))
8e80244a
RW
442 (package
443 (name "non-sequencer")
698bd297 444 (version (string-append "1.9.5-" (string-take commit 7)))
8e80244a
RW
445 (source (origin
446 (method git-fetch)
447 (uri (git-reference
448 (url "git://git.tuxfamily.org/gitroot/non/non.git")
449 (commit commit)))
450 (sha256
451 (base32
452 "0pkkw8q6d55j38xm7r4rwpdv1wy00a44h8c4wrn7vbgpq9nij46y"))
453 (file-name (string-append name "-" version "-checkout"))))
454 (build-system waf-build-system)
455 (arguments
456 `(#:tests? #f ;no "check" target
e591a4d6
RW
457 #:configure-flags
458 (list "--project=sequencer"
459 ;; Disable the use of SSE unless on x86_64.
460 ,@(if (not (string-prefix? "x86_64" (or (%current-target-system)
461 (%current-system))))
462 '("--disable-sse")
463 '()))
d8c317df
SB
464 #:phases
465 (modify-phases %standard-phases
466 (add-before
467 'configure 'set-flags
468 (lambda _
469 ;; Compile with C++11, required by libsigc++.
470 (setenv "CXXFLAGS" "-std=c++11")
471 #t)))
8e80244a
RW
472 #:python ,python-2))
473 (inputs
474 `(("jack" ,jack-1)
475 ("libsigc++" ,libsigc++)
476 ("liblo" ,liblo)
477 ("ntk" ,ntk)))
478 (native-inputs
479 `(("pkg-config" ,pkg-config)))
480 (home-page "http://non.tuxfamily.org/wiki/Non%20Sequencer")
481 (synopsis "Pattern-based MIDI sequencer")
482 (description
483 "The Non Sequencer is a powerful, lightweight, real-time,
484pattern-based MIDI sequencer. It utilizes the JACK Audio Connection Kit for
485MIDI I/O and the NTK GUI toolkit for its user interface. Everything in Non
486Sequencer happens on-line, in real-time. Music can be composed live, while the
487transport is rolling.")
488 (license license:gpl2+))))
489
c267cc15
RW
490(define-public solfege
491 (package
492 (name "solfege")
493 (version "3.22.2")
494 (source (origin
495 (method url-fetch)
496 (uri (string-append
497 "mirror://gnu/solfege/solfege-"
498 version ".tar.xz"))
499 (sha256
500 (base32
501 "1w25rxdbj907nsx285k9nm480pvy12w3yknfh4n1dfv17cwy072i"))))
502 (build-system gnu-build-system)
503 (arguments
504 `(#:tests? #f ; xmllint attempts to download DTD
505 #:test-target "test"
506 #:phases
507 (alist-cons-after
508 'unpack 'fix-configuration
509 (lambda* (#:key inputs #:allow-other-keys)
510 (substitute* "default.config"
511 (("csound=csound")
512 (string-append "csound="
513 (assoc-ref inputs "csound")
514 "/bin/csound"))
515 (("/usr/bin/aplay")
516 (string-append (assoc-ref inputs "aplay")
517 "/bin/aplay"))
518 (("/usr/bin/timidity")
519 (string-append (assoc-ref inputs "timidity")
520 "/bin/timidity"))
521 (("/usr/bin/mpg123")
522 (string-append (assoc-ref inputs "mpg123")
523 "/bin/mpg123"))
524 (("/usr/bin/ogg123")
525 (string-append (assoc-ref inputs "ogg123")
526 "/bin/ogg123"))))
527 (alist-cons-before
528 'build 'patch-python-shebangs
529 (lambda _
530 ;; Two python scripts begin with a Unicode BOM, so patch-shebang
531 ;; has no effect.
532 (substitute* '("solfege/parsetree.py"
533 "solfege/presetup.py")
534 (("#!/usr/bin/python") (string-append "#!" (which "python")))))
535 (alist-cons-before
536 'build 'add-sitedirs
537 ;; .pth files are not automatically interpreted unless the
538 ;; directories containing them are added as "sites". The directories
539 ;; are then added to those in the PYTHONPATH. This is required for
540 ;; the operation of pygtk and pygobject.
541 (lambda _
542 (substitute* "run-solfege.py"
543 (("import os")
544 "import os, site
545for path in [path for path in sys.path if 'site-packages' in path]: site.addsitedir(path)")))
546 (alist-cons-before
547 'build 'adjust-config-file-prefix
548 (lambda* (#:key outputs #:allow-other-keys)
549 (substitute* "run-solfege.py"
550 (("prefix = os.path.*$")
551 (string-append "prefix = " (assoc-ref outputs "out")))))
552 (alist-cons-after
553 'install 'wrap-program
554 (lambda* (#:key inputs outputs #:allow-other-keys)
f3045a5b 555 ;; Make sure 'solfege' runs with the correct PYTHONPATH.
c267cc15 556 (let* ((out (assoc-ref outputs "out"))
f3045a5b 557 (path (getenv "PYTHONPATH")))
c267cc15 558 (wrap-program (string-append out "/bin/solfege")
f3045a5b 559 `("PYTHONPATH" ":" prefix (,path)))))
c267cc15
RW
560 %standard-phases)))))))
561 (inputs
562 `(("python" ,python-2)
563 ("pygtk" ,python2-pygtk)
564 ("gettext" ,gnu-gettext)
565 ("gtk" ,gtk+)
e8309291 566 ("lilypond" ,lilypond)
c267cc15
RW
567 ;; players needed at runtime
568 ("aplay" ,alsa-utils)
569 ("csound" ,csound) ; optional, needed for some exercises
570 ("mpg123" ,mpg123)
571 ("ogg123" ,vorbis-tools)
572 ("timidity" ,timidity++)))
573 (native-inputs
574 `(("pkg-config" ,pkg-config)
575 ("txt2man" ,txt2man)
576 ("libxml2" ,libxml2) ; for tests
577 ("ghostscript" ,ghostscript)
c267cc15
RW
578 ("texinfo" ,texinfo)))
579 (home-page "https://www.gnu.org/software/solfege/")
580 (synopsis "Ear training")
581 (description
582 "GNU Solfege is a program for practicing musical ear-training. With it,
583you can practice your recognition of various musical intervals and chords. It
584features a statistics overview so you can monitor your progress across several
585sessions. Solfege is also designed to be extensible so you can easily write
586your own lessons.")
587 (license license:gpl3+)))
6260d1a8 588
8b9ec354
RW
589(define-public powertabeditor
590 (package
591 (name "powertabeditor")
d19cf783 592 (version "2.0.0-alpha8")
8b9ec354
RW
593 (source (origin
594 (method url-fetch)
595 (uri (string-append
596 "https://github.com/powertab/powertabeditor/archive/"
597 version ".tar.gz"))
598 (file-name (string-append name "-" version ".tar.gz"))
599 (sha256
600 (base32
d19cf783 601 "0gaa2x209v3azql8ak3r1n9a9qbxjx2ssirvwdxwklv2lmfqkm82"))
8b9ec354
RW
602 (modules '((guix build utils)))
603 (snippet
604 '(begin
605 ;; Remove bundled sources for external libraries
606 (delete-file-recursively "external")
607 (substitute* "CMakeLists.txt"
608 (("include_directories\\(\\$\\{PROJECT_SOURCE_DIR\\}/external/.*") "")
8b9ec354
RW
609 (("add_subdirectory\\(external\\)") ""))
610 (substitute* "test/CMakeLists.txt"
611 (("include_directories\\(\\$\\{PROJECT_SOURCE_DIR\\}/external/.*") ""))
612
613 ;; Add install target
614 (substitute* "source/CMakeLists.txt"
615 (("qt5_use_modules")
616 (string-append
617 "install(TARGETS powertabeditor "
618 "RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)\n"
619 "install(FILES data/tunings.json DESTINATION "
620 "${CMAKE_INSTALL_PREFIX}/share/powertabeditor/)\n"
621 "qt5_use_modules")))
622 #t))))
623 (build-system cmake-build-system)
624 (arguments
7e11d113 625 `(#:modules ((guix build cmake-build-system)
8b9ec354
RW
626 (guix build utils)
627 (ice-9 match))
628 #:configure-flags
629 ;; CMake appears to lose the RUNPATH for some reason, so it has to be
630 ;; explicitly set with CMAKE_INSTALL_RPATH.
7e11d113
RW
631 (list "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
632 "-DCMAKE_ENABLE_PRECOMPILED_HEADERS=OFF" ; if ON pte_tests cannot be built
633 (string-append "-DCMAKE_INSTALL_RPATH="
8b9ec354
RW
634 (string-join (map (match-lambda
635 ((name . directory)
636 (string-append directory "/lib")))
637 %build-inputs) ";")))
638 #:phases
639 (modify-phases %standard-phases
7e11d113
RW
640 (replace
641 'check
642 (lambda _
643 (zero? (system* "bin/pte_tests"
644 ;; Exclude this failing test
645 "~Formats/PowerTabOldImport/Directions"))))
646 (add-before
647 'configure 'fix-tests
648 (lambda _
649 ;; Tests cannot be built with precompiled headers
650 (substitute* "test/CMakeLists.txt"
651 (("cotire\\(pte_tests\\)") ""))
652 #t))
8b9ec354
RW
653 (add-before
654 'configure 'remove-third-party-libs
655 (lambda* (#:key inputs #:allow-other-keys)
656 ;; Link with required static libraries, because we're not
657 ;; using the bundled version of withershins.
658 (substitute* '("source/CMakeLists.txt"
659 "test/CMakeLists.txt")
7e11d113 660 (("target_link_libraries\\((powertabeditor|pte_tests)" _ target)
8b9ec354
RW
661 (string-append "target_link_libraries(" target " "
662 (assoc-ref inputs "binutils")
663 "/lib/libbfd.a "
d6902798 664 (assoc-ref inputs "libiberty")
8b9ec354
RW
665 "/lib/libiberty.a "
666 "dl")))
667 #t)))))
668 (inputs
669 `(("boost" ,boost)
670 ("alsa-lib" ,alsa-lib)
0a0bfd68 671 ("qtbase" ,qtbase)
8b9ec354 672 ("withershins" ,withershins)
d6902798 673 ("libiberty" ,libiberty) ;for withershins
8b9ec354
RW
674 ("binutils" ,binutils) ;for -lbfd and -liberty (for withershins)
675 ("timidity" ,timidity++)
676 ("pugixml" ,pugixml)
677 ("rtmidi" ,rtmidi)
678 ("rapidjson" ,rapidjson)
679 ("zlib" ,zlib)))
680 (native-inputs
681 `(("catch" ,catch-framework)
682 ("pkg-config" ,pkg-config)))
683 (home-page "http://powertabs.net")
684 (synopsis "Guitar tablature editor")
685 (description
686 "Power Tab Editor 2.0 is the successor to the famous original Power Tab
687Editor. It is compatible with Power Tab Editor 1.7 and Guitar Pro.")
688 (license license:gpl3+)))
689
b095e762
RW
690(define-public synthv1
691 (package
692 (name "synthv1")
cb1436d8 693 (version "0.7.5")
b095e762
RW
694 (source (origin
695 (method url-fetch)
696 (uri
697 (string-append "mirror://sourceforge/synthv1/synthv1-"
698 version ".tar.gz"))
699 (sha256
700 (base32
cb1436d8 701 "0h5zja78phf9705i9g54zh61iczb24iv7rxhljyms30sjgajig1y"))))
b095e762
RW
702 (build-system gnu-build-system)
703 ;; There are no tests.
704 (arguments `(#:tests? #f))
705 (inputs
706 `(("jack" ,jack-1)
707 ("lv2" ,lv2)
708 ("alsa-lib" ,alsa-lib)
709 ("liblo" ,liblo)
e5f2afdb
EF
710 ("qtbase" ,qtbase)
711 ("qttools" ,qttools)))
b095e762
RW
712 (home-page "http://synthv1.sourceforge.net")
713 (synopsis "Polyphonic subtractive synthesizer")
714 (description
715 "Synthv1 is an old-school subtractive polyphonic synthesizer with four
716oscillators and stereo effects.")
717 (license license:gpl2+)))
718
ec8da0e2
RW
719(define-public setbfree
720 (package
721 (name "setbfree")
a39f48b8 722 (version "0.8.1")
ec8da0e2
RW
723 (source (origin
724 (method url-fetch)
725 (uri
a39f48b8
RW
726 (string-append "https://github.com/pantherb/setBfree/archive/v"
727 version ".tar.gz"))
728 (file-name (string-append name "-" version ".tar.gz"))
ec8da0e2
RW
729 (sha256
730 (base32
a39f48b8 731 "0hj0rqk5yd4fzs7bwy6a6nhqgrmcggkjcr4il76rxy92r7nwabf3"))))
ec8da0e2
RW
732 (build-system gnu-build-system)
733 (arguments
734 `(#:tests? #f ; no "check" target
735 #:make-flags
736 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
737 (string-append "FONTFILE="
738 (assoc-ref %build-inputs "font-bitstream-vera")
b42d4508
RW
739 "/share/fonts/truetype/VeraBd.ttf")
740 ;; Disable unsupported optimization flags on non-x86
741 ,@(let ((system (or (%current-target-system)
742 (%current-system))))
743 (if (or (string-prefix? "x86_64" system)
744 (string-prefix? "i686" system))
745 '()
746 '("OPTIMIZATIONS=-ffast-math -fomit-frame-pointer -O3"))))
ec8da0e2
RW
747 #:phases
748 (modify-phases %standard-phases
749 (add-before 'build 'set-CC-variable
750 (lambda _ (setenv "CC" "gcc") #t))
751 (delete 'configure))))
752 (inputs
753 `(("jack" ,jack-1)
754 ("lv2" ,lv2)
755 ("zita-convolver" ,zita-convolver)
756 ("glu" ,glu)
757 ("ftgl" ,ftgl)
758 ("font-bitstream-vera" ,font-bitstream-vera)))
759 (native-inputs
760 `(("help2man" ,help2man)
761 ("pkg-config" ,pkg-config)))
762 (home-page "http://setbfree.org")
763 (synopsis "Tonewheel organ")
764 (description
765 "setBfree is a MIDI-controlled, software synthesizer designed to imitate
766the sound and properties of the electromechanical organs and sound
767modification devices that brought world-wide fame to the names and products of
768Laurens Hammond and Don Leslie.")
769 (license license:gpl2+)))
770
770305f4
RW
771(define-public beast
772 (package
773 (name "beast")
774 (version "0.10.0")
775 (source (origin
776 (method url-fetch)
777 (uri (string-append "https://testbit.eu/pub/dists/beast/beast-"
778 version ".tar.xz"))
779 (sha256
780 (base32
781 "1jzzmfwssklzw8fvvil04n8csc0zm99fnd9p2xa7c0xchg37lvhn"))))
782 (build-system gnu-build-system)
783 (inputs
784 `(("rapicorn" ,rapicorn)
785 ("guile" ,guile-1.8)
786 ("python" ,python-2)
787 ("cython" ,python2-cython)
788 ("libgnomecanvas" ,libgnomecanvas)
789 ("libogg" ,libogg)
790 ("libmad" ,libmad)
791 ("flac" ,flac)
792 ("alsa-lib" ,alsa-lib)
793 ("libvorbis" ,libvorbis)
794 ("gettext" ,gnu-gettext)))
795 (native-inputs
796 `(("pkg-config" ,pkg-config)
797 ("glib:bin" ,glib "bin")
798 ("perl" ,perl)
799 ("perl-xml-parser" ,perl-xml-parser)))
800 (home-page "https://testbit.eu/wiki/Beast_Home")
801 (synopsis "Music composition and modular synthesis environment")
802 (description
803 "Beast is a music composition and modular synthesis application. It
804supports a wide range of standards in the field, such as MIDI, various audio
805file formats and LADSPA modules. It allows for multitrack editing, real-time
806synthesis, 32bit audio rendering, precise timing down to sample granularity,
807on-demand and partial loading of wave files, on the fly decoding, stereo
808mixing, FFT scopes, MIDI automation and full scriptability in Scheme.")
809 (license license:gpl3+)))
810
96250294
RW
811(define-public bristol
812 (package
813 (name "bristol")
814 (version "0.60.11")
815 (source (origin
816 (method url-fetch)
817 (uri (string-append "mirror://sourceforge/bristol/bristol/"
818 (version-major+minor version)
819 "/bristol-" version ".tar.gz"))
820 (sha256
821 (base32
822 "1fi2m4gmvxdi260821y09lxsimq82yv4k5bbgk3kyc3x1nyhn7vx"))))
823 (build-system gnu-build-system)
18ef998b
RW
824 (arguments
825 `(#:phases
826 (modify-phases %standard-phases
827 (add-after 'unpack 'remove-sse-flags
828 (lambda* (#:key system #:allow-other-keys)
829 (when (not (or (string-prefix? "x86_64" system)
830 (string-prefix? "i686" system)))
831 (substitute* "bristol/Makefile.in"
832 (("-msse -mfpmath=sse") "")))
73124d34
RW
833 #t))
834 ;; We know that Bristol has been linked with JACK and we don't have
835 ;; ldd, so we can just skip this check.
836 (add-after 'unpack 'do-not-grep-for-jack
837 (lambda _
838 (substitute* "bin/startBristol.in"
839 (("ldd `which bristol` | grep jack") "echo guix"))
18ef998b 840 #t)))))
96250294
RW
841 (inputs
842 `(("alsa-lib" ,alsa-lib)
843 ("jack" ,jack-1)
844 ("liblo" ,liblo)
845 ("libx11" ,libx11)))
846 (native-inputs
847 `(("pkg-config" ,pkg-config)))
848 (home-page "http://bristol.sourceforge.net/")
849 (synopsis "Synthesizer emulator")
850 (description
851 "Bristol is an emulation package for a number of different 'classic'
852synthesizers including additive and subtractive and a few organs. The
853application consists of the engine, which is called bristol, and its own GUI
854library called brighton that represents all the emulations. There are
855currently more than twenty different emulations; each does sound different
856although the author maintains that the quality and accuracy of each emulation
857is subjective.")
858 (license license:gpl3+)))
859
6260d1a8
RW
860(define-public tuxguitar
861 (package
862 (name "tuxguitar")
863 (version "1.2")
864 (source (origin
865 (method url-fetch)
866 (uri (string-append
867 "mirror://sourceforge/tuxguitar/TuxGuitar/TuxGuitar-"
868 version "/tuxguitar-src-" version ".tar.gz"))
869 (sha256
870 (base32
871 "1g1yf2gd06fzdhqb8kb8dmdcmr602s9y24f01kyl4940wimgr944"))))
872 (build-system gnu-build-system)
873 (arguments
874 `(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
875 (assoc-ref %outputs "out") "/lib")
876 (string-append "PREFIX="
877 (assoc-ref %outputs "out"))
878 (string-append "SWT_PATH="
1ad15c16 879 (assoc-ref %build-inputs "java-swt")
6260d1a8
RW
880 "/share/java/swt.jar"))
881 #:tests? #f ;no "check" target
882 #:parallel-build? #f ;not supported
883 #:phases
5f1c9498
RW
884 (modify-phases %standard-phases
885 (delete 'configure)
886 (add-before 'build 'enter-dir-and-set-flags
887 (lambda* (#:key inputs #:allow-other-keys)
888 (chdir "TuxGuitar")
889 (substitute* "GNUmakefile"
6da2e99e
RW
890 (("GCJFLAGS\\+=(.*)" _ rest)
891 (string-append "GCJFLAGS=-fsource=1.4 -fPIC " rest))
5f1c9498
RW
892 (("PROPERTIES\\?=")
893 (string-append "PROPERTIES?= -Dswt.library.path="
1ad15c16 894 (assoc-ref inputs "java-swt") "/lib"))
5f1c9498
RW
895 (("\\$\\(GCJ\\) -o") "$(GCJ) $(LDFLAGS) -o"))
896 #t)))))
6260d1a8 897 (inputs
1ad15c16 898 `(("java-swt" ,java-swt)))
6260d1a8 899 (native-inputs
397dbde8 900 `(("gcj" ,gcj)
6260d1a8
RW
901 ("pkg-config" ,pkg-config)))
902 (home-page "http://tuxguitar.com.ar")
903 (synopsis "Multitrack tablature editor and player")
904 (description
905 "TuxGuitar is a guitar tablature editor with player support through midi.
906It can display scores and multitrack tabs. TuxGuitar provides various
907additional features, including autoscrolling while playing, note duration
908management, bend/slide/vibrato/hammer-on/pull-off effects, support for
909tuplets, time signature management, tempo management, gp3/gp4/gp5 import and
910export.")
911 (license license:lgpl2.1+)))
2d0fd07b
RW
912
913(define-public pd
914 (package
915 (name "pd")
916 (version "0.45.4")
917 (source (origin
918 (method url-fetch)
919 (uri
920 (string-append "mirror://sourceforge/pure-data/pure-data/"
921 version "/pd-" (version-major+minor version)
922 "-" (last (string-split version #\.))
923 ".src.tar.gz"))
924 (sha256
925 (base32
926 "1ls2ap5yi2zxvmr247621g4jx0hhfds4j5704a050bn2n3l0va2p"))))
927 (build-system gnu-build-system)
928 (arguments
929 `(#:tests? #f ; no "check" target
930 #:phases
931 (modify-phases %standard-phases
932 (add-before
933 'configure 'fix-wish-path
934 (lambda _
935 (substitute* "src/s_inter.c"
936 ((" wish ") (string-append " " (which "wish8.6") " ")))
937 (substitute* "tcl/pd-gui.tcl"
938 (("exec wish ") (string-append "exec " (which "wish8.6") " ")))
939 #t))
940 (add-after
941 'unpack 'autoconf
942 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
943 (native-inputs
944 `(("autoconf" ,autoconf)
945 ("automake" ,automake)
946 ("libtool" ,libtool)
947 ("gettext" ,gnu-gettext)
948 ("pkg-config" ,pkg-config)))
949 (inputs
950 `(("tk" ,tk)
951 ("alsa-lib" ,alsa-lib)
952 ("jack" ,jack-1)))
953 (home-page "http://puredata.info")
954 (synopsis "Visual programming language for artistic performances")
955 (description
956 "Pure Data (aka Pd) is a visual programming language. Pd enables
957musicians, visual artists, performers, researchers, and developers to create
958software graphically, without writing lines of code. Pd is used to process
959and generate sound, video, 2D/3D graphics, and interface sensors, input
960devices, and MIDI. Pd can easily work over local and remote networks to
961integrate wearable technology, motor systems, lighting rigs, and other
962equipment. Pd is suitable for learning basic multimedia processing and visual
963programming methods as well as for realizing complex systems for large-scale
964projects.")
965 (license license:bsd-3)))
821664f1 966
aacb52fb
RW
967(define-public portmidi
968 (package
969 (name "portmidi")
970 (version "217")
971 (source (origin
972 (method url-fetch)
973 (uri (string-append "mirror://sourceforge/portmedia/portmidi/"
974 version "/portmidi-src-" version ".zip"))
975 (sha256
976 (base32
977 "03rfsk7z6rdahq2ihy5k13qjzgx757f75yqka88v3gc0pn9ais88"))
978 (patches (list (search-patch "portmidi-modular-build.patch")))))
979 (build-system cmake-build-system)
980 (arguments
981 `(#:tests? #f ; tests cannot be linked
982 #:configure-flags
983 (list "-DPORTMIDI_ENABLE_JAVA=Off"
984 "-DCMAKE_BUILD_TYPE=Release" ; needed to have PMALSA set
985 "-DPORTMIDI_ENABLE_TEST=Off"))) ; tests fail linking
986 (inputs
987 `(("alsa-lib" ,alsa-lib)))
988 (native-inputs
989 `(("unzip" ,unzip)))
990 (home-page "http://portmedia.sourceforge.net/portmidi/")
991 (synopsis "Library for MIDI I/O")
992 (description
993 "PortMidi is a library supporting real-time input and output of MIDI data
994using a system-independent interface.")
995 (license license:expat)))
f65d59fc
RW
996
997(define-public python-pyportmidi
998 (package
999 (name "python-pyportmidi")
1000 (version (package-version portmidi))
1001 (source (package-source portmidi))
1002 (build-system python-build-system)
1003 (arguments
1004 `(#:tests? #f ; no tests included
1005 #:phases
1006 (modify-phases %standard-phases
1007 (add-after 'unpack 'enter-dir
1008 (lambda _ (chdir "pm_python") #t))
1009 (add-after 'enter-dir 'fix-setup.py
1010 (lambda _
1011 (substitute* "setup.py"
1012 ;; Use Python 3 syntax
1013 (("print (\".*\")" _ text)
1014 (string-append "print(" text ")\n"))
1015 ;; TODO.txt and CHANGES.txt don't exist
1016 (("CHANGES =.*") "CHANGES = \"\"\n")
1017 (("TODO =.*") "TODO = \"\"\n"))
1018 #t)))))
1019 (inputs
1020 `(("portmidi" ,portmidi)
1021 ("alsa-lib" ,alsa-lib)
1022 ("python-cython" ,python-cython)))
1023 (native-inputs
1024 `(("unzip" ,unzip)))
1025 (home-page "http://portmedia.sourceforge.net/portmidi/")
1026 (synopsis "Python bindings to PortMidi")
1027 (description
1028 "This package provides Python bindings to the PortMidi library.")
1029 (license license:expat)))
aacb52fb 1030
821664f1
RW
1031(define-public frescobaldi
1032 (package
1033 (name "frescobaldi")
4b2eede4 1034 (version "2.19.0")
821664f1
RW
1035 (source (origin
1036 (method url-fetch)
1037 (uri (string-append
1038 "https://github.com/wbsoft/frescobaldi/releases/download/v"
1039 version "/frescobaldi-" version ".tar.gz"))
1040 (sha256
1041 (base32
4b2eede4 1042 "1rnk8i8dlshzx16n2qxcsqcs7kywgyazzyzw2vy4vp2gsm9vs9ml"))))
821664f1
RW
1043 (build-system python-build-system)
1044 (inputs
1045 `(("lilypond" ,lilypond)
6855b347 1046 ("portmidi" ,portmidi)
821664f1
RW
1047 ("python-pyqt-4" ,python-pyqt-4)
1048 ("python-ly" ,python-ly)
6855b347 1049 ("python-pyportmidi" ,python-pyportmidi)
821664f1
RW
1050 ("poppler" ,poppler)
1051 ("python-poppler-qt4" ,python-poppler-qt4)
1052 ("python-sip" ,python-sip)))
1053 (home-page "http://www.frescobaldi.org/")
1054 (synopsis "LilyPond sheet music text editor")
1055 (description
1056 "Frescobaldi is a LilyPond sheet music text editor with syntax
1057highlighting and automatic completion. Among other things, it can render
1058scores next to the source, can capture input from MIDI or read MusicXML and
1059ABC files, has a MIDI player for proof-listening, and includes a documentation
1060browser.")
1061 (license license:gpl2+)))
ddfddb0c 1062
bf76d780
RW
1063(define-public drumstick
1064 (package
1065 (name "drumstick")
cfac1272 1066 (version "1.0.2")
bf76d780
RW
1067 (source (origin
1068 (method url-fetch)
1069 (uri (string-append "mirror://sourceforge/drumstick/"
1070 version "/drumstick-" version ".tar.bz2"))
1071 (sha256
1072 (base32
cfac1272 1073 "0l47gy9yywrc860db5g3wdqg8yc8qdb2lqq6wvw1dfim5j0vbail"))))
bf76d780
RW
1074 (build-system cmake-build-system)
1075 (arguments
1076 `(#:tests? #f ; no test target
1077 #:configure-flags '("-DLIB_SUFFIX=")
1078 #:phases
1079 (modify-phases %standard-phases
1080 (add-before 'configure 'fix-docbook
1081 (lambda* (#:key inputs #:allow-other-keys)
1082 (substitute* "cmake_admin/CreateManpages.cmake"
1083 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
1084 (string-append (assoc-ref inputs "docbook-xsl")
1085 "/xml/xsl/docbook-xsl-"
1086 ,(package-version docbook-xsl)
1087 "/manpages/docbook.xsl")))
1088 #t)))))
1089 (inputs
ca1cab82
EF
1090 `(("qtbase" ,qtbase)
1091 ("qtsvg" ,qtsvg)
bf76d780
RW
1092 ("alsa-lib" ,alsa-lib)
1093 ("fluidsynth" ,fluidsynth)))
1094 (native-inputs
1095 `(("pkg-config" ,pkg-config)
1096 ("libxslt" ,libxslt) ;for xsltproc
1097 ("docbook-xsl" ,docbook-xsl)
1098 ("doxygen" ,doxygen)))
1099 (home-page "http://drumstick.sourceforge.net/")
1100 (synopsis "C++ MIDI library")
1101 (description
1102 "Drumstick is a set of MIDI libraries using C++/Qt5 idioms and style. It
1103includes a C++ wrapper around the ALSA library sequencer interface. A
1104complementary library provides classes for processing SMF (Standard MIDI
1105files: .MID/.KAR), Cakewalk (.WRK), and Overture (.OVE) file formats. A
1106multiplatform realtime MIDI I/O library is also provided with various output
1107backends, including ALSA, OSS, Network and FluidSynth.")
1108 (license license:gpl2+)))
1109
8e92cfb1
RW
1110(define-public vmpk
1111 (package
1112 (name "vmpk")
fb492b9a 1113 (version "0.6.2a")
8e92cfb1
RW
1114 (source (origin
1115 (method url-fetch)
1116 (uri (string-append "mirror://sourceforge/vmpk/vmpk/"
fb492b9a
RW
1117 (string-drop-right version 1)
1118 "/vmpk-" version ".tar.bz2"))
8e92cfb1
RW
1119 (sha256
1120 (base32
fb492b9a 1121 "0259iikvxnfdiifrh02g8xgcxikrkca4nhd3an8xzx0bd6bk8ifi"))))
8e92cfb1
RW
1122 (build-system cmake-build-system)
1123 (arguments
1124 `(#:tests? #f ; no test target
1125 #:phases
1126 (modify-phases %standard-phases
1127 (add-before 'configure 'fix-docbook
1128 (lambda* (#:key inputs #:allow-other-keys)
1129 (substitute* "cmake_admin/CreateManpages.cmake"
1130 (("http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl")
1131 (string-append (assoc-ref inputs "docbook-xsl")
1132 "/xml/xsl/docbook-xsl-"
1133 ,(package-version docbook-xsl)
1134 "/manpages/docbook.xsl")))
1135 #t)))))
1136 (inputs
1137 `(("drumstick" ,drumstick)
07831f7a
EF
1138 ("qtbase" ,qtbase)
1139 ("qtsvg" ,qtsvg)
1140 ("qttools" ,qttools)
1141 ("qtx11extras" ,qtx11extras)))
8e92cfb1
RW
1142 (native-inputs
1143 `(("libxslt" ,libxslt) ;for xsltproc
1144 ("docbook-xsl" ,docbook-xsl)
1145 ("pkg-config" ,pkg-config)))
1146 (home-page "http://vmpk.sourceforge.net")
1147 (synopsis "Virtual MIDI piano keyboard")
1148 (description
1149 "Virtual MIDI Piano Keyboard is a MIDI events generator and receiver. It
1150doesn't produce any sound by itself, but can be used to drive a MIDI
1151synthesizer (either hardware or software, internal or external). You can use
1152the computer's keyboard to play MIDI notes, and also the mouse. You can use
1153the Virtual MIDI Piano Keyboard to display the played MIDI notes from another
1154instrument or MIDI file player.")
1155 (license license:gpl3+)))
1156
ddfddb0c
RW
1157(define-public zynaddsubfx
1158 (package
1159 (name "zynaddsubfx")
acf2320b 1160 (version "2.5.4")
ddfddb0c
RW
1161 (source (origin
1162 (method url-fetch)
1163 (uri (string-append
1164 "mirror://sourceforge/zynaddsubfx/zynaddsubfx/"
138e7697 1165 version "/zynaddsubfx-" version ".tar.bz2"))
ddfddb0c
RW
1166 (sha256
1167 (base32
acf2320b 1168 "16llaa2wg2gbgjhwp3632b2vx9jvanj4csv7d41k233ms6d1sjq1"))))
ddfddb0c 1169 (build-system cmake-build-system)
00dfc97c
RW
1170 (arguments
1171 `(#:phases
1172 (modify-phases %standard-phases
1173 ;; Move SSE compiler optimization flags from generic target to
1174 ;; athlon64 and core2 targets, because otherwise the build would fail
1175 ;; on non-Intel machines.
1176 (add-after 'unpack 'remove-sse-flags-from-generic-target
1177 (lambda _
1178 (substitute* "src/CMakeLists.txt"
1179 (("-msse -msse2 -mfpmath=sse") "")
1180 (("-march=(athlon64|core2)" flag)
1181 (string-append flag " -msse -msse2 -mfpmath=sse")))
1182 #t)))))
ddfddb0c
RW
1183 (inputs
1184 `(("liblo" ,liblo)
1185 ("ntk" ,ntk)
1186 ("alsa-lib" ,alsa-lib)
1187 ("jack" ,jack-1)
1188 ("fftw" ,fftw)
1189 ("minixml" ,minixml)
1190 ("libxpm" ,libxpm)
1191 ("zlib" ,zlib)))
1192 (native-inputs
1193 `(("pkg-config" ,pkg-config)))
1194 (home-page "http://zynaddsubfx.sf.net/")
1195 (synopsis "Software synthesizer")
1196 (description
1197 "ZynAddSubFX is a feature heavy realtime software synthesizer. It offers
1198three synthesizer engines, multitimbral and polyphonic synths, microtonal
1199capabilities, custom envelopes, effects, etc.")
1200 (license license:gpl2)))
c493679f
RW
1201
1202(define-public yoshimi
1203 (package
1204 (name "yoshimi")
8ddc5d57 1205 (version "1.3.8.2")
c493679f
RW
1206 (source (origin
1207 (method url-fetch)
1208 (uri (string-append "mirror://sourceforge/yoshimi/"
1209 (version-major+minor version)
1210 "/yoshimi-" version ".tar.bz2"))
1211 (sha256
1212 (base32
8ddc5d57 1213 "0wl4ln6v1nkkx56kfah23chyrhga2vi93i82g0s200c4s4184xr8"))))
c493679f
RW
1214 (build-system cmake-build-system)
1215 (arguments
1216 `(#:tests? #f ; there are no tests
1217 #:configure-flags
1218 (list (string-append "-DCMAKE_INSTALL_DATAROOTDIR="
1219 (assoc-ref %outputs "out") "/share"))
1220 #:phases
1221 (modify-phases %standard-phases
1222 (add-before 'configure 'enter-dir
1223 (lambda _ (chdir "src") #t))
1224 ;; Move SSE compiler optimization flags from generic target to
1225 ;; athlon64 and core2 targets, because otherwise the build would fail
1226 ;; on non-Intel machines.
1227 (add-after 'unpack 'remove-sse-flags-from-generic-target
1228 (lambda _
1229 (substitute* "src/CMakeLists.txt"
1230 (("-msse -msse2 -mfpmath=sse") "")
1231 (("-march=(athlon64|core2)" flag)
1232 (string-append flag " -msse -msse2 -mfpmath=sse")))
1233 #t)))))
1234 (inputs
1235 `(("boost" ,boost)
1236 ("fftwf" ,fftwf)
1237 ("alsa-lib" ,alsa-lib)
1238 ("jack" ,jack-1)
1239 ("fontconfig" ,fontconfig)
1240 ("minixml" ,minixml)
1241 ("mesa" ,mesa)
1242 ("fltk" ,fltk)
1243 ("lv2" ,lv2)
1244 ("readline" ,readline)
1245 ("ncurses" ,ncurses)
1246 ("cairo" ,cairo)
1247 ("zlib" ,zlib)))
1248 (native-inputs
1249 `(("pkg-config" ,pkg-config)))
1250 (home-page "http://yoshimi.sourceforge.net/")
1251 (synopsis "Multi-paradigm software synthesizer")
1252 (description
1253 "Yoshimi is a fork of ZynAddSubFX, a feature heavy realtime software
1254synthesizer. It offers three synthesizer engines, multitimbral and polyphonic
1255synths, microtonal capabilities, custom envelopes, effects, etc. Yoshimi
1256improves on support for JACK features, such as JACK MIDI.")
1257 (license license:gpl2)))
658212eb
LF
1258
1259(define-public cursynth
1260 (package
1261 (name "cursynth")
1262 (version "1.5")
1263 (source
1264 (origin
1265 (method url-fetch)
1266 (uri (string-append "mirror://gnu/cursynth/cursynth-"
1267 version ".tar.gz"))
1268 (sha256
1269 (base32 "1dhphsya41rv8z6yqcv9l6fwbslsds4zh1y56zizi39nd996d40v"))
fc1adab1 1270 (patches (search-patches "cursynth-wave-rand.patch"))))
658212eb
LF
1271 (build-system gnu-build-system)
1272 (native-inputs `(("pkg-config" ,pkg-config)))
1273 ;; TODO: See https://github.com/iyoko/cursynth/issues/4 which currently
1274 ;; prevents us from using pulseaudio
1275 (inputs `(("ncurses" ,ncurses)
1276 ("alsa" ,alsa-lib)))
1277 (home-page "http://www.gnu.org/software/cursynth")
1278 (synopsis "Polyphonic and MIDI subtractive music synthesizer using curses")
1279 (description "GNU cursynth is a polyphonic synthesizer that runs
1280graphically in the terminal. It is built on a full-featured subtractive
1281synthesis engine. Notes and parameter changes may be entered via MIDI or the
1282computer's keyboard.")
1283 (license license:gpl3+)))
a763ce7d
RW
1284
1285(define-public qtractor
1286 (package
1287 (name "qtractor")
457b5eb6 1288 (version "0.7.7")
a763ce7d
RW
1289 (source (origin
1290 (method url-fetch)
1291 (uri (string-append "http://downloads.sourceforge.net/qtractor/"
1292 "qtractor-" version ".tar.gz"))
1293 (sha256
1294 (base32
457b5eb6 1295 "0q8kvy1ynlg64v1w7jxix1rpq0lp2ixgb2y8cbbwxd2b28r3r2vl"))))
a763ce7d
RW
1296 (build-system gnu-build-system)
1297 (arguments `(#:tests? #f)) ; no "check" target
1298 (inputs
1299 `(("qt" ,qt)
1300 ("alsa-lib" ,alsa-lib)
1301 ("jack" ,jack-1)
1302 ("libsndfile" ,libsndfile)
1303 ("ladspa" ,ladspa)
1304 ("lv2" ,lv2)
1305 ("lilv" ,lilv)
1306 ("suil" ,suil)
1307 ("libsamplerate" ,libsamplerate)
1308 ("libvorbis" ,libvorbis)
1309 ("libmad" ,libmad)
1310 ("rubberband" ,rubberband)
1311 ("liblo" ,liblo)
1312 ("zlib" ,zlib)))
1313 (native-inputs
1314 `(("pkg-config" ,pkg-config)))
1315 (home-page "http://qtractor.sourceforge.net/")
1316 (synopsis "Audio/MIDI multi-track sequencer")
1317 (description
1318 "Qtractor is an Audio/MIDI multi-track sequencer application. It uses
1319JACK for audio and ALSA sequencer for MIDI as multimedia infrastructures and
1320follows a traditional multi-track tape recorder control paradigm.")
1321 (license license:gpl2+)))
aa0edd3f
AM
1322
1323(define-public pianobar
1324 (package
1325 (name "pianobar")
1326 (version "2015.11.22")
1327 (source (origin
1328 (method url-fetch)
1329 (uri (string-append "https://github.com/PromyLOPh/"
1330 name "/archive/" version ".tar.gz"))
1331 (file-name (string-append name "-" version ".tar.gz"))
1332 (sha256
1333 (base32
1334 "022df19bhxqvkhy0qy21xahba5s1fm17b13y0p9p9dnf2yl44wfv"))))
1335 (build-system gnu-build-system)
1336 (arguments
1337 `(#:tests? #f ; no tests
1338 #:make-flags (list "CC=gcc" "CFLAGS=-std=c99"
1339 (string-append "PREFIX=" %output))
1340 #:phases (modify-phases %standard-phases
1341 (delete 'configure))))
1342 (inputs
1343 `(("ao" ,ao)
1344 ("curl" ,curl)
1345 ("libgcrypt" ,libgcrypt)
1346 ("json-c" ,json-c)
1347 ("ffmpeg" ,ffmpeg)))
1348 (native-inputs
1349 `(("pkg-config" ,pkg-config)))
1350 (home-page "http://6xq.net/projects/pianobar/")
1351 (synopsis "Console-based pandora.com player")
1352 (description "pianobar is a console-based music player for the
1353personalized online radio pandora.com. It has configurable keys for playing
1354and managing stations, can be controlled remotely via fifo, and can run
1355event-based scripts for scrobbling, notifications, etc.")
1356 (license license:expat)))
3f7a182d
LF
1357
1358(define-public python-mutagen
1359 (package
1360 (name "python-mutagen")
1361 (version "1.31")
1362 (source (origin
1363 (method url-fetch)
1364 (uri (pypi-uri "mutagen" version))
1365 (sha256
1366 (base32
1367 "16fnnhspniac2i7qswxafawsh2x2a803hmc6bn9k1zl5fxq1380a"))))
1368 (build-system python-build-system)
1369 (home-page "https://bitbucket.org/lazka/mutagen")
1370 (synopsis "Read and write audio tags")
1371 (description "Mutagen is a Python module to handle audio metadata. It
1372supports ASF, FLAC, M4A, Monkey’s Audio, MP3, Musepack, Ogg FLAC, Ogg Speex, Ogg
1373Theora, Ogg Vorbis, True Audio, WavPack and OptimFROG audio files. All versions
1374of ID3v2 are supported, and all standard ID3v2.4 frames are parsed. It can read
1375Xing headers to accurately calculate the bitrate and length of MP3s. ID3 and
1376APEv2 tags can be edited regardless of audio format. It can also manipulate Ogg
1377streams on an individual packet/page level.")
1378 (license license:gpl2))) ; "later version" never mentioned
1379
1380(define-public python2-mutagen
1381 (package-with-python2 python-mutagen))
8975de88
LF
1382
1383(define-public python-musicbrainzngs
1384 (package
1385 (name "python-musicbrainzngs")
1386 (version "0.5")
1387 (source (origin
1388 (method url-fetch)
1389 (uri (pypi-uri "musicbrainzngs" version))
1390 (sha256
1391 (base32
1392 "12f48llmdf5rkiqxcb70k2k1dmhm8byq0ifazvlrca8dfnmqh4r8"))))
1393 (build-system python-build-system)
1394 (home-page "https://python-musicbrainzngs.readthedocs.org/")
1395 (synopsis "Python bindings for MusicBrainz NGS webservice")
1396 (description "Musicbrainzngs implements Python bindings of the MusicBrainz
1397web service. This library can be used to retrieve music metadata from the
1398MusicBrainz database.")
1399 ;; 'musicbrainzngs/compat.py' is ISC licensed.
1400 (license (list license:bsd-2 license:isc))))
1401
1402(define-public python2-musicbrainzngs
1403 (package-with-python2 python-musicbrainzngs))
e8fee648
LF
1404
1405(define-public python-pyechonest
1406 (package
1407 (name "python-pyechonest")
1408 (version "9.0.0")
1409 (source (origin
1410 (method url-fetch)
1411 (uri (pypi-uri "pyechonest" version))
1412 (sha256
1413 (base32
1414 "1584nira3rkiman9dm81kdshihmkj21s8navndz2l8spnjwb790x"))))
1415 (build-system python-build-system)
1416 (home-page "https://github.com/echonest/pyechonest")
1417 (synopsis "Python interface to The Echo Nest APIs")
d3e3468f
LF
1418 (description "Pyechonest is a Python library for the Echo Nest API. With
1419Pyechonest you have Python access to the entire set of API methods including:
e8fee648
LF
1420
1421@enumerate
1422@item artist - search for artists by name, description, or attribute, and get
1423back detailed information about any artist including audio, similar artists,
1424blogs, familiarity, hotttnesss, news, reviews, urls and video.
1425@item song - search songs by artist, title, description, or attribute (tempo,
1426duration, etc) and get detailed information back about each song, such as
1427hotttnesss, audio_summary, or tracks.
1428@item track - upload a track to the Echo Nest and receive summary information
1429about the track including key, duration, mode, tempo, time signature along with
1430detailed track info including timbre, pitch, rhythm and loudness information.
1431@end enumerate\n")
1432 (license license:bsd-3)
1433 (properties `((python2-variant . ,(delay python2-pyechonest))))))
1434
1435(define-public python2-pyechonest
1436 (package (inherit (package-with-python2
1437 (strip-python2-variant python-pyechonest)))
1438 (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
acd7351f
LF
1439
1440(define-public python-pylast
1441 (package
1442 (name "python-pylast")
1443 (version "1.5.1")
1444 (source (origin
1445 (method url-fetch)
1446 (uri (pypi-uri "pylast" version))
1447 (sha256
1448 (base32
1449 "10znd9xr1vs2ix519jkz3ccm90zciaddcdr2w2wrrh2jyy3bc59a"))))
1450 (build-system python-build-system)
1451 (native-inputs
1452 `(("python-coverage" ,python-coverage)
1453 ("python-mock" ,python-mock)
1454 ("python-pep8" ,python-pep8)
1455 ("python-pytest" ,python-pytest)
1456 ("python-pyflakes" ,python-pyflakes)
1457 ("python-pyyaml" ,python-pyyaml)))
1458 (propagated-inputs
1459 `(("python-six" ,python-six)))
1460 (home-page "https://github.com/pylast/pylast")
1461 (synopsis "Python interface to Last.fm and Libre.fm")
1462 (description "A Python interface to Last.fm and other API-compatible
1463websites such as Libre.fm.")
1464 (license license:asl2.0)
1465 (properties `((python2-variant . ,(delay python2-pylast))))))
1466
1467(define-public python2-pylast
1468 (let ((pylast (package-with-python2
1469 (strip-python2-variant python-pylast))))
1470 (package (inherit pylast)
1471 (native-inputs
1472 `(("python2-setuptools" ,python2-setuptools)
1473 ,@(package-native-inputs pylast))))))
3bf429af
LF
1474
1475(define-public beets
1476 (package
1477 (name "beets")
88c8d72f 1478 (version "1.3.18")
3bf429af
LF
1479 (source (origin
1480 (method url-fetch)
88c8d72f
LF
1481 (uri (string-append
1482 "https://pypi.python.org/packages/"
1483 "14/6f/c9c79c5339ab3ecced265ca18adbf5bae3d4058bae737b6164d738fb4d2c/"
1484 name "-" version ".tar.gz"))
1485 (patches (search-patches "beets-image-test-failure.patch"))
3bf429af
LF
1486 (sha256
1487 (base32
88c8d72f 1488 "09pgyywa5llbc36y0lrr21ywgsp8m2zx6p8ncf8hxik28knd5kld"))))
3bf429af
LF
1489 (build-system python-build-system)
1490 (arguments
1491 `(#:python ,python-2 ; only Python 2 is supported
1492 #:phases
1493 (modify-phases %standard-phases
1494 (add-after 'unpack 'set-HOME
36c2c8c8
LF
1495 (lambda _ (setenv "HOME" (string-append (getcwd) "/tmp"))))
1496 (replace 'check
1497 (lambda _ (zero? (system* "nosetests" "-v")))))))
3bf429af
LF
1498 (native-inputs
1499 `(("python2-beautifulsoup4" ,python2-beautifulsoup4)
1500 ("python2-flask" ,python2-flask)
1501 ("python2-setuptools" ,python2-setuptools)
1502 ("python2-mock" ,python2-mock)
1503 ("python2-mpd2" ,python2-mpd2)
36c2c8c8 1504 ("python2-nose" ,python2-nose)
3bf429af
LF
1505 ("python2-pathlib" ,python2-pathlib)
1506 ("python2-pyxdg" ,python2-pyxdg)
1507 ("python2-pyechonest" ,python2-pyechonest)
1508 ("python2-pylast" ,python2-pylast)
1509 ("python2-rarfile" ,python2-rarfile)
1510 ("python2-responses" ,python2-responses)))
1511 ;; TODO: Install optional plugins and dependencies.
b3470031 1512 (inputs
3bf429af
LF
1513 `(("python2-enum34" ,python2-enum34)
1514 ("python2-jellyfish" ,python2-jellyfish)
1515 ("python2-munkres" ,python2-munkres)
1516 ("python2-musicbrainzngs" ,python2-musicbrainzngs)
1517 ("python2-mutagen" ,python2-mutagen)
1518 ("python2-pyyaml" ,python2-pyyaml)
1519 ("python2-unidecode" ,python2-unidecode)))
1520 (home-page "http://beets.io")
1521 (synopsis "Music organizer")
1522 (description "The purpose of beets is to get your music collection right
1523once and for all. It catalogs your collection, automatically improving its
1524metadata as it goes using the MusicBrainz database. Then it provides a variety
1525of tools for manipulating and accessing your music.")
1526 (license license:expat)))
21d18113
KY
1527
1528(define-public milkytracker
1529 (package
1530 (name "milkytracker")
1531 (version "0.90.86")
1532 (source (origin
1533 (method url-fetch)
1534 (uri (string-append "http://milkytracker.org/files/"
1535 name "-" version ".tar.bz2"))
1536 (sha256
1537 (base32
1538 "1v9vp8vi24lkagfpr92c128whvakwgrm9pq2zf6ijpl5sh7014zb"))))
1539 (build-system gnu-build-system)
1540 (arguments
1541 `(#:make-flags '("CXXFLAGS=-lasound")))
1542 (inputs
1543 `(("alsa-lib" ,alsa-lib)
1544 ("jack" ,jack-1)
1545 ("sdl" ,sdl)
1546 ("zlib" ,zlib)))
1547 (native-inputs
1548 `(("pkg-config" ,pkg-config)))
1549 (synopsis "Music tracker for working with .MOD/.XM module files")
1550 (description "MilkyTracker is a music application for creating .MOD and .XM
1551module files. It attempts to recreate the module replay and user experience of
1552the popular DOS program Fasttracker II, with special playback modes available
1553for improved Amiga ProTracker 2/3 compatibility.")
1554 (home-page "http://milkytracker.org/")
1555 ;; 'src/milkyplay' is under Modified BSD, the rest is under GPL3 or later.
1556 (license (list license:bsd-3 license:gpl3+))))
13416a10
KY
1557
1558(define-public moc
1559 (package
1560 (name "moc")
1561 (version "2.5.1")
1562 (source (origin
1563 (method url-fetch)
1564 (uri (string-append "http://ftp.daper.net/pub/soft/"
1565 name "/stable/"
1566 name "-" version ".tar.bz2"))
1567 (sha256
1568 (base32
1569 "1wn4za08z64bhsgfhr9c0crfyvy8c3b6a337wx7gz19am5srqh8v"))))
1570 (build-system gnu-build-system)
1571 (inputs
1572 `(("alsa-lib" ,alsa-lib)
1573 ("curl" ,curl)
1574 ("faad2" ,faad2)
1575 ("ffmpeg" ,ffmpeg)
1576 ("file" ,file)
1577 ("jack" ,jack-1)
1578 ("libid3tag" ,libid3tag)
1579 ("libltdl" ,libltdl)
1580 ("libmodplug" ,libmodplug)
1581 ("libmpcdec" ,libmpcdec)
1582 ("libmad" ,libmad)
1583 ("ncurses" ,ncurses)
1584 ("openssl" ,openssl)
1585 ("sasl" ,cyrus-sasl)
1586 ("speex" ,speex)
1587 ("taglib" ,taglib)
1588 ("wavpack" ,wavpack)
1589 ("zlib" ,zlib)))
1590 (native-inputs
1591 `(("pkg-config" ,pkg-config)))
1592 (synopsis "Console audio player designed to be powerful and easy to use")
1593 (description
1594 "Music on Console is a console audio player that supports many file
1595formats, including most audio formats recognized by FFMpeg.")
1596 (home-page "http://moc.daper.net")
1597 (license license:gpl2+)))
6d3ef286
JF
1598
1599(define-public midicsv
1600 (package
1601 (name "midicsv")
1602 (version "1.1")
1603 (source (origin
1604 (method url-fetch)
1605 (uri (string-append "http://www.fourmilab.ch/webtools/midicsv/"
1606 name "-" version ".tar.gz"))
1607 (sha256
1608 (base32
1609 "1vvhk2nf9ilfw0wchmxy8l13hbw9cnpz079nsx5srsy4nnd78nkw"))))
1610 (build-system gnu-build-system)
1611 (arguments
1612 `(#:phases (modify-phases %standard-phases (delete 'configure))
1613 #:make-flags (list "CC=gcc" (string-append "INSTALL_DEST=" %output))))
1614 (synopsis "Convert MIDI files to and from CSV")
1615 (description
1616 "Midicsv reads a standard MIDI file and decodes it into a comma-separated
1617value file (CSV), which preserves all the information in the MIDI file. The
1618ASCII CSV file may be loaded into a spreadsheet or database application, or
1619processed by a program to transform the MIDI data (for example, to key
1620transpose a composition or extract a track from a multi-track sequence). A
1621CSV file in the format created by midicsv may be converted back into a
1622standard MIDI file with the csvmidi program.")
1623 (home-page "http://www.fourmilab.ch/webtools/midicsv/")
1624 (license license:public-domain)))