filoe / cscore

An advanced audio library, written in C#. Provides tons of features. From playing/recording audio to decoding/encoding audio streams/files to processing audio data in realtime (e.g. applying custom effects during playback, create visualizations,...). The possibilities are nearly unlimited.
Other
2.14k stars 450 forks source link

Question about noisiness and sampling multiple audio tracks #465

Open BlueCyro opened 2 years ago

BlueCyro commented 2 years ago

Hi, I've recently used CSCore in a little project of mine to precompute the FFT for an entire song file and play it back as an animation. Currently, I'm debating whether or not I should run the FFT on the individual channels and average the result, or combine the channels and then run a singular FFT on that. The problem I have with combining the channels however, is the phasing of multiple channels when songs employ sound waves that otherwise cancel eachother out when averaged.

The second problem I've got is that as the window goes higher (4096 and up for 44.1khz tracks), the effective "FPS" of the animation goes down. Is there a correct way to sample the file more frequently so as to increase the effective update rate even at bigger sizes?

Sorry if this isn't a great place to ask, but advice would be appreciated regardless!