Subject: [PATCH] gnu: Add samplebrain.
From: Antero Mejr <[email-masked]>
To: [email-masked]
Cc: Antero Mejr <[email-masked]>
Date: Thu, 27 Oct 2022 01:07:49 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/music.scm (samplebrain): New variable.
---
 gnu/packages/music.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 72299f13f1..d1d56f149f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -6899,6 +6899,37 @@ (define-public orca-music
       (home-page "https://100r.co/site/orca.html")
       (license license:expat))))
 
+(define-public samplebrain
+  (package
+    (name "samplebrain")
+    (version "0.18.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/then-try-this/samplebrain")
+                    (commit (string-append version "_release"))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "14ynmnyg0mmrl7z7241yc5wxxsrjyqmzs1ds1kh8shkach8j05rx"))))
+    (build-system qt-build-system)
+    (arguments
+     (list #:tests? #f ;no tests
+           #:phases #~(modify-phases %standard-phases
+                        (replace 'configure
+                          (lambda _
+                            (substitute* "samplebrain.pro"
+                              (("\\/usr") #$output))
+                            (invoke "qmake"))))))
+    (inputs (list fftw liblo libsndfile portaudio))
+    (home-page "https://thentrythis.org/projects/samplebrain/")
+    (synopsis "Sample mashing synthesizer designed by Aphex Twin")
+    (description "Samplebrain chops samples up into a 'brain' of interconnected
+small sections called blocks which are connected into a network by similarity.
+It processes a target sample, chopping it up into blocks in the same way, and
+tries to match each block with one in its brain to play in realtime.")
+    (license license:gpl2)))
+
 ;;;
 ;;; Avoid adding new packages to the end of this file. To reduce the chances
 ;;; of a merge conflict, place them above by existing packages with similar
-- 
2.37.3