From a37d658780866fb72148dac40ac7b7ad6a6ec034 Mon Sep 17 00:00:00 2001
From: Sughosha <sughosha@proton.me>
Date: Sun, 16 Oct 2022 16:04:58 +0200
Subject: [PATCH 4/4] gnu: Add bespokesynth
* gnu/packages/music.scm (bespokesynth): New variable.
(mts-esp): New variable.
---
gnu/packages/music.scm | 89 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
@@ -1974,6 +1974,96 @@ (define-public readerwriterqueue
producing).")
(license license:bsd-2)))
+(define mts-esp
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ODDSound/MTS-ESP")
+ (commit "3eb56f2452244b343ce738efd067d1082b67f9b4")))
+ (sha256
+ (base32
+ "0qbyspn545cn7jp2j01vxv191nibdsiq12x2xdwlcz3npsflrpxh"))))
+
+(define-public bespokesynth
+ ;; Commit based on the current version of installed JUCE
+ (let ((commit "616ad67c9c7b693aeb4a5cb19d8811baff99854c")
+ (revision "162"))
+ (package
+ (name "bespokesynth")
+ (version (git-version "1.1.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/BespokeSynth/BespokeSynth")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (patches (search-patches
+ "bespokesynth-1.1.0-devendor_ableton_link.patch"))
+ (sha256
+ (base32
+ "1h8cbgsls1qxk3c7wkd8grrvs7bnj6ijhrixxrfnv23198l9gd5q"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:configure-flags #~(list "-DBESPOKE_SYSTEM_ABLETONLINK=ON"
+ "-DBESPOKE_SYSTEM_JSONCPP=ON"
+ "-DBESPOKE_SYSTEM_JUCE=ON"
+ "-DBESPOKE_SYSTEM_PYBIND11=ON"
+ "-DBESPOKE_SYSTEM_TUNING_LIBRARY=ON")
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'use-installed-modules
+ (lambda _
+ (let ((mts "libs/oddsound-mts/MTS-ESP"))
+ (rmdir mts)
+ (symlink #$mts-esp mts)
+ (substitute* "libs/CMakeLists.txt"
+ (("add_subdirectory\\(readerwriterqueue EXCLUDE_FROM_ALL\\)")
+ "#"))
+ (substitute* "Source/CMakeLists.txt"
+ (("readerwriterqueue")
+ "#"))
+ (substitute* "Source/NoteOutputQueue.h"
+ (("readerwriterqueue\\.h")
+ "readerwriterqueue/readerwriterqueue.h"))))))))
+ (native-inputs (list ableton-link
+ pkg-config
+ juce
+ libxrandr
+ pybind11
+ readerwriterqueue
+ tuning-library
+ xcb-util
+ xcb-util-keysyms
+ xkbutils))
+ (inputs (list alsa-lib
+ curl
+ gtk+
+ freetype
+ hicolor-icon-theme
+ jack-1
+ jsoncpp
+ libusb
+ libxcb
+ libxcursor
+ libxinerama
+ libxkbfile
+ mesa
+ python
+ webkitgtk-with-libsoup2
+ xcb-util-cursor))
+ (home-page "http://bespokesynth.com")
+ (synopsis "Modular digital audio workstation")
+ (description
+ "Beaspokesynth is a modular synth.
+The features include:
+@itemize
+@item Live-patchable environment
+@item VST hosting
+@item Python livecoding
+@item MIDI controller mapping
+@end itemize")
+ (license license:gpl3+))))
+
(define-public bsequencer
(package
(name "bsequencer")
--
2.38.0