Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    acoustic FFT

    Denis
    New Poster

    acoustic FFT

    Hi,

    I would like to use the acoustic sensor to work out a frequency signature of audio. I had a look at API : https://developer.bosch.com/web/xdk/acoustic#6

    But I am very confused with the c full code example. To work out FFT, in the example you are using a FreeRtos timer with a period of 100ms (freq=10Hz) to sample audio and from 32 samples workout the frequency response. Knowing that sampling frequency must be at least 5 times higher than the freq of signal to measure, it means that you can’t measure audio signal above 2Hz ! Even if you increase sampling freq to 1KHz, which seem to be the maximum possible if you use FreeRtos timer; you can only measure signal lower than 200Hz !!! Far from covering audio frequency range.

    Same for data acquisition, you are working out an Rms value from 256 samples at a frequency of 22050Hz, that is you need ~11ms to get a unique sample !

    I may misunderstand something.

    Thanks

     

     

    Tags (2)
    2 REPLIES 2
    Denis
    New Poster

    Re: acoustic FFT

    I have patched reference code for my own application. But don’t trust the piece of code given in  https://developer.bosch.com/web/xdk/acoustic#6 it is simply not doing what it is meant to do.

    pdo
    Community Manager
    Community Manager

    Re: acoustic FFT

    Thanks for the update Denis, and if you know the error in the documentation and are willing to comment, we would always value being able to report that for improvement also!

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist