Forums

    3 posts

  • avatar
    0 sounds
    2 posts
    Characteristic frequencies for guns


    I'm working on a math project which involves practical use of Fourier transforms. Our teacher gave us an example where he used a soundclip of a trumpet, and he found out which notes that were playing in the clip, by looking at the frequencies. I am thinking about trying out the same, but instead of using trumpets i'm thinking about using a soundclip of a gun. My question is, is there anybody that knows if it is possible to find out which weapon it is, by looking at the frequencies of the soundclip? Im thinking about maybe using a soundclip of an AK-47 or something with a very characteristic sound. But if it isn't possible to find out exactly which weapon it is, is it possible to find out which type of weapon it is? For example, if it is a 9mm weapon or a .50 cal weapon.

    I quess this is very off topic, but at least there's a slight chance that somebody has some knowledge about this.

  • avatar
    2064 sounds
    2218 posts


    This is actually very interesting and very on-topic.

    However, the exercise your teacher used as an example is 1000 times easier than what you propose to do.
    A trumpet is a musical instrument with a pitched sound. Each note contains a fundamental frequency and several harmonics of that frequency but is relatively clean in between these discrete frequencies. The fundamental is usually the lower clearly defined frequency present and will be the stronger one.
    Once you identify the fundamental, you can identify the note by reference to a table of musical note frequency tables.

    The sound of an explosion is not a pitched sound.
    Unlike the sound of the trumpet, there are no discrete frequencies. "All" frequencies are present.
    On the trumpet example, all you need to do is to find the strongest frequency peak and that is the note being played (i.e., one frequency = one number).
    In the case of the sound of an explosion you need to do a complete analysis of all the frequencies. Basically look at the frequency distribution.

    This is what you intend to do with FFT, obviously. But how far you can go at distinguishing different sounds will depend on how different the frequency spectra will be.
    The frequency distribution also changes with time, so likely you will be looking at the cumulative frequency distribution for the whole duration of the sound.

    I believe you will be able to distinguish some broad times types of sounds - a pistol sounds very different from a naval gun, the spectra should be different enough.
    I do not think that with 'normal' analysis techniques you will be able to distinguish between a 38 special and a .45. Identifying different gun models will be even more challenging.

    Freesound offers an extensive collection of sounds, so before you spend 2 weeks designing an algorithm, take a few different sounds from the database and inspect them carefully side-by-side using the frequency display on a Sound Editor like Audaciy.
    If you can spot a difference between a shotgun and a small calibre pistol, maybe your algorithm can too. You will also possibly get an idea of what to look for.

    Some suggestions:
    - Try to use only sounds of the 'same quality' - for example reject mp3 and any sounds where the recording quality is obviously poor. (a bad mic will skew the sound's frequency contents)
    - Be very careful of sounds that have been processed - EQ, filtering, noise removal, compression, etc can all alter the frequency contents and dynamics of a sound.
    - Avoid sounds with background noise (e.g. car engines, aircraft noise)
    - Reverb can also cause a problem. Consider truncating the sounds and not including the reverb tail in your analysis.

    Good luck!

    I want to believe.
  • avatar
    0 sounds
    2 posts


    AlienXXX wrote:
    This is actually very interesting and very on-topic.

    However, the exercise your teacher used as an example is 1000 times easier than what you propose to do.
    A trumpet is a musical instrument with a pitched sound. Each note contains a fundamental frequency and several harmonics of that frequency but is relatively clean in between these discrete frequencies. The fundamental is usually the lower clearly defined frequency present and will be the stronger one.
    Once you identify the fundamental, you can identify the note by reference to a table of musical note frequency tables.

    The sound of an explosion is not a pitched sound.
    Unlike the sound of the trumpet, there are no discrete frequencies. "All" frequencies are present.
    On the trumpet example, all you need to do is to find the strongest frequency peak and that is the note being played (i.e., one frequency = one number).
    In the case of the sound of an explosion you need to do a complete analysis of all the frequencies. Basically look at the frequency distribution.

    This is what you intend to do with FFT, obviously. But how far you can go at distinguishing different sounds will depend on how different the frequency spectra will be.
    The frequency distribution also changes with time, so likely you will be looking at the cumulative frequency distribution for the whole duration of the sound.

    I believe you will be able to distinguish some broad times types of sounds - a pistol sounds very different from a naval gun, the spectra should be different enough.
    I do not think that with 'normal' analysis techniques you will be able to distinguish between a 38 special and a .45. Identifying different gun models will be even more challenging.

    Freesound offers an extensive collection of sounds, so before you spend 2 weeks designing an algorithm, take a few different sounds from the database and inspect them carefully side-by-side using the frequency display on a Sound Editor like Audaciy.
    If you can spot a difference between a shotgun and a small calibre pistol, maybe your algorithm can too. You will also possibly get an idea of what to look for.

    Some suggestions:
    - Try to use only sounds of the 'same quality' - for example reject mp3 and any sounds where the recording quality is obviously poor. (a bad mic will skew the sound's frequency contents)
    - Be very careful of sounds that have been processed - EQ, filtering, noise removal, compression, etc can all alter the frequency contents and dynamics of a sound.
    - Avoid sounds with background noise (e.g. car engines, aircraft noise)
    - Reverb can also cause a problem. Consider truncating the sounds and not including the reverb tail in your analysis.

    Good luck!

    Thank you very much for the good answer and ideas! I think I will start with what you said, looking at different audio samples in Audacity.

    3 posts