summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLeo Prikler <leo.prikler@student.tugraz.at>2021-05-30 18:07:06 +0200
committerLeo Prikler <leo.prikler@student.tugraz.at>2021-06-22 18:34:38 +0200
commitf356c71ade3f3d45c806d3a84eecefbfbecd526f (patch)
tree05aeeebc8fe8036a0c5816ab218e4c6bfcd90ce0 /gnu/packages
parent9e2cdf724e76cd22d50fd694c8c1d1fc7a4b2eb4 (diff)
downloadguix-f356c71ade3f3d45c806d3a84eecefbfbecd526f.tar.gz
gnu: Add audio-to-midi.
* gnu/packages/audio.scm (audio-to-midi): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/audio.scm40
1 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index db05735c95..780a0ec996 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2480,6 +2480,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")