Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by AggroBird · Apr 07, 2017 at 02:50 PM · audiosourcemicrophonemutegetspectrumdata

Get microphone FFT input without playback

Hi,

I am trying to get the spectrum data from a smartphone's microphone, but I don't want the microphone audio to play in the scene. (The clip is being recorded and loops)

Evidently, the audiosource must be playing in order to fetch the spectrum data, so I presumed that putting "audioSource.muted = true" would do the trick. This also mutes the spectrum data however.

The common workaround suggested currently is to create a mixer group that puts the volume to -80db, and assign that to the microphone audiosource. Doing this currently on iOS bugs out my global game volume however, making it impossible to increase the maximum volume above 50% (Unity 5.5.2p4)

Any suggestions on how I can achieve getting the spectrum data without having to actually play the recorded audioclip?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by MD_Reptile · Apr 07, 2017 at 02:51 PM

See this answer:

http://answers.unity3d.com/questions/1113690/microphone-input-in-unity-5x.html

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AggroBird · Apr 12, 2017 at 11:18 AM 0
Share

As it turns out, when Unity is using the microphone on iOS, the maximum speaker volume of the OS gets reduced by about half. (As mentioned in this post)

I am looking for a way to fetch the microphone FFT without it affecting the speaker volume on the device, preferably in a way that doesn't require an audio source in the scene with any workaround mixer values attached.

In an ideal situation, I would just be able to get the spectrum data directly from the audio clip, but I presume that is impossible without some kind of playback.

Thanks in advance

avatar image
0

Answer by Bunny83 · Apr 12, 2017 at 04:07 PM

I never really worked with microphone input. However when you can access the PCM data you could try my FFT implementation

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

GetSpectrumData doesn't update 2 Answers

Analyze Frequency from Microphone Jack only 0 Answers

Movement speed based on audio input 1 Answer

Audiosource.Play() not working 0 Answers

Can I GetSpectrumData from an AudioMixerGroup? I need that data with the filters applied 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges