How do I audio to simulate control

Get help using Construct 2

Post » Thu Nov 03, 2016 11:22 am

Hi,

I wonder, if there is a way to use audio input to control a player.

More precise: The higher the input volume is, the more up (on the y-axis) the player should go.

Can anyone help me, doing that?

Thanks,

Held
B
5
S
1
Posts: 45
Reputation: 463

Post » Thu Nov 03, 2016 12:11 pm

u mean by beat? or by volume? take a look at the Audio analyser example in C2
B
75
S
22
G
68
Posts: 1,337
Reputation: 43,271

Post » Fri Nov 04, 2016 9:51 am

I mean by volume. I want to use my voice as the controller. The louder I talk, the higher (y-axis) my sprite should go.

I'm trying to modify the Audio analyser project, but don't suceed yet.

Can anyone help?

Thanks.
B
5
S
1
Posts: 45
Reputation: 463

Post » Fri Nov 04, 2016 10:24 am

When you execute C2 and make a new project, there is actually a template named "Microphone input" that already modifies the Audio Analyser to use the microphone as input instead of a sound.

From there, according to the volume (the value of the RMS shown in the example: Audio.AnalyserRMSLevel("mic", 0) *2 or *4) you should be able to modify the Y position of your sprite.
The actions that modify the sizes of the sprites in the event 9 is very close to what you are looking to get.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

Post » Fri Nov 04, 2016 9:51 pm

Kyatric, you made my day. Finally I got the first promising results.
I will play around with it and maybe I can come back with questions later.

One already now: Can construct manage two seperate mic-inputs ?

Thanks a lot
B
5
S
1
Posts: 45
Reputation: 463


Return to How do I....?

Who is online

Users browsing this forum: David181, OBLIVION and 59 guests