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