groakat / AudioTagger

5 stars 2 forks source link

Frequency axis on the side of the spectrogram #71

Open macaodha opened 8 years ago

macaodha commented 8 years ago

Not sure how difficult this is to implement but it would be cool to have a frequency axis on the side of the spectrogram. It would make annotating certain classes a lot easier.

Perhaps something like: at_freq

Also we do try and do something similar for time along the bottom.

These would both be "nice to have" features, but not essential.

rorygibb commented 8 years ago

I second this.

Myself and Ella in Kate Jones' group are currently using AudioTagger to check the outputs of @macaodha's detector/classifier algorithms. Having a frequency axis on the side of the spectrogram would make confirming species ID much easier, so if there's a chance of adding this at some point, that would be hugely helpful.

Thanks, Rory

groakat commented 8 years ago

Hmm. I think we were thinking about this earlier and we had two problems, basically.

  1. making sure that the scale is correctly computed
  2. making the scale align with the spectogram, even if it is scrolled.

I have to look into how to implement the first point, but I think this is probably easier than getting the scale displayed properly. The safest way would be to place the scale into the QGraphicsView using some QGraphicsItems. I am not sure how to keep them visible even when the spectogram is scrolled horizontally. Because if I place them on the left-hand side next to the spectogram, you would scroll them out-of-view..

On 20 Jul 2016, at 12:03, rorygibb <notifications@github.com mailto:notifications@github.com> wrote:

I second this.

Myself and Ella in Kate Jones' group are currently using AudioTagger to check the outputs of @macaodha https://github.com/macaodha's detector/classifier algorithms. Having a frequency axis on the side of the spectrogram would make confirming species ID much easier, so if there's a chance of adding this at some point, that would be hugely helpful.

Thanks, Rory

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/groakat/AudioTagger/issues/71#issuecomment-233919027, or mute the thread https://github.com/notifications/unsubscribe-auth/ADQuNsuIHqA9EP5vnk4-w8rj5WyWzTieks5qXgCKgaJpZM4JICq1.

macaodha commented 8 years ago

You can get the answer to 1. pretty easily. All you need to do is pass nfft into this: http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.fftfreq.html#numpy.fft.fftfreq

As for 2., you would know best for this. Maybe a simple work around is to display the frequency somewhere in text when you have a mouse hovering over the spectrogram?

groakat commented 8 years ago

A mouseover event thing could work. I will try to implement it after submitting the other paper/

On 3 Aug 2016, at 21:10, Oisin Mac Aodha <notifications@github.com mailto:notifications@github.com> wrote:

You can get the answer to 1. pretty easily. All you need to do is pass nfft into this: http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.fftfreq.html#numpy.fft.fftfreq http://docs.scipy.org/doc/numpy/reference/generated/numpy.fft.fftfreq.html#numpy.fft.fftfreq As for 2., you would know best for this. Maybe a simple work around is to display the frequency somewhere in text when you have a mouse hovering over the spectrogram?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/groakat/AudioTagger/issues/71#issuecomment-237356704, or mute the thread https://github.com/notifications/unsubscribe-auth/ADQuNtW_z-rdDrqtLcuNLJoFG7_jjLMlks5qcPWhgaJpZM4JICq1.

macaodha commented 8 years ago

Got another request for this feature from a new user of the system.

ali-fairbrass commented 8 years ago

Would it be possible to get this feature implemented? I'd like to use AudioTagger for some bat species ID, and it would be really helpful to have some way to get frequency information. Either a scale on the y-axis or a mouse-over would be great.

Thanks.

groakat commented 8 years ago

I will make some time for audiotagger next week. I hope I can implement it. I am thinking of displaying the frequency information in the info-box. Would that work?

On 14 Oct 2016, at 10:18, ali-fairbrass <notifications@github.com mailto:notifications@github.com> wrote:

Would it be possible to get this feature implemented? I'd like to use AudioTagger for some bat species ID, and it would be really helpful to have some way to get frequency information. Either a scale on the y-axis or a mouse-over would be great.

Thanks.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/groakat/AudioTagger/issues/71#issuecomment-253738070, or mute the thread https://github.com/notifications/unsubscribe-auth/ADQuNvNrtWek1n1he2U_RuvcAdMRnx_Rks5qzzrtgaJpZM4JICq1.

macaodha commented 8 years ago

Seems like a good compromise.

On 14 Oct 2016 09:52, "groakat" notifications@github.com wrote:

I will make some time for audiotagger next week. I hope I can implement it. I am thinking of displaying the frequency information in the info-box. Would that work?

On 14 Oct 2016, at 10:18, ali-fairbrass <notifications@github.com mailto:notifications@github.com> wrote:

Would it be possible to get this feature implemented? I'd like to use AudioTagger for some bat species ID, and it would be really helpful to have some way to get frequency information. Either a scale on the y-axis or a mouse-over would be great.

Thanks.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/groakat/AudioTagger/issues/71#issuecomment-253738070>, or mute the thread https://github.com/notifications/unsubscribe- auth/ADQuNvNrtWek1n1he2U_RuvcAdMRnx_Rks5qzzrtgaJpZM4JICq1.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/groakat/AudioTagger/issues/71#issuecomment-253857398, or mute the thread https://github.com/notifications/unsubscribe-auth/AGWhqzj-vEKuUr4jg9KXztOhFvYYUa6uks5qz7NBgaJpZM4JICq1 .

groakat commented 8 years ago

just pushed an update. The highest frequency it shows is half the sampling rate. Does this sound correct?

ali-fairbrass commented 8 years ago

Thanks for implementing this Peter, it will be really helpful.

Yes the highest frequency should be half the sample rate.

Cheers,

On Friday, 14 October 2016, groakat notifications@github.com wrote:

just pushed an update. The highest frequency it shows is half the sampling rate. Does this sound correct?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/groakat/AudioTagger/issues/71#issuecomment-253887483, or mute the thread https://github.com/notifications/unsubscribe-auth/AF77aD9GqNSE89sQ2-5FCWROGQj9nP7-ks5qz81pgaJpZM4JICq1 .

Alison


Alison Fairbrass Engineering Doctorate University College London Civil, Environmental and Geomatic Engineering +447912616367

Twitter: @AlisonFairbrass

Webpage: https://www.ucl.ac.uk/cber/people/alison-fairbrass

alison.fairbrass.10@ucl.ac.uk alison.fairbrass@gmail.com

macaodha commented 8 years ago

Thanks Peter! Democracy in action.

I have made a pull request that displays it in kHz.