All Projects → bogerchan → Nier Visualizer

bogerchan / Nier Visualizer

Licence: apache-2.0
A lightweight and efficient Android visual library.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Nier Visualizer

Darkmode Js
DarkModeJS helps you to auto detect user's time and switch theme to darkside
Stars: ✭ 328 (-22.09%)
Mutual labels:  lightweight
Bytesize Icons
Tiny style-controlled SVG iconset (101 icons, 12kb)
Stars: ✭ 3,662 (+769.83%)
Mutual labels:  lightweight
Espnetv2
A light-weight, power efficient, and general purpose convolutional neural network
Stars: ✭ 377 (-10.45%)
Mutual labels:  lightweight
Lightweight Human Pose Estimation 3d Demo.pytorch
Real-time 3D multi-person pose estimation demo in PyTorch. OpenVINO backend can be used for fast inference on CPU.
Stars: ✭ 331 (-21.38%)
Mutual labels:  lightweight
Fbg
Lightweight C 2D graphics API agnostic library with parallelism support
Stars: ✭ 349 (-17.1%)
Mutual labels:  lightweight
Spacy Streamlit
👑 spaCy building blocks and visualizers for Streamlit apps
Stars: ✭ 360 (-14.49%)
Mutual labels:  visualizer
Structopt
Parse command line arguments by defining a struct
Stars: ✭ 323 (-23.28%)
Mutual labels:  lightweight
Offen
The fair and lightweight alternative to common web analytics tools.
Stars: ✭ 385 (-8.55%)
Mutual labels:  lightweight
Trumbowyg
A lightweight and amazing WYSIWYG JavaScript editor under 10kB
Stars: ✭ 3,664 (+770.31%)
Mutual labels:  lightweight
Graph Visualizer
Visualizer for your Playable graphs
Stars: ✭ 367 (-12.83%)
Mutual labels:  visualizer
Beedle
A tiny library inspired by Redux & Vuex to help you manage state in your JavaScript apps
Stars: ✭ 329 (-21.85%)
Mutual labels:  lightweight
Graphql Request
Minimal GraphQL client supporting Node and browsers for scripts or simple apps
Stars: ✭ 4,171 (+890.74%)
Mutual labels:  lightweight
Ocaml Containers
A lightweight, modular standard library extension, string library, and interfaces to various libraries (unix, threads, etc.) BSD license.
Stars: ✭ 367 (-12.83%)
Mutual labels:  lightweight
Wondercms
WonderCMS - fast and small flat file CMS (5 files)
Stars: ✭ 330 (-21.62%)
Mutual labels:  lightweight
Flashdb
An ultra-lightweight database that supports key-value and time series data | 一款支持 KV 数据和时序数据的超轻量级数据库
Stars: ✭ 378 (-10.21%)
Mutual labels:  lightweight
Kubeoperator
KubeOperator 是一个开源的轻量级 Kubernetes 发行版,专注于帮助企业规划、部署和运营生产级别的 K8s 集群。
Stars: ✭ 4,147 (+885.04%)
Mutual labels:  lightweight
Uguu
Simple lightweight temporary file hosting.
Stars: ✭ 359 (-14.73%)
Mutual labels:  lightweight
Markdowneditor
Lightweight markdown editor written for windows,only one GREEN exe file
Stars: ✭ 403 (-4.28%)
Mutual labels:  lightweight
React Select Search
⚡️ Lightweight select component for React
Stars: ✭ 379 (-9.98%)
Mutual labels:  lightweight
Lulumi Browser
Lulumi-browser is a lightweight browser coded with Vue.js 2 and Electron.
Stars: ✭ 367 (-12.83%)
Mutual labels:  lightweight

Nier Visualizer

Language Switch: English / 中文

Video Preview

Youtube link

Video limit, please click this image.

1. Nier Visualizer

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.

2. Effect display (constantly updated)

ColumnarType1Renderer ColumnarType2Renderer ColumnarType3Renderer
ColumnarType1Renderer ColumnarType2Renderer ColumnarType3Renderer
ColumnarType4Renderer(FFT) LineRenderer CircleBarRenderer
ColumnarType4Renderer(FFT) LineRenderer CircleBarRenderer
CircleRenderer Compound effect 1 Compound effect 2
CircleRenderer Compound effect1 Compound effect 2
Compound effect 3 Star this project to see more
Compound effect 3 Coming soon

3. How to

3.1 Dependencies

  1. Add it in your root build.gradle at the end of repositories:
allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
  1. Add the dependency
dependencies {
		compile 'com.github.bogerchan:Nier-Visualizer:v0.1.3'
	}

Tips: The Visualizer requires audio permission (android.permission.RECORD_AUDIO), please declare it in your project.

3.2 Sample project

Nier Visualizer project provides a demo module for reference.

3.3 Use Kotlin

3.3.1 Framework initialization

val visualizerManager = NierVisualizerManager()

// need a param of audioSession, 0 is output mix, AudioRecord user please see 3.3.7
val state = visualizerManager.init(0)
if (NierVisualizerManager.SUCCESS != state) {
   // do something...
}

3.3.2 Framework release

visualizerManager.release()

3.3.3 Start rendering

visualizerManager.start(surfaceView, arrayOf(ColumnarType1Renderer()))

3.3.4 Stop rendering

visualizerManager.stop()

3.3.5 Pause rendering

visualizerManager.pause()

3.3.6 Resume rendering

visualizerManager.resume()

3.3.7 Framework initialization by customized data source

val visualizerManager = NierVisualizerManager()

visualizerManager.init(object : NierVisualizerManager.NVDataSource {

                        // skip some code...

                        /**
                         * Tell the manager about the data sampling interval.
                         * @return the data sampling interval which is millisecond of unit.
                         */
                        override fun getDataSamplingInterval() = 0L

                         /**
                         * Tell the manager about the data length of fft data or wave data.
                         * @return the data length of fft data or wave data.
                         */
                        override fun getDataLength() = mBuffer.size

                         /**
                         * The manager will fetch fft data by it.
                         * @return the fft data, null will be ignored by the manager.
                         */
                        override fun fetchFftData(): ByteArray? {
                            return null
                        }

                        /**
                         * The manager will fetch wave data by it.
                         * @return the wave data, null will be ignored by the manager.
                         */
                        override fun fetchWaveData(): ByteArray? {
                            // skip some code...
                            return mBuffer
                        }

                    })

3.4 Use Java

3.4.1 Framework initialization

final NierVisualizerManager visualizerManager = new NierVisualizerManager();

// need a param of audioSession, 0 is output mix, AudioRecord user please see 3.4.7
final int state = visualizerManager.init(0);
if (NierVisualizerManager.SUCCESS != state) {
   // do something...
}

3.4.2 Framework release

visualizerManager.release();

3.4.3 Start rendering

visualizerManager.start(surfaceView, new IRenderer[]{new LineRenderer(true)});

3.4.4 Stop rendering

visualizerManager.stop();

3.4.5 Pause rendering

visualizerManager.pause();

3.4.6 Resume rendering

visualizerManager.resume();

3.4.7 Framework initialization by customized data source

NierVisualizerManager visualizerManager = new NierVisualizerManager();

visualizerManager.init(new NierVisualizerManager.NVDataSource() {

    // skip some code...

    /**
     * Tell the manager about the data sampling interval.
     * @return the data sampling interval which is millisecond of unit.
     */
    @Override
    public long getDataSamplingInterval() {
        return 0L;
    }

    /**
     * Tell the manager about the data length of fft data or wave data.
     * @return the data length of fft data or wave data.
     */
    @Override
    public int getDataLength() {
        return mBuffer.length;
    }

    /**
     * The manager will fetch fft data by it.
     * @return the fft data, null will be ignored by the manager.
     */
    @Nullable
    @Override
    public byte[] fetchFftData() {
        return null;
    }

    /**
     * The manager will fetch wave data by it.
     * @return the wave data, null will be ignored by the manager.
     */
    @Nullable
    @Override
    public byte[] fetchWaveData() {
        // skip some code...
        return mBuffer;
    }
});

4. Follow-up plan

  • Thinking about implementing visual effects like Siri.
  • Some gallery of visual effects tailored for DJ music.
  • If you are interested in it, welcome to Fork to do it together!

5. Thanks

Ported some of the android-visualizer,visual effects, thanks to felixpalmer!

6. Protocol

Copyright 2018 Boger Chan

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].