Mosquito flight sound extraction

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
MozziMan
Posts: 14
Joined: Tue Jun 02, 2015 4:11 pm
Operating System: Please select

Mosquito flight sound extraction

Post by MozziMan » Thu Oct 22, 2015 5:00 pm

Dear Audacity forum,
We are studying African malaria mosquitoes' flight behavior. We tether them inside a flight tube and record their flight for 10 hours using voice recorders (44100 or 8000 Hz, mono).
This results with large files which we need to extract the amount of flight from (the mosquitoes only fly for short periods of time, if any). Mosquito flight sound is generally between 500-2000 Hz.
I was wondering if there was any way to extract only the flight sound from these files, by either telling audacity what to look for, or better yet have Audacity export a data file and use R to extract the flight data somehow...
Any ideas on how I could do this?
We use Windows 7, Audacity 2.1.0 installed from zip file.
Love Audacity,

Thanks,
Roy.
Attachments
IMG_20150423_154940104.jpg
tethered mosquito flying
IMG_20150423_154940104.jpg (928.43 KiB) Viewed 467 times
tethered flight Audacity output.jpg
Audacity output with flight (white)
tethered flight Audacity output.jpg (300.36 KiB) Viewed 467 times

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Mosquito flight sound extraction

Post by steve » Thu Oct 22, 2015 5:47 pm

You could remove frequencies outside of the range of interest using the Equalization effect. You would need settings similar to this:
window-Equalization-000.png
window-Equalization-000.png (37.89 KiB) Viewed 464 times
After filtering, there 'may' be enough amplitude difference between flying/not flying to be able to use "Sound Finder" (http://manual.audacityteam.org/o/man/si ... html#sound), or simply to be able to see the flying sounds by looking at the waveform (zoom as appropriate: http://manual.audacityteam.org/o/man/zooming.html)

If you do use Sound Finder, I would suggest that you don't run it on more than about an hour at a time. Nyquist plug-ins (Sound Finder is a Nyquist Plug-in) often have trouble with very long selections.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

MozziMan
Posts: 14
Joined: Tue Jun 02, 2015 4:11 pm
Operating System: Please select

Re: Mosquito flight sound extraction

Post by MozziMan » Thu Oct 22, 2015 7:04 pm

Thanks Steve for your prompt reply!
Can Audacity export the sound result after Equalization as a csv file for analysis elsewhere?
I have no difficulty in 'seeing' flight, I want to have it automatically extracted from the 10 hr file.
It's actually more complicated since the flight sound varies in frequency as well, so I kind of answered my self here...

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Mosquito flight sound extraction

Post by steve » Thu Oct 22, 2015 7:49 pm

"Sound Finder" creates "labels" (http://manual.audacityteam.org/o/man/label_tracks.html) which may be exported as a text file.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Trebor
Posts: 9954
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: Mosquito flight sound extraction

Post by Trebor » Thu Oct 22, 2015 10:28 pm

MozziMan wrote: Mosquito flight sound is generally between 500-2000 Hz.
The fundamental-frequency of some mosquitoes goes as low as 350Hz ...
mosquito.png
mosquito.png (226.28 KiB) Viewed 458 times
livescience.com wrote:In the study, Ronald Hoy of Cornell University in New York and his colleagues tethered individual A. aegypti mosquitoes ... The male's wing-beat frequency (also called its fundamental frequency) ranged from about 550 to 650 Hertz while the female's ranged from 350 to 450 Hz (or wing beats per second).
http://www.livescience.com/3196-bug-lov ... rmony.html

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Mosquito flight sound extraction

Post by Gale Andrews » Thu Oct 22, 2015 11:49 pm

MozziMan wrote:I have no difficulty in 'seeing' flight, I want to have it automatically extracted from the 10 hr file.
Again if there is enough amplitude difference between flight/non-flight you "may" be able to use Truncate Silence to remove the non-flight sections and so make a track that only contains flight sounds.

Again if the flight sounds are loud enough, you could try Sound Activated Recording.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

MozziMan
Posts: 14
Joined: Tue Jun 02, 2015 4:11 pm
Operating System: Please select

Re: Mosquito flight sound extraction

Post by MozziMan » Mon Oct 26, 2015 4:08 pm

Thanks Trebor.
I actually know the work and the people - both wonderful!
Hoy et al were working with a different species than ours so I guess I should have specified we are working on Anopheles (not Aedes), which have a different fundamental frequency.
Right now I am interested in extracting active flight which generates the higher frequencies usually. Once I know how to isolate the 'amount' of flight from the track I can start playing with the range I guess ;)

MozziMan
Posts: 14
Joined: Tue Jun 02, 2015 4:11 pm
Operating System: Please select

Re: Mosquito flight sound extraction

Post by MozziMan » Mon Oct 26, 2015 6:04 pm

Thanks Gale!
The Sound finder does a pretty good job at detecting the flight and can be suitably adjusted for it.
Now how did you say I could extract the (label) data again?

themickster
Posts: 308
Joined: Wed Aug 12, 2015 10:50 pm
Operating System: Windows 10

Re: Mosquito flight sound extraction

Post by themickster » Mon Oct 26, 2015 9:57 pm

A band pass filter might do it for you. ReaQ plugin will let you adjust the cut-off freqs as you listen.

Have you tried converting the file to mp3?

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Mosquito flight sound extraction

Post by Gale Andrews » Mon Oct 26, 2015 10:33 pm

MozziMan wrote:The Sound finder does a pretty good job at detecting the flight and can be suitably adjusted for it. Now how did you say I could extract the (label) data again?
So is the end objective a separate audio file for each instance of flight?

If so, you can use the region labels created by Sound Finder to export multiple, giving you one audio file for each labelled region.

The labels do not contain text data about the sample amplitude values. Is that what you want in the CSV file? If so, see Analyze > Sample Data Export....


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Post Reply