Skip to content
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

Fix pitch data overhangs in freq domain #7

Open
anthonio9 opened this issue Jan 27, 2024 · 8 comments
Open

Fix pitch data overhangs in freq domain #7

anthonio9 opened this issue Jan 27, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@anthonio9
Copy link
Owner

Just noticed that the data pitch labels are wrong. Many beginnings and endings of the pitch seem to overhang like in the picture below. This is totally unacceptable and very possibly the cause of the poor raw pitch accuracy of around 80%.

Image

Fix that!

Check:

  • labels in the original dataset
  • data preprocessing when creating the gset dataset
@anthonio9 anthonio9 added the bug Something isn't working label Jan 27, 2024
@anthonio9 anthonio9 self-assigned this Jan 27, 2024
@anthonio9
Copy link
Owner Author

After the initial review of the original data sets my conclusion is that the dataset is really bad or at least the pitch values are. Every ending is indeed seen noted as falling down in pitch, even though such fall isn't audible in the recordings (not even those with the separated strings). This means that the dataset needs to have those endings cut manually or have all the pitch tracking redone with a better method, perhaps with the original penn?

@anthonio9
Copy link
Owner Author

anthonio9 commented Jan 29, 2024

There must be a problem with the data processing, the nodes that are so much below the other ones do not exist in the labeled data, below is the file of 05_BN3-119-G_solo_mic.wav

image

@anthonio9
Copy link
Owner Author

anthonio9 commented Jan 29, 2024

Some data seems to be missing, this is indeed missing as it is present in the audio. The next step is to write a program printing the original data labels over the STFT image. I don't see any other way than comparing what was there originally with what I got after preprocessing. Still analyzing 05_BN3-119-G_solo_mic.wav

image

anthonio9 added a commit that referenced this issue Feb 1, 2024
Plot data as it is in the dataset, without any processing.
Raw pitch data is plotted with plotly, next steps are midi and
spectrogram.

related to: #7
@anthonio9
Copy link
Owner Author

This is already slightly better, got rid of putting 'zeros' into the almost raw data, it seems that all the overhangs are still there, but at least not the most ridiculous ones, again file 05_BN3-119-G_solo_mic.wav.

image

@anthonio9
Copy link
Owner Author

@anthonio9
Copy link
Owner Author

This may also be helpful for learning more about the FigureWidget
https://medium.com/@jacky.kaub/build-custom-widgets-with-ipywidgets-and-plotly-a454cb3b2b4f

anthonio9 added a commit that referenced this issue Feb 2, 2024
@anthonio9
Copy link
Owner Author

I was really hoping that midi would help with seeing where the proper parts of the node end, sadly that is not the case.
Anyway, midi is now printed on top of the spectrogram and pitch data. The next step is to try to fix the endings of the pitch notes with some kind of a simple algorithm.

This is what the plot looks like now:

image

anthonio9 added a commit that referenced this issue Feb 2, 2024
Introduce penn.convert.midi_to_frequency

related to: #7
@anthonio9
Copy link
Owner Author

Another small break through. Resampling was obviously the issue! To get rid of unwanted fields in strange spots that were not in the original data it was enough to disable resampling for sampling rates that divide the GuitarSet native sampling rate of 44100 Hz without a remainder - that leaves the 11025, 22050 sampling rates without the need to resample.

anthonio9 added a commit that referenced this issue Feb 3, 2024
Sampling rates 11025 Hz and 22050 Hz are safe and do not need resampling.
This simple fix gets rid of many ugly data points that were not present
in the original data annotations.

related to: #7
anthonio9 added a commit that referenced this issue Feb 3, 2024
Had to cut the labels, probably around two from each string at the end
to fit the audio data better. Really do not know why exactly.

related to: #7
anthonio9 added a commit that referenced this issue Feb 5, 2024
Had to cut the labels, probably around two from each string at the end
to fit the audio data better. Really do not know why exactly.

related to: #7
anthonio9 added a commit that referenced this issue Feb 5, 2024
The jam track is separated into notes ordered by strings,
each of those contains multiple pitches.

related to: #7
anthonio9 added a commit that referenced this issue Feb 7, 2024
remove_overhangs attempts to remove the overhangs from the last 20% of
a note if they are below the average of the other 80% of the note.

related to: #7
anthonio9 added a commit that referenced this issue Feb 7, 2024
remove_overhangs attempts to remove the overhangs from the last 20% of
a note if they are below the average of the other 80% of the note.

related to: #7
anthonio9 added a commit that referenced this issue Feb 7, 2024
And add new config options to enable and manipulate the overhangs
removal:
REMOVE_OVERHANGS - set True to enable the removal,
REMOVE_OVERHANGS_DIVIDER - (int) set to manipulate the length of the
overhang,
REMOVE_OVERHANGS_THRESHOLD - (int) set the threshold in cents

related to: #7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant