-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new algo audio2midi #1437
base: master
Are you sure you want to change the base?
Add new algo audio2midi #1437
Conversation
if sys.platform == "darwin": | ||
import soundfile as sf | ||
|
||
audio, _ = sf.read(filename, dtype="float32") | ||
if audio.ndim > 1: | ||
audio = audio[:, 0] | ||
else: | ||
audio = MonoLoader(filename=filename, sampleRate=sample_rate)() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use MonoLoader
for both cases for consistency and also to avoid additional dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but I'm running tests in OSX. So, I need it to run them. Once we resolve all comments I might remove it. Let's fix the other parts and I will do it.
n_notes_tolerance: int = 0, | ||
onset_tolerance: float = 0.01, | ||
offset_tolerance: float = 0.01, | ||
midi_note_tolerance: int = 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be hardcoded inside asserts directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it cannot because it is inside runARealCase() which receive different values for those parameters. If we hardcoded some tests will fail. I can remove the default value, that would be okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve or suggest any others changes.
It includes header, cpp and unittests.