GNU logs - #73090, boring messages


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#73090] [PATCH] gnu: Add neural-amp-modeler-core.
Resent-From: Antero Mejr <mail@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Sat, 07 Sep 2024 05:02:02 +0000
Resent-Message-ID: <handler.73090.B.17256853044392 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 73090
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 73090 <at> debbugs.gnu.org
X-Debbugs-Original-To: guix-patches@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.17256853044392
          (code B ref -1); Sat, 07 Sep 2024 05:02:02 +0000
Received: (at submit) by debbugs.gnu.org; 7 Sep 2024 05:01:44 +0000
Received: from localhost ([127.0.0.1]:54541 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1smnZv-00018l-L6
	for submit <at> debbugs.gnu.org; Sat, 07 Sep 2024 01:01:44 -0400
Received: from lists.gnu.org ([209.51.188.17]:36374)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1smnZu-00018c-0R
 for submit <at> debbugs.gnu.org; Sat, 07 Sep 2024 01:01:42 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>) id 1smnZt-00075m-AX
 for guix-patches@HIDDEN; Sat, 07 Sep 2024 01:01:41 -0400
Received: from mout-p-201.mailbox.org ([2001:67c:2050:0:465::201])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>) id 1smnZr-0006ZQ-Cb
 for guix-patches@HIDDEN; Sat, 07 Sep 2024 01:01:41 -0400
Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4X11Cd74YTz9scR
 for <guix-patches@HIDDEN>; Sat,  7 Sep 2024 07:01:33 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antr.me; s=MBO0001;
 t=1725685294;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=BAGwb63qCSQbr72QGBv07QyGJ4qbshiOj0B6/NqC8/g=;
 b=v8GIjqYCkxylq7HxQre6BYJz6zT1aoML3JiB/RfGez4GTmyJ83ODET+dnN5DdpnK6iGCUn
 d3TlQq8Fz+vh1DAJ6CxYZoUZwoVP50GaEt5EDEDsOcOgfmyFs9S9QUt15UDf+P1rdxm62W
 i3v3euG774njxEuXufUFmNDcGt1USy1LfMOPKs+GdrOffxjRBy03r2kTz6Af0EhiQUlYhy
 Gqu50TrAG88k5Zojves9gXC/cmC78l+VTYlfUjr2tNJinWQV3YBGUW0bU0Lcjd6e2O0oqA
 dFtk9WuMb1y4J0vR9aY21GBhoRsXaGJLG8WM6fP25hWC7AkYZTKQPCdQVbtjjA==
From: Antero Mejr <mail@HIDDEN>
Date: Sat, 07 Sep 2024 05:01:31 +0000
Message-ID: <87seuc9hw4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2001:67c:2050:0:465::201;
 envelope-from=mail@HIDDEN; helo=mout-p-201.mailbox.org
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


* gnu/packages/music.scm (neural-amp-modeler-core): New variable.

Change-Id: Ia93c978dba936300e3d0493ee5764fc560a1cd3a
---
 gnu/local.mk                                  |  1 +
 gnu/packages/music.scm                        | 57 +++++++++++++++++++
 ...l-amp-modeler-core-fix-eigen-methods.patch | 15 +++++
 3 files changed, 73 insertions(+)
 create mode 100644 gnu/packages/patches/neural-amp-modeler-core-fix-eigen-methods.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cf42e2b6da..5adea82be4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1794,6 +1794,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/netsurf-system-utf8proc.patch		\
   %D%/packages/patches/netsurf-y2038-tests.patch		\
   %D%/packages/patches/netsurf-longer-test-timeout.patch	\
+  %D%/packages/patches/neural-amp-modeler-core-fix-eigen-methods.patch	\
   %D%/packages/patches/nhc98-c-update.patch			\
   %D%/packages/patches/nix-dont-build-html-doc.diff		\
   %D%/packages/patches/nfs4-acl-tools-0.3.7-fixpaths.patch	\
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index bc2d7f62f1..e85d917222 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -7986,6 +7986,63 @@ (define-public le-biniou
 visuals based on audio performances or existing tracks.")
     (license license:gpl2+)))
 
+(define-public neural-amp-modeler-core
+  (package
+    (name "neural-amp-modeler-core")
+    (version "0.1.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/sdatkinson/NeuralAmpModelerCore")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "05gfva1qkcq7n7vhvksv1jj5ciag4dp9bbn22svy2xys85mxg0xv"))
+              (patches (search-patches
+                        "neural-amp-modeler-core-fix-eigen-methods.patch"))
+              (modules '((guix build utils)))
+              (snippet #~(begin
+                           (delete-file-recursively "Dependencies")
+                           (substitute* (find-files "NAM" "\\.(h|cpp)$")
+                             (("#include \"Eigen/")
+                              "#include \"eigen3/Eigen/")
+                             (("#include <Eigen/")
+                              "#include <eigen3/Eigen/")
+                             (("#include \"json.hpp\"")
+                              "#include <nlohmann/json.hpp>"))
+                           ;; Remove Clang flags
+                           (substitute* "CMakeLists.txt"
+                             (("-stdlib=libc\\+\\+")
+                              "")
+                             (("add_subdirectory\\(tools\\)")
+                               "\
+file(GLOB_RECURSE NAM_SOURCES ./NAM/*.cpp ./NAM/*.c ./NAM/*.h)
+add_library(neural_amp_modeler SHARED ${NAM_SOURCES})"))))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:tests? #f ;no tests
+           #:phases #~(modify-phases %standard-phases
+                        (replace 'install
+                          (lambda _
+                            (let ((inc (string-append #$output
+                                                      "/include/NAM"))
+                                  (lib (string-append #$output "/lib")))
+                              (for-each (lambda (file)
+                                          (install-file file lib))
+                                        (find-files "." "\\.so"))
+                              (with-directory-excursion "../source/NAM"
+                                (for-each (lambda (file)
+                                            (install-file file inc))
+                                          (find-files "." "\\.h")))))))))
+    (inputs (list eigen nlohmann-json))
+    (home-page "https://github.com/sdatkinson/NeuralAmpModelerCore")
+    (synopsis "DSP library for NeuralAmpModeler plugins")
+    (description
+     "This package provides the core DSP library for @acronym{NAM, Neural Amp
+Modeler} plugins.")
+    (license license:expat)))
+
 ;;;
 ;;; 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
diff --git a/gnu/packages/patches/neural-amp-modeler-core-fix-eigen-methods.patch b/gnu/packages/patches/neural-amp-modeler-core-fix-eigen-methods.patch
new file mode 100644
index 0000000000..bcac428a2a
--- /dev/null
+++ b/gnu/packages/patches/neural-amp-modeler-core-fix-eigen-methods.patch
@@ -0,0 +1,15 @@
+Author: Antero Mejr <mail@HIDDEN>
+
+diff --git a/NAM/lstm.h b/NAM/lstm.h
+index 6b02b18..8da207f 100644
+--- a/NAM/lstm.h
++++ b/NAM/lstm.h
+@@ -23,7 +23,7 @@ class LSTMCell
+ {
+ public:
+   LSTMCell(const int input_size, const int hidden_size, std::vector<float>::iterator& weights);
+-  Eigen::VectorXf get_hidden_state() const { return this->_xh(Eigen::placeholders::lastN(this->_get_hidden_size())); };
++  Eigen::VectorXf get_hidden_state() const { return this->_xh.tail(this->_get_hidden_size()); };
+   void process_(const Eigen::VectorXf& x);
+ 
+ private:
-- 
2.45.2





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Antero Mejr <mail@HIDDEN>
Subject: bug#73090: Acknowledgement ([PATCH] gnu: Add neural-amp-modeler-core.)
Message-ID: <handler.73090.B.17256853044392.ack <at> debbugs.gnu.org>
References: <87seuc9hw4.fsf@HIDDEN>
X-Gnu-PR-Message: ack 73090
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 73090 <at> debbugs.gnu.org
Date: Sat, 07 Sep 2024 05:02:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 73090 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
73090: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D73090
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems



Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.