All Projects → ImnIrdst → iiVisu

ImnIrdst / iiVisu

Licence: MIT License
A player/ recorder visualizer with the swipe to seek functionality.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to iiVisu

audiovisualizer
Another simple audio visualizer for android.
Stars: ✭ 33 (-70.54%)
Mutual labels:  audio-visualizer, visualizer, android-visualizer
visualizer2
OpenGL Audio Visualizers in Rust
Stars: ✭ 54 (-51.79%)
Mutual labels:  audio-visualizer, visualizer
catnip
terminal audio visualizer for linux/unix/macOS/windblows*
Stars: ✭ 79 (-29.46%)
Mutual labels:  audio-visualizer, visualizer
Fountain Of Colors
Music visualizer for Rainmeter
Stars: ✭ 65 (-41.96%)
Mutual labels:  audio-visualizer, visualizer
alicemq
RabbitMQ Visualizer
Stars: ✭ 102 (-8.93%)
Mutual labels:  visualizer
lumazoid
Firmware for the Lumazoid realtime music visualizer board
Stars: ✭ 85 (-24.11%)
Mutual labels:  visualizer
un-material-tab
(deprecated) Custom tab layout which can be used as a material TabLayout alternative and contains basic functionality which Google's TabLayout has.
Stars: ✭ 83 (-25.89%)
Mutual labels:  custom-view
modular-led-controller-workstation
🎵 🌈 Real-time LED strip music visualization using Python and the ESP8266 or Raspberry Pi
Stars: ✭ 21 (-81.25%)
Mutual labels:  audio-visualizer
RecyclerViewCardGallery
RecyclerView实现循环banner,替代ViewPager方案。能够快速滑动并最终定位到居中位置(相比于原库支持了循环滑动)
Stars: ✭ 610 (+444.64%)
Mutual labels:  custom-view
cryptoviz
A web-based Depth-Of-Market visualization for data of the Poloniex cryptocurrency exchange.
Stars: ✭ 65 (-41.96%)
Mutual labels:  visualizer
Amplituda
Amlituda - an android library that calculates amplitudes from audio and provides data in different formats. Based on this data, you can draw waveform. Android audio amplitude library.
Stars: ✭ 75 (-33.04%)
Mutual labels:  audio-visualizer
RxLoading
RxJava library for showing a loading (i.e. progress bar) state while waiting for async data with minimal effort and advanced options.
Stars: ✭ 49 (-56.25%)
Mutual labels:  custom-view
KittiViz
Data visualizer for Kitti dataset.
Stars: ✭ 18 (-83.93%)
Mutual labels:  visualizer
double-avatar-view
Instagram-like double avatar view with cropping
Stars: ✭ 31 (-72.32%)
Mutual labels:  custom-view
mCustomView
总结了博主这么多年所写的自定义view,以及自定义view的教程
Stars: ✭ 17 (-84.82%)
Mutual labels:  custom-view
PyViz3D
PyViz3D is a web-based visualizer for 3D objects and point clouds.
Stars: ✭ 90 (-19.64%)
Mutual labels:  visualizer
Lano-Visualizer
A simple but highly configurable visualizer with rounded bars.
Stars: ✭ 114 (+1.79%)
Mutual labels:  visualizer
pulseviz.py
Audio visualizer for PulseAudio written in Python
Stars: ✭ 24 (-78.57%)
Mutual labels:  audio-visualizer
music visualizer
Shader viewer / music visualizer for Windows and Linux
Stars: ✭ 137 (+22.32%)
Mutual labels:  visualizer
vue-dictaphone
🎙️ Vue.js dictaphone component to record audio from the user
Stars: ✭ 22 (-80.36%)
Mutual labels:  audio-visualizer

iiVisu

Android Arsenal

A player/ recorder visualizer with the swipe to seek functionality.

Demo

Setup

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

Step 2. Add the dependency

dependencies {
  implementation 'com.github.imnirdst:iivisu:1.1.0'
}

Usage

This repository contains a sample app that shows how to use iiVisu.

Recorder

RecorderVisualizer doesn't support swipe to seek functionality.

<com.imn.iivisu.RecorderVisualizer
    android:id="@+id/visualizer"
    android:layout_width="0dp"
    android:layout_height="256dp"
    app:maxAmp="100"
    app:barWidth="3dp"
    app:spaceBetweenBar="2dp"
    app:loadedBarPrimeColor="@color/primaryLight"
    app:backgroundBarPrimeColor="@color/gray"
    app:layout_constraintBottom_toTopOf="@id/timeline_text_view"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent" />
visualizer.ampNormalizer = { sqrt(it.toFloat()).toInt() }

recorder.apply {
    onStop = { visualizer.clear() }
    onAmpListener = {
        runOnUiThread {
            visualizer.addAmp(it)
        }
    }
}

Player

<com.imn.iivisu.PlayerVisualizer
    android:id="@+id/visualizer"
    android:layout_width="0dp"
    android:layout_height="256dp"
    app:barWidth="3dp"
    app:spaceBetweenBar="2dp"
    app:approximateBarDuration="50"
    app:loadedBarPrimeColor="@color/primaryLight"
    app:backgroundBarPrimeColor="@color/gray"
    app:layout_constraintBottom_toTopOf="@id/timeline_text_view"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent" />
visualizer.apply {
    onStartSeeking = { player.pause() }
    onSeeking = { timelineTextView.text = it.formatAsTime() }
    onFinishedSeeking = { time, isPlayingBefore ->
        player.seekTo(time)
        if (isPlayingBefore) {
            player.resume()
        }
    onAnimateToPositionFinished = { time, isPlaying ->
            player.seekTo(time)
        }
    }
}

visualizer.ampNormalizer = { sqrt(it.toFloat()).toInt() }

player.onProgress = { time, isPlaying ->
    visualizer.updateTime(time.toInt(), isPlaying)
}

val amps = player.loadAmps()
visualizer.setWaveForm(amps, player.tickDuration)

Documentation

  • maxAmp: Maximum amp that you expected to receive from the mic. Amps with higher than maxAmp are shown as a full height bar. This is calculated automatically in the PlayerVisualizer.

  • barWidth: Width of each bar.

  • spaceBetweenBar: Space between each bar.

  • approximateBarDuration: Defines approximate duration of each bar. The exact duration of each bar is calculated and stored in the barDuration variable.

  • loadedBarPrimeColor: Defines loaded bar color.

  • backgroundBarPrimeColor: Defines background (unloaded) bar color.

  • ampNormalizer: Receives a lambda method for normalizing amps. (for better visualization)

  • addAmp: Used for adding an amp to RecorderVisualizer and its bar gets drawn Immediately.

  • setWaveForm: Receives a list of integer amps and a tickDuration which defines the time per each amp.

  • updateTime: Used for updating PlayerVisualizer timeline to specified location. isPlaying param is used for defining behaviour of onFinishedSeeking callback.

  • onStartSeeking : Receives a callback for the action needed to happen when seeking starts.

  • onSeeking : Receives a callback for the action needed to happen during the seeking process and contains current time position of the visualizer.

  • onFinishedSeeking: Receives a callback for the action needed to happen after the seeking finishes and contains time position of the visualizer and a variable for deciding whether you need to resume player after seeking or not.

  • seekOver(amount): Moves visualizer's cursor amount ahead/back and notifies using onAnimateToPositionFinished callback.

  • seekTo(position): Moves visualizer's cursor to position and notifies using onAnimateToPositionFinished callback.

  • onAnimateToPositionFinished: Receives a callback for the action needed to happen after the moving to position finishes and contains time position of the visualizer and a variable for deciding whether you need to resume player after seeking or not.

License

MIT. See the LICENSE file for details.

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].