nfjones / audio-to-midi Goto Github PK
View Code? Open in Web Editor NEWA python program which performs an FFT on an audio file and produces a MIDI file from the results.
License: MIT License
A python program which performs an FFT on an audio file and produces a MIDI file from the results.
License: MIT License
I got this following error while installing:
$ python3 ./setup.py install
running install
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 2] No such file or directory: '/Library/Python/3.7/site-packages/test-easy-install-80268.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/3.7/site-packages/
This directory does not currently exist. Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
I'm on MacOS 10.15.4.
Traceback (most recent call last):
File "D:\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\Programs\Python\Python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\Programs\audio_to_midi.venv\Scripts\audio-to-midi.exe_main.py", line 9, in
File "d:\programs\audio_to_midi.venv\lib\site-packages\audio_to_midi\main.py", line 113, in main
process.convert()
File "d:\programs\audio_to_midi.venv\lib\site-packages\audio_to_midi\converter.py", line 270, in convert
writer.add_notes(midi_list)
File "d:\programs\audio_to_midi.venv\lib\site-packages\audio_to_midi\midi_writer.py", line 40, in add_notes
if pitch >= 0:
TypeError: '>=' not supported between instances of 'NoneType' and 'int'
hell
Geting error: metadata-generation-failed
Cython is installed
~ $ pip install audio-to-midi
Collecting audio-to-midi
Using cached audio_to_midi-2020.7-py3-none-any.whl (10.0 kB)
Collecting cffi==1.12.3
Using cached cffi-1.12.3.tar.gz (456 kB)
Preparing metadata (setup.py) ... done
Collecting pycparser==2.19
Using cached pycparser-2.19.tar.gz (158 kB)
Preparing metadata (setup.py) ... done
Collecting SoundFile==0.10.2
Using cached SoundFile-0.10.2-py2.py3-none-any.whl (25 kB)
Collecting python3-midi==0.2.5
Using cached python3_midi-0.2.5-py3-none-any.whl (10 kB)
Collecting numpy==1.16.3
Using cached numpy-1.16.3.zip (5.1 MB)
Preparing metadata (setup.py) ... done
Collecting progressbar2==3.50.0
Using cached progressbar2-3.50.0-py2.py3-none-any.whl (51 kB)
Collecting Cython==0.29.7
Using cached Cython-0.29.7.tar.gz (2.0 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
Unable to find pgen, not compiling formal grammar.
running egg_info
creating /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-m9mi5db8/Cython.egg-info
writing /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-m9mi5db8/Cython.egg-info/PKG-INFO
writing dependency_links to /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-m9mi5db8/Cython.egg-info/dependency_links.txt
writing entry points to /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-m9mi5db8/Cython.egg-info/entry_points.txt
writing top-level names to /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-m9mi5db8/Cython.egg-info/top_level.txt
writing manifest file '/data/data/com.termux/files/usr/tmp/pip-pip-egg-info-m9mi5db8/Cython.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/data/data/com.termux/files/usr/tmp/pip-install-dzih8rdl/cython_c67f0572d1bb4c26a36f9864bd48c80d/setup.py", line 228, in
setup(
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1224, in run_command
super().run_command(command)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 308, in run
self.find_sources()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 315, in find_sources
mm.run()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 550, in run
self.add_defaults()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 587, in add_defaults
sdist.add_defaults(self)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 228, in add_defaults
self._add_defaults_ext()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 311, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/data/data/com.termux/files/usr/tmp/pip-install-dzih8rdl/cython_c67f0572d1bb4c26a36f9864bd48c80d/Cython/Distutils/build_ext.py", line 20, in finalize_options
self.distribution.ext_modules[:] = cythonize(
File "/data/data/com.termux/files/usr/tmp/pip-install-dzih8rdl/cython_c67f0572d1bb4c26a36f9864bd48c80d/Cython/Build/Dependencies.py", line 960, in cythonize
module_list, module_metadata = create_extension_list(
File "/data/data/com.termux/files/usr/tmp/pip-install-dzih8rdl/cython_c67f0572d1bb4c26a36f9864bd48c80d/Cython/Build/Dependencies.py", line 754, in create_extension_list
elif isinstance(patterns, basestring) or not isinstance(patterns, collections.Iterable):
AttributeError: module 'collections' has no attribute 'Iterable'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
AND
~ $ pip install audio-to-midi --use-deprecated=backtrack-on-build-failures
DEPRECATION: Backtracking on build failures can mask issues related to how a package generates metadata or builds a wheel. This flag will be removed in pip 22.2. A possible replacement is avoiding known-bad versions by explicitly telling pip to ignore them (either directly as requirements, or via a constraints file). Discussion can be found at pypa/pip#10655
Collecting audio-to-midi
Using cached audio_to_midi-2020.7-py3-none-any.whl (10.0 kB)
Collecting Cython==0.29.7
Using cached Cython-0.29.7.tar.gz (2.0 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
Unable to find pgen, not compiling formal grammar.
running egg_info
creating /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-3ac9j_np/Cython.egg-info
writing /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-3ac9j_np/Cython.egg-info/PKG-INFO
writing dependency_links to /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-3ac9j_np/Cython.egg-info/dependency_links.txt
writing entry points to /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-3ac9j_np/Cython.egg-info/entry_points.txt
writing top-level names to /data/data/com.termux/files/usr/tmp/pip-pip-egg-info-3ac9j_np/Cython.egg-info/top_level.txt
writing manifest file '/data/data/com.termux/files/usr/tmp/pip-pip-egg-info-3ac9j_np/Cython.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/data/data/com.termux/files/usr/tmp/pip-install-plj6c7ce/cython_2f6471e91b254c2db74737d19b61acee/setup.py", line 228, in
setup(
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1224, in run_command
super().run_command(command)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 308, in run
self.find_sources()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 315, in find_sources
mm.run()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 550, in run
self.add_defaults()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 587, in add_defaults
sdist.add_defaults(self)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 228, in add_defaults
self._add_defaults_ext()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 311, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/data/data/com.termux/files/usr/tmp/pip-install-plj6c7ce/cython_2f6471e91b254c2db74737d19b61acee/Cython/Distutils/build_ext.py", line 20, in finalize_options
self.distribution.ext_modules[:] = cythonize(
File "/data/data/com.termux/files/usr/tmp/pip-install-plj6c7ce/cython_2f6471e91b254c2db74737d19b61acee/Cython/Build/Dependencies.py", line 960, in cythonize
module_list, module_metadata = create_extension_list(
File "/data/data/com.termux/files/usr/tmp/pip-install-plj6c7ce/cython_2f6471e91b254c2db74737d19b61acee/Cython/Build/Dependencies.py", line 754, in create_extension_list
elif isinstance(patterns, basestring) or not isinstance(patterns, collections.Iterable):
AttributeError: module 'collections' has no attribute 'Iterable'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: Discarding https://files.pythonhosted.org/packages/f8/da/c979464858b257b21a6472a85285548c91f5b4dc773cb049cfdfb3ceeb02/Cython-0.29.7.tar.gz#sha256=55d081162191b7c11c7bfcb7c68e913827dfd5de6ecdbab1b99dab190586c1e8 (from https://pypi.org/simple/cython/) (requires-python:>=2.6, !=3.0., !=3.1., !=3.2.*) due to build failure: metadata generation failed
Collecting audio-to-midi
Using cached audio_to_midi-2020.6-py3-none-any.whl (9.7 kB)
Using cached audio_to_midi-2020.5-py3-none-any.whl (9.6 kB)
Using cached audio_to_midi-2020.4-py3-none-any.whl (9.6 kB)
Using cached audio_to_midi-2020.3-py3-none-any.whl (9.6 kB)
Using cached audio_to_midi-2020.2-py3-none-any.whl (9.1 kB)
Using cached audio_to_midi-2020.1-py3-none-any.whl (8.9 kB)
Using cached audio_to_midi-2019.3-py3-none-any.whl (8.5 kB)
Using cached audio_to_midi-2019.2-py3-none-any.whl (8.4 kB)
Using cached audio_to_midi-2019.1-py3-none-any.whl (8.3 kB)
ERROR: Cannot install audio-to-midi==2019.1, audio-to-midi==2019.2, audio-to-midi==2019.3, audio-to-midi==2020.1, audio-to-midi==2020.2, audio-to-midi==2020.3, audio-to-midi==2020.4, audio-to-midi==2020.5, audio-to-midi==2020.6 and audio-to-midi==2020.7 because these package versions have conflicting dependencies.
The conflict is caused by:
audio-to-midi 2020.7 depends on Cython==0.29.7
audio-to-midi 2020.6 depends on Cython==0.29.7
audio-to-midi 2020.5 depends on Cython==0.29.7
audio-to-midi 2020.4 depends on Cython==0.29.7
audio-to-midi 2020.3 depends on Cython==0.29.7
audio-to-midi 2020.2 depends on Cython==0.29.7
audio-to-midi 2020.1 depends on Cython==0.29.7
audio-to-midi 2019.3 depends on Cython==0.29.7
audio-to-midi 2019.2 depends on Cython==0.29.7
audio-to-midi 2019.1 depends on Cython==0.29.7
To fix this you could try to:
ERROR: ResolutionImpossible
From a simple midi file with the following content (quarter notes C, D, E, F)
0, 0, Header, 1, 2, 480
1, 0, Start_track
1, 0, Program_c, 0, 0
1, 0, Note_on_c, 0, 60, 100
1, 480, Note_off_c, 0, 60, 64
1, 480, Note_on_c, 0, 62, 100
1, 960, Note_off_c, 0, 62, 64
1, 960, Note_on_c, 0, 64, 100
1, 1440, Note_off_c, 0, 64, 64
1, 1440, Note_on_c, 0, 65, 100
1, 1920, Note_off_c, 0, 65, 64
1, 192000, End_track
0, 0, End_of_file
I create a wave file using timidity like so:
timidity c-d-e-f.mid -Ow
I then try to get a midi file from the wave file timidity created like so:
audio-to-midi c-d-e-f.wav -b 120 -t 30
But the result bears no resemblance to the input, and there is not a single Note_off event, only Note_on events.
0, 0, Header, 1, 1, 500
1, 0, Start_track
1, 30, Note_on_c, 1, 72, 2
1, 60, Note_on_c, 1, 72, 0
1, 60, Note_on_c, 1, 72, 3
1, 90, Note_on_c, 1, 72, 0
1, 90, Note_on_c, 1, 72, 3
1, 120, Note_on_c, 1, 72, 0
...
1, 990, Note_on_c, 1, 74, 0
1, 990, Note_on_c, 1, 74, 2
1, 1020, Note_on_c, 1, 74, 0
1, 1021, End_track
0, 0, End_of_file
I guess I must be doing something terribly wrong.
This is how I built the tool:
git clone https://github.com/NFJones/audio-to-midi
cd audio-to-midi
python3 ./setup.py install --user
Any help is appreciated.
N.B. The csv representation of midi files above was created using midicsv.
In reduce_freqs function, key = key - 7 is wrong, it should be key = key + 12
ValueError: bad marshal data (unknown type code)
using vanilla audio-to-midi <file>
audio-to-midi PrototypeRaptor.wav
Converting: PrototypeRaptor.wav
|================================================================================| 100.00%
Traceback (most recent call last):
File "C:\Users\Jugbot\AppData\Local\Programs\Python\Python37-32\Scripts\audio-to-midi-script.py", line 11, in <module>
File "C:\Users\Jugbot\AppData\Local\Programs\Python\Python37-32\lib\site-packages\audio_to_midi-2019.3-py3.7.egg\audio_to_midi\main.py", line 113, in main
File "C:\Users\Jugbot\AppData\Local\Programs\Python\Python37-32\lib\site-packages\audio_to_midi-2019.3-py3.7.egg\audio_to_midi\converter.py", line 268, in convert
File "C:\Users\Jugbot\AppData\Local\Programs\Python\Python37-32\lib\site-packages\audio_to_midi-2019.3-py3.7.egg\audio_to_midi\converter.py", line 116, in freqs_to_midi
MemoryError
C:\Users\Jugbot\Documents\GitHub\Rhythm-Game\songs>
python3 ./setup.py install error:
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
audio-to-midi ./test.wav -b 120 -t 30 error
pkg_resources.DistributionNotFound: The 'cffi==1.12.3' distribution was not found and is required by audio-to-midi
also pip install audio-to-midi
is giving its own error.
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-eipggcd7/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-eipggcd7/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-mf8kp8w3
cwd: /tmp/pip-install-eipggcd7/cffi/
Complete output (36 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/c
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
15 | #include <ffi.h>
| ^~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: Cython, cffi, SoundFile
Running setup.py install for cffi ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-eipggcd7/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-eipggcd7/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mmpripo9/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/faroe/.local/include/python3.8/cffi
cwd: /tmp/pip-install-eipggcd7/cffi/
Complete output (36 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/c
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
15 | #include <ffi.h>
| ^~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-eipggcd7/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-eipggcd7/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mmpripo9/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/faroe/.local/include/python3.8/cffi Check the logs for full command output.
This argument doesn't seem to be working:
--note-count NOTE_COUNT, -C NOTE_COUNT
Only add the loudest n notes to the MIDI file for a given time window.
audio-to-midi: error: unrecognized arguments: --note-count
Problem with install. Error:
Writing /var/folders/rs/_ysk3v1j0vbbt1n466nrs0ym0000gn/T/easy_install-8nk3q7ra/pycparser-2.19/setup.cfg
Running pycparser-2.19/setup.py -q bdist_egg --dist-dir /var/folders/rs/_ysk3v1j0vbbt1n466nrs0ym0000gn/T/easy_install-8nk3q7ra/pycparser-2.19/egg-dist-tmp-gj6s2n1i
warning: no previously-included files found matching 'setup.pyc'
warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
warning: no previously-included files matching 'lextab.*' found under directory 'tests'
warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
warning: no previously-included files matching 'lextab.*' found under directory 'examples'
error: Setup script exited with error: SandboxViolation: mkdir('/Users/jeremycherfas/Library/Caches/com.apple.python/private/var/folders/rs/_ysk3v1j0vbbt1n466nrs0ym0000gn/T/easy_install-8nk3q7ra', 511) {}
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
Checking against requirement.txt
, it seems that as a result pycparser, numpy, Cython and cffi failed to install.
All of the requiements.txt entries are == to specific x.y versions - all are now past versions!
Please consider revising to >= and only putting < restrictions in when a version is known not to work.
Hi, this Error comes up, when I try to run it.
I am pretty new to this, so can anyone help?
Traceback (most recent call last):
File "C:/Users/Lisa/PycharmProjects/audio-to-midi/audio_to_midi/main.py", line 121, in
main()
File "C:/Users/Lisa/PycharmProjects/audio-to-midi/audio_to_midi/main.py", line 69, in main
"{}.mid".format(os.path.basename(args.infile))
AttributeError: 'Namespace' object has no attribute 'infile'
Thank You
Hi
Firstly, this is a great library. I am not sure if it is an issue or it's my lack of understanding.
Example,
I am trying to convert an audio wave file into midi. it gives me an output which is great but then there are many midi notes which are kinda noisy to listen to.
So let's say the same note exists continuously for 1 second, it gives me 7 midi notes (based on the sampling freq I have set) when I see it in muse score or read it using any midi library. I was looking for a feature that can join all these 7 midi notes in the output midi file into 1 big duration midi note. In other words, 7 midi notes should be considered as 1 note with total of 1-sec duration.
I tried looking at the parameters like condense, condense max, and beat. Though it does something better but I was not able to find a way to simply join repeated notes continuously into 1 single note.
Is there a feature/parameter for this? Did I miss something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.