Nier-Visualizer | A lightweight and efficient Android visual library | Android library
kandi X-RAY | Nier-Visualizer Summary
kandi X-RAY | Nier-Visualizer Summary
Nier Visualizer is a lightweight and efficient Android visual library written in pure Kotlin.It has an independent rendering thread, compatible with most of the equipment on the market. Nier Visualizer is ideal for audio visualization applications such as music players, recorder, live wallpaper and more. Nier Visualizer has six kinds of independent visual effects currently. More effects are under development, welcome to star operation to see in time.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Nier-Visualizer
Nier-Visualizer Key Features
Nier-Visualizer Examples and Code Snippets
Community Discussions
Trending Discussions on Nier-Visualizer
QUESTION
This is the goal that I am trying to achieve:
I would like to be able to take the audio recorded from the phones microphone and process the levels at given frequencies into an array that I could use to create a sort of "Bar graph" visualizer. I also need to calculate the BPM of the song playing to know the cadence at which to update the visualizer at.
What I am really looking for is just getting the frequency array and BPM calculations. I can deal with the actual visualization part if I can just figure out how to process the audio.
This is pretty much what I'm looking to make:
From the research I have done, it looks like a possible solution is using FFT (Fast Fourier Transform). For that I found this: stackoverflow. But that stackoverflow thread is for Java, and my app is currently written in Kotlin. I have read that it is possible to import Java into Kotlin, but I haven't been able to make it work in the couple of attempts I made. So maybe some advice on that would help.
Anyways though, I did end up finding a library that was written for Kotlin Nier Vizualizer. It does have a vizualization similar to one I'd like to reproduce, but for the life of me I cannot figure out where I would pull the frequency array from. I tried reading the buffers before they were passed into the visualizer, but it's just an insanely long string that I'm recieving. I mean, I'm not sure what I was expecting, but I could definitely use some help understanding how I would translate that into a data format that I can actually use.
Here's an example of where I'm at: KeyFrameMaker.kt
...ANSWER
Answered 2019-Sep-16 at 17:51If you're using the Android Visualizer class, you don't need some other FFT library, because the Visualizer class provides a getFFT()
method that returns to you audio that has already had an FFT applied to it. You just have to convert it to magnitudes on a dB scale to get it to look nice in your graphics.
You need to request microphone permission before you try to instantiate Visualizer or it will fail to initialize. Visualizer is largely implemented in C and is mostly a JNI wrapper, and as such throws lots of RuntimeExceptions if things go wrong, so you need to wrap your initialization and setup calls in try/catch blocks.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Nier-Visualizer
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page