* [bug#48746] [PATCH WIP 0/3] Add python-audio-to-midi
@ 2021-05-30 16:12 Leo Prikler
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 1/3] gnu: Add python-soundfile Leo Prikler
2021-05-31 13:35 ` [bug#48746] [PATCH v2 1/3] gnu: Add python-soundfile Leo Prikler
0 siblings, 2 replies; 7+ messages in thread
From: Leo Prikler @ 2021-05-30 16:12 UTC (permalink / raw)
To: 48746
Hi Guix,
For no particular reason I set out to search for a way of turning audio
files into MIDI. It turns out, that a program exists, that does just
that; one might argue about the quality of the output especially when
giving it the wrong settings, but it's certainly a neat little toy.
Anyway, have fun with it.
Regards,
Leo
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#48746] [PATCH WIP 1/3] gnu: Add python-soundfile.
2021-05-30 16:12 [bug#48746] [PATCH WIP 0/3] Add python-audio-to-midi Leo Prikler
@ 2021-05-30 16:20 ` Leo Prikler
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 2/3] gnu: Add python-python3-midi Leo Prikler
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 3/3] gnu: Add python-audio-to-midi Leo Prikler
2021-05-31 13:35 ` [bug#48746] [PATCH v2 1/3] gnu: Add python-soundfile Leo Prikler
1 sibling, 2 replies; 7+ messages in thread
From: Leo Prikler @ 2021-05-30 16:20 UTC (permalink / raw)
To: 48746
* gnu/packages/python-xyz.scm (python-soundfile): New variable.
---
gnu/packages/python-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 770beb0336..e190588efa 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24120,6 +24120,40 @@ dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
Open Sound Control 1.0} specification.")
(license license:unlicense)))
+(define-public python-soundfile
+ (package
+ (name "python-soundfile")
+ (version "0.10.3.post1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "SoundFile" version))
+ (sha256
+ (base32
+ "0yqhrfz7xkvqrwdxdx2ydy4h467sk7z3gf984y1x2cq7cm1gy329"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-cffi" ,python-cffi)
+ ("python-numpy" ,python-numpy)
+ ("libsndfile" ,libsndfile)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (arguments
+ `(#:tests? #f ; missing OGG support
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "soundfile.py"
+ (("_find_library\\('sndfile'\\)")
+ (string-append "\"" (assoc-ref inputs "libsndfile")
+ "/lib/libsndfile.so\""))))))))
+ (home-page "https://github.com/bastibe/SoundFile")
+ (synopsis "Python bindings for libsndfile")
+ (description "This package provides python bindings for libsndfile based on
+CFFI and NumPy.")
+ (license license:expat)))
+
(define-public python-voluptuous
(package
(name "python-voluptuous")
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#48746] [PATCH WIP 2/3] gnu: Add python-python3-midi.
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 1/3] gnu: Add python-soundfile Leo Prikler
@ 2021-05-30 16:20 ` Leo Prikler
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 3/3] gnu: Add python-audio-to-midi Leo Prikler
1 sibling, 0 replies; 7+ messages in thread
From: Leo Prikler @ 2021-05-30 16:20 UTC (permalink / raw)
To: 48746
* gnu/packages/python-xyz.scm (python-python3-midi): New variable.
---
gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e190588efa..3589f8c96a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24154,6 +24154,24 @@ Open Sound Control 1.0} specification.")
CFFI and NumPy.")
(license license:expat)))
+(define-public python-python3-midi
+ (package
+ (name "python-python3-midi")
+ (version "0.2.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python3_midi" version))
+ (sha256
+ (base32
+ "1z9j1w7mpn3xhkcpxmqm5rvmj6nffb5rf14bv7n3sdh07nf6n7sf"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/NFJones/python3-midi")
+ (synopsis "Python MIDI API")
+ (description "This package provides a python API to read and write MIDI
+files.")
+ (license license:expat)))
+
(define-public python-voluptuous
(package
(name "python-voluptuous")
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#48746] [PATCH WIP 3/3] gnu: Add python-audio-to-midi.
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 1/3] gnu: Add python-soundfile Leo Prikler
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 2/3] gnu: Add python-python3-midi Leo Prikler
@ 2021-05-30 16:20 ` Leo Prikler
1 sibling, 0 replies; 7+ messages in thread
From: Leo Prikler @ 2021-05-30 16:20 UTC (permalink / raw)
To: 48746
* gnu/packages/python-xyz.scm (python-audio-to-midi): New variable.
---
gnu/packages/python-xyz.scm | 40 +++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3589f8c96a..0a5c0a9635 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24172,6 +24172,46 @@ CFFI and NumPy.")
files.")
(license license:expat)))
+(define-public python-audio-to-midi
+ (package
+ (name "python-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 python-voluptuous
(package
(name "python-voluptuous")
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#48746] [PATCH v2 1/3] gnu: Add python-soundfile.
2021-05-30 16:12 [bug#48746] [PATCH WIP 0/3] Add python-audio-to-midi Leo Prikler
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 1/3] gnu: Add python-soundfile Leo Prikler
@ 2021-05-31 13:35 ` Leo Prikler
2021-05-31 13:35 ` [bug#48746] [PATCH v2 2/3] gnu: Add python-python3-midi Leo Prikler
2021-05-31 13:35 ` [bug#48746] [PATCH v2 3/3] gnu: Add audio-to-midi Leo Prikler
1 sibling, 2 replies; 7+ messages in thread
From: Leo Prikler @ 2021-05-31 13:35 UTC (permalink / raw)
To: 48746
* gnu/packages/audio.scm (python-soundfile): New variable.
---
gnu/packages/audio.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 5e30ed296d..7c469a81c4 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -84,6 +84,7 @@
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages libbsd)
+ #:use-module (gnu packages libffi)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
@@ -2425,6 +2426,40 @@ included are the command line utilities @code{send_osc} and @code{dump_osc}.")
(define-public python2-pyliblo
(package-with-python2 python-pyliblo))
+(define-public python-soundfile
+ (package
+ (name "python-soundfile")
+ (version "0.10.3.post1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "SoundFile" version))
+ (sha256
+ (base32
+ "0yqhrfz7xkvqrwdxdx2ydy4h467sk7z3gf984y1x2cq7cm1gy329"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-cffi" ,python-cffi)
+ ("python-numpy" ,python-numpy)
+ ("libsndfile" ,libsndfile)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (arguments
+ `(#:tests? #f ; missing OGG support
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "soundfile.py"
+ (("_find_library\\('sndfile'\\)")
+ (string-append "\"" (assoc-ref inputs "libsndfile")
+ "/lib/libsndfile.so\""))))))))
+ (home-page "https://github.com/bastibe/SoundFile")
+ (synopsis "Python bindings for libsndfile")
+ (description "This package provides python bindings for libsndfile based on
+CFFI and NumPy.")
+ (license license:expat)))
+
(define-public lilv
(package
(name "lilv")
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#48746] [PATCH v2 2/3] gnu: Add python-python3-midi.
2021-05-31 13:35 ` [bug#48746] [PATCH v2 1/3] gnu: Add python-soundfile Leo Prikler
@ 2021-05-31 13:35 ` Leo Prikler
2021-05-31 13:35 ` [bug#48746] [PATCH v2 3/3] gnu: Add audio-to-midi Leo Prikler
1 sibling, 0 replies; 7+ messages in thread
From: Leo Prikler @ 2021-05-31 13:35 UTC (permalink / raw)
To: 48746
* gnu/packages/audio.scm (python-python3-midi): New variable.
---
gnu/packages/audio.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 7c469a81c4..d348c52e43 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2460,6 +2460,24 @@ included are the command line utilities @code{send_osc} and @code{dump_osc}.")
CFFI and NumPy.")
(license license:expat)))
+(define-public python-python3-midi
+ (package
+ (name "python-python3-midi")
+ (version "0.2.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python3_midi" version))
+ (sha256
+ (base32
+ "1z9j1w7mpn3xhkcpxmqm5rvmj6nffb5rf14bv7n3sdh07nf6n7sf"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/NFJones/python3-midi")
+ (synopsis "Python MIDI API")
+ (description "This package provides a python API to read and write MIDI
+files.")
+ (license license:expat)))
+
(define-public lilv
(package
(name "lilv")
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#48746] [PATCH v2 3/3] gnu: Add audio-to-midi.
2021-05-31 13:35 ` [bug#48746] [PATCH v2 1/3] gnu: Add python-soundfile Leo Prikler
2021-05-31 13:35 ` [bug#48746] [PATCH v2 2/3] gnu: Add python-python3-midi Leo Prikler
@ 2021-05-31 13:35 ` Leo Prikler
1 sibling, 0 replies; 7+ messages in thread
From: Leo Prikler @ 2021-05-31 13:35 UTC (permalink / raw)
To: 48746
* 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-05-31 13:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-30 16:12 [bug#48746] [PATCH WIP 0/3] Add python-audio-to-midi Leo Prikler
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 1/3] gnu: Add python-soundfile Leo Prikler
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 2/3] gnu: Add python-python3-midi Leo Prikler
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 3/3] gnu: Add python-audio-to-midi Leo Prikler
2021-05-31 13:35 ` [bug#48746] [PATCH v2 1/3] gnu: Add python-soundfile Leo Prikler
2021-05-31 13:35 ` [bug#48746] [PATCH v2 2/3] gnu: Add python-python3-midi Leo Prikler
2021-05-31 13:35 ` [bug#48746] [PATCH v2 3/3] gnu: Add audio-to-midi Leo Prikler
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).