Mic Input with Unity and C#

Hey there,

I recently stumbled upon a problem that I can’t wrap my head around.
In a nutshell, I’d like to:

  • Record input from a microphone
  • Adjust local scales of game objects in Unity based on the volume of the mic input

While surfing the web, I found some similar questions about microphone input combined with FMOD.
I followed the steps those people took, and ended up with a Programmer Instrument in my FMOD project, combined with the C# script that comes with it (from the API Documentation, the Programmer Instrument example cs). Now the real question:
How do I start recording from a mic?
I’ve read thru the documentation, but can’t find any good examples that are able to solve my problem.
How do I use System::recordStart with C#, same for Sound::lock.

I’ve done similar stuff like this with the Unity sound system:
Scaling based of an audio file/mic input

In the Tutorial Unity Files, I found the visualizer scene, which helped me a ton with understanding how things work and I was able to convert my Unity audio method (1st scene in the video), to do the exact same thing but with FMOD:

As conclusion, how do I start recording microphone input, combined with Unity and C#.

Thanks in advance,
Niels :slight_smile:

It looks like you have made some progress: