# Audio games.

Get help using Construct 2

### » Sun May 26, 2013 4:41 am

Hi there, Im thinking of making a shooter that interacts with the background music(tempo controls shot speed etc) and I was wondering if there is an easy(easier) way of making it than hand programming? Im assuming not, but I wasnt sure of any audio plug ins that have been created for music games or anything like that.

Thanks for any info,
B
32
S
5
Posts: 156
Reputation: 3,210

### » Sun May 26, 2013 5:10 am

It would take a lot of CPU horsepower. You would need to sample at about
8K samples per second (about AM radio quality). Analyze the last seconds worth of data 15 times a second, and then determine the rhythm, I would do that with finding the power (sum of selected amplitudes).

What you are trying to do is reasonable but it takes CPU power and a fairly sophisticated algorithm.

Other interesting effects are changing the color of the bullets based on the power at different frequencies. Do a fast fourier transform to get the spectrum, then analyze the power of each frequency, use that to to set the color of the shooting.

Eric
B
3
Posts: 1
Reputation: 727

### » Tue May 28, 2013 6:50 pm

[QUOTE=ericaker] It would take a lot of CPU horsepower. You would need to sample at about
8K samples per second (about AM radio quality). Analyze the last seconds worth of data 15 times a second, and then determine the rhythm, I would do that with finding the power (sum of selected amplitudes).

What you are trying to do is reasonable but it takes CPU power and a fairly sophisticated algorithm.

Other interesting effects are changing the color of the bullets based on the power at different frequencies. Do a fast fourier transform to get the spectrum, then analyze the power of each frequency, use that to to set the color of the shooting.

Eric[/QUOTE]

Haha, that seems way more complicated than I would be able to pull off in time. Cool ideas tho.
B
32
S
5
Posts: 156
Reputation: 3,210