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