unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH]: add freepats and timidity
@ 2015-02-19 18:33 Ricardo Wurmus
  2015-02-19 19:47 ` Andreas Enge
  2015-02-19 20:03 ` Andreas Enge
  0 siblings, 2 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2015-02-19 18:33 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

Hi Guix,

attached are two patches: one for freepats and another for the MIDI
player TiMidity++.  TiMidity++ comes with a simple configuration file
referencing the freepats configuration, so it's usable out of the box.

~~ Ricardo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-Freepats.patch --]
[-- Type: text/x-patch, Size: 2961 bytes --]

From b9e2401e7447f5c777e50cf00a360e2f7795df92 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Thu, 19 Feb 2015 16:56:39 +0100
Subject: [PATCH 1/2] gnu: Add Freepats.

* gnu/packages/audio.scm (freepats): New variable.
---
 gnu/packages/audio.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 7d77a37..4bfc92e 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -23,9 +23,12 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system waf)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages glib)
@@ -190,6 +193,45 @@ bass section with five drawbars.  A standalone JACK application and LV2
 plugins are provided.")
     (license license:gpl2)))
 
+(define-public freepats
+  (package
+    (name "freepats")
+    (version "20060219")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://freepats.zenvoid.org/freepats-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32
+                "12iw36rd94zirll96cd5k0va7p5hxmf2shvjlhzihcmjaw8flq82"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils))
+                   (let ((out (string-append %output "/share")))
+                     (setenv "PATH" (string-append
+                                     (assoc-ref %build-inputs "bzip2") "/bin:"
+                                     (assoc-ref %build-inputs "tar") "/bin"))
+                     (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
+                     (chdir "freepats")
+                     ;; Use absolute pattern references
+                     (substitute* "freepats.cfg"
+                       (("Tone_000") (string-append out "/Tone_000"))
+                       (("Drum_000") (string-append out "/Drum_000")))
+                     (mkdir-p out)
+                     (copy-recursively "." out)))))
+    (native-inputs
+     `(("tar" ,tar)
+       ("bzip2" ,bzip2)))
+    (home-page "http://freepats.zenvoid.org")
+    (synopsis "GUS compatible patches for MIDI players")
+    (description
+     "FreePats is a project to create a free and open set of GUS compatible
+patches that can be used with softsynths such as Timidity and WildMidi.")
+    ;; GPLv2+ with exception for compositions using these patches.
+    (license license:gpl2+)))
+
 (define-public jack-1
   (package
     (name "jack")
-- 
2.1.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-TiMidity.patch --]
[-- Type: text/x-patch, Size: 2967 bytes --]

From 0aaf1401098e78d656fd8836246ce894acdf4784 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Thu, 19 Feb 2015 16:57:33 +0100
Subject: [PATCH 2/2] gnu: Add TiMidity++.

* gnu/packages/audio.scm (timidity++): New variable.
---
 gnu/packages/audio.scm | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 4bfc92e..40969ce 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -35,6 +35,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages tcl)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages mp3) ;taglib
   #:use-module (gnu packages perl)
@@ -654,6 +655,56 @@ that toolkit will work in all hosts that use Suil automatically.
 Suil currently supports every combination of Gtk 2, Qt 4, and X11.")
     (license license:isc)))
 
+(define-public timidity++
+  (package
+    (name "timidity++")
+    (version "2.14.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://sourceforge/timidity/TiMidity++-"
+                    version ".tar.bz2"))
+              (sha256
+               (base32
+                "0xk41w4qbk23z1fvqdyfblbz10mmxsllw0svxzjw5sa9y11vczzr"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:configure-flags '("--enable-audio=alsa,flac,jack,ao,vorbis,speex")
+       #:phases
+       (alist-cons-after
+        'install 'install-config
+        (lambda _
+          (let ((out (string-append (assoc-ref %outputs "out")
+                                    "/share/timidity")))
+            (mkdir-p out)
+            (call-with-output-file
+                (string-append out "/timidity.cfg")
+              (lambda (port)
+                (format port (string-append "source "
+                                            (assoc-ref %build-inputs "freepats")
+                                            "/share/freepats.cfg"))))))
+        %standard-phases)))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("ao" ,ao)
+       ("flac" ,flac)
+       ("jack" ,jack-1)
+       ("libogg" ,libogg)
+       ("speex" ,speex)
+       ("tk" ,tk)
+       ("freepats" ,freepats)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://timidity.sourceforge.net/")
+    (synopsis "Software synthesizer for playing MIDI files")
+    (description
+     "TiMidity++ is a software synthesizer.  It can play MIDI files by
+converting them into PCM waveform data; give it a MIDI data along with digital
+instrument data files, then it synthesizes them in real-time, and plays.  It
+can not only play sounds, but also can save the generated waveforms into hard
+disks as various audio file formats.")
+    (license license:gpl2+)))
+
 (define-public vamp
   (package
     (name "vamp")
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-02-24 22:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-19 18:33 [PATCH]: add freepats and timidity Ricardo Wurmus
2015-02-19 19:47 ` Andreas Enge
2015-02-19 20:03   ` Ricardo Wurmus
2015-02-19 20:35     ` Andreas Enge
2015-02-19 21:09       ` Ricardo Wurmus
2015-02-19 21:20         ` Andreas Enge
2015-02-22 10:27           ` Ricardo Wurmus
2015-02-19 20:03 ` Andreas Enge
2015-02-19 20:10   ` Ricardo Wurmus
2015-02-24 22:17   ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).