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