DamRsn / NeuralNote

Audio Plugin for Audio to MIDI transcription using deep learning.
Apache License 2.0
1.12k stars 61 forks source link

MP3 and OGG support #60

Closed DamRsn closed 10 months ago

DamRsn commented 11 months ago

Added support for decoding .mp3 and .ogg (Vorbis) files.

Added error message when dropping a file with the wrong file format.

Updated readme.

Needs to be tested on Windows.

tiborvass commented 11 months ago

Code looks good, still need to test on windows, but just wanted to say that it would be useful to maintain the tag or git commit of each dependency. Even just " " lines in ThirdParty/vendor.txt would be enough.

tiborvass commented 10 months ago

I finally got to test it on Windows and I must say I don't know what's going on lol.

First:

C:\Users\Tibor\NeuralNote\Lib\Model\Notes.cpp(28,5): error C3861: 'assert': identifier not found [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]
C:\Users\Tibor\NeuralNote\Lib\Model\Notes.cpp(29,5): error C3861: 'assert': identifier not found [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]
C:\Users\Tibor\NeuralNote\Lib\Model\Notes.cpp(30,5): error C3861: 'assert': identifier not found [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]

which i have no idea why it is popping up now. Can be fixed with a #include <cassert> in Notes.h.

Then I have a float vs double warning:

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\functional(672,31): warning C4244: 'return': conversion from 'double' to '_Rx', possible loss of data [C:\Users\Tibor\NeuralNote\build\Neur
alNote.vcxproj]
          with
          [
              _Rx=float
          ] (compiling source file C:\Users\Tibor\NeuralNote\NeuralNote\Source\Player.cpp)
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\functional(832): message : see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexcep
t(false)' being compiled [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]
          with
          [
              _Rx=float,
              _Callable=SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7>,
              _Ty=float,
              _Fx=SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7> &
          ] (compiling source file C:\Users\Tibor\NeuralNote\NeuralNote\Source\Player.cpp)
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\functional(833,9): message : see reference to function template instantiation '_Rx std::_Invoker_ret<_Rx>::_Call<_Callable&,_Ty>(_Fx,_Ty &&) noexc
ept(false)' being compiled [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]
          with
          [
              _Rx=float,
              _Callable=SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7>,
              _Ty=float,
              _Fx=SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7> &
          ] (compiling source file C:\Users\Tibor\NeuralNote\NeuralNote\Source\Player.cpp)
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\functional(832,1): message : while compiling class template member function '_Rx std::_Func_impl_no_alloc<SynthVoice::<lambda_15b415a4f85e75e4821f
c4657666f6a7>,_Rx,float>::_Do_call(float &&)' [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]
          with
          [
              _Rx=float
          ] (compiling source file C:\Users\Tibor\NeuralNote\NeuralNote\Source\Player.cpp)
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\functional(730): message : see reference to class template instantiation 'std::_Func_impl_no_alloc<SynthVoice::<lambda_15b415a4f85e75e4821fc465766
6f6a7>,_Ret,float>' being compiled [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]
          with
          [
              _Ret=float
          ] (compiling source file C:\Users\Tibor\NeuralNote\NeuralNote\Source\Player.cpp)
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\functional(916,23): message : see reference to variable template 'const bool _Is_large<std::_Func_impl_no_alloc<<lambda_15b415a4f85e75e4821fc46576
66f6a7>,float,float> >' being compiled (compiling source file C:\Users\Tibor\NeuralNote\NeuralNote\Source\Player.cpp) [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\functional(1043,1): message : see reference to function template instantiation 'void std::_Func_class<_Ret,float>::_Reset<_Ty>(_Fx &&)' being comp
iled [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]
          with
          [
              _Ret=float,
              _Ty=SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7>,
              _Fx=SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7>
          ] (compiling source file C:\Users\Tibor\NeuralNote\NeuralNote\Source\Player.cpp)
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\functional(1043,21): message : see reference to function template instantiation 'void std::_Func_class<_Ret,float>::_Reset<_Ty>(_Fx &&)' being com
piled [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]
          with
          [
              _Ret=float,
              _Ty=SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7>,
              _Fx=SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7>
          ] (compiling source file C:\Users\Tibor\NeuralNote\NeuralNote\Source\Player.cpp)
C:\Users\Tibor\NeuralNote\Lib\Player\SynthVoice.h(40): message : see reference to function template instantiation 'std::function<float (float)>::function<SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7>,0>(_Fx &&)' being com
piled [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]
          with
          [
              _Fx=SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7>
          ] (compiling source file C:\Users\Tibor\NeuralNote\NeuralNote\Source\Player.cpp)
C:\Users\Tibor\NeuralNote\Lib\Player\SynthVoice.h(40,69): message : see reference to function template instantiation 'std::function<float (float)>::function<SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7>,0>(_Fx &&)' being
compiled [C:\Users\Tibor\NeuralNote\build\NeuralNote.vcxproj]
          with
          [
              _Fx=SynthVoice::<lambda_15b415a4f85e75e4821fc4657666f6a7>
          ] (compiling source file C:\Users\Tibor\NeuralNote\NeuralNote\Source\Player.cpp)

And finally, something is wrong with the CMakeLists for running the UnitTests:

C:\Users\Tibor\NeuralNote\Lib\Utils\AudioUtils.cpp(8,10): fatal  error C1083: Cannot open include file: 'minimp3.h': No such file or directory [C:\Users\Tibor\NeuralNote\build\Tests\UnitTests.vcxproj]

However, the mp3 and ogg loading worked fine.

tiborvass commented 10 months ago

Added https://github.com/DamRsn/NeuralNote/pull/61

DamRsn commented 10 months ago

I merged the assert PR and fixed unit tests!