[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#48746] [PATCH v2 3/3] gnu: Add audio-to-midi.
From: |
Leo Prikler |
Subject: |
[bug#48746] [PATCH v2 3/3] gnu: Add audio-to-midi. |
Date: |
Mon, 31 May 2021 15:35:30 +0200 |
* gnu/packages/audio.scm (audio-to-midi): New variable.
---
gnu/packages/audio.scm | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index d348c52e43..efde641252 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2478,6 +2478,46 @@ CFFI and NumPy.")
files.")
(license license:expat)))
+(define-public audio-to-midi
+ (package
+ (name "audio-to-midi")
+ (version "2020.7")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/NFJones/audio-to-midi")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "12wf17abn3psbsg2r2lk0xdnk8n5cd5rrvjlpxjnjfhd09n7qqgm"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-cffi" ,python-cffi)
+ ("python-cython" ,python-cython)
+ ("python-numpy" ,python-numpy)
+ ("python-progressbar2" ,python-progressbar2)
+ ("python-pycparser" ,python-pycparser)
+ ("python-python3-midi" ,python-python3-midi)
+ ("python-soundfile" ,python-soundfile)))
+ (native-inputs
+ `(("libsndfile" ,libsndfile)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-versions
+ (lambda _
+ (substitute* "requirements.txt" (("==") ">=")))))))
+ (home-page "https://github.com/NFJones/audio-to-midi")
+ (synopsis "Convert audio to multichannel MIDI.")
+ (description "@command{audio-to-midi} converts audio files to multichannel
+MIDI files. It accomplishes this by performing FFTs on all channels of the
+audio data at user-specified time steps. It then separates the resulting
+frequency analysis into equivalence classes which correspond to the twelve tone
+scale; the volume of each class being the average volume of its constituent
+frequencies. This data is then formatted to MIDI and written to disk.")
+ (license license:expat)))
+
(define-public lilv
(package
(name "lilv")
--
2.31.1