Horizon - Simple visual equaliser for Android

Overview

Horizon - Simple visual equaliser for Android

This project aims to provide pretty cool equaliser for any Android audio project. Made in [Yalantis] (https://yalantis.com/?utm_source=github)

Check this [project on dribbble] (https://dribbble.com/shots/2452050-Record-Audio-Sample)

[Read more about Horizon] (https://yalantis.com/blog/horizon-open-source-library-for-sound-visualization/)

example

Usage

For a working implementation, please have a look at the Sample Project - sample

Get it on Google Play

  1. Include the library as local library project.

    compile 'com.yalantis:eqwaves:1.0.1'

  2. Initialize Horizon object with params regarding to your sound

    mHorizon = new Horizon(glSurfaceView, getResources().getColor(R.color.background),
                    RECORDER_SAMPLE_RATE, RECORDER_CHANNELS, RECORDER_ENCODING_BIT);
    ```
    
  3. To update Horizon call updateView method with chunk of sound data to proceed

    byte[] buffer = new byte[bufferSize];
    //here we put some sound data to the buffer
    mHorizon.updateView(buffer);
    ```

Compatibility

  • Library - Android ICS 4.0+
  • Sample - Android ICS 4.0+

Changelog

Version: 1.0.1

  • Version update

Version: 1.0

  • Initial Build

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the library.

License

Copyright 2017, Yalantis

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.
Comments
  • Can Horizon work without own audio recorder?

    Can Horizon work without own audio recorder?

    Hi,

    I'm using 3rd-party audio service in my app, it has a capsuled audio recorder instance, so it conflicts with Horizon, how can I use Horizon for this situation?

    Thanks!

    opened by XinwenCheng 4
  • Usage in emulator

    Usage in emulator

    Hey,

    Thanks for all of your hard work on this fantastic library. I've had issues getting the library to run on the emulator due to detection of the device's open gl version.

        private void initView(GLSurfaceView glSurfaceView, @ColorInt int backgroundColor) {
            // check if the system supports opengl es 2.0.
            Context context = glSurfaceView.getContext();
            final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
            final ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
            final boolean supportsEs2 = configurationInfo.reqGlEsVersion >= 0x20000;
    
            if (supportsEs2) {
                // Request an OpenGL ES 2.0 compatible context.
                glSurfaceView.setEGLContextClientVersion(2);
    
                // Set the renderer to our demo renderer, defined below.
                mRenderer = new BezierRenderer(glSurfaceView, backgroundColor);
                glSurfaceView.setRenderer(mRenderer);
                glSurfaceView.setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
            } else {
                throw new UnsupportedOperationException();
            }
        }
    

    The line final boolean supportsEs2 = configurationInfo.reqGlEsVersion >= 0x20000; always returns false and it appears that my emulator thinks that its opengl version is 0.0. Is this just a limitation of testing libraries dependent on opengl in general, or is there something I can do to make this work properly?

    So far, I've gone into the emulator's settings and set OpenGL ES Render to Desktop native OpenGL and OpenGL ES API Level to Host Maximum.

    opened by cyorobert 1
  • Cannot sync gradle when dependency is added

    Cannot sync gradle when dependency is added

    When I add the dependency compile 'com.yalantis:eqwaves:1.0.1' to my gradle the sync process ends with the error: "manifest merger failed with multiple errors, see logs" with no further explanation on the logs.

    opened by MakawaMT 1
  • Rendering not working in Cyanogen 12.1

    Rendering not working in Cyanogen 12.1

    Hi. I have a LG G2 with Cyanogen 12.1 installed.. The render works by 0.5-1 second and freezes. On my another device, Motorola G2, works fine. is it a problem with Cyanogen or with the library?

    bug 
    opened by ppamorim 1
  • How can we use this with Recorded audio

    How can we use this with Recorded audio

    I tried my luck with Visualizer and sending the byte[] data from Visualizer.setDataCaptureListener but the vizualization is not syncronized.

    I tried both Waveformdata and FFTData

    question 
    opened by gouravd 1
  • Support for BufferedInputStream

    Support for BufferedInputStream

    Does Horizon support sound recorded with MediaRecorder (separate activity) and then loaded in a fragment using BufferedInputStream from a file?

    This is how I load it in but I get weird results, it initializes the wave and then the wave disappears after a second.

                        int size = (int) audio_file.length();
                        byte[] bytes = new byte[size];
                        BufferedInputStream buf = new BufferedInputStream(new FileInputStream(audio_file));
                        buf.read(bytes, 0, bytes.length);
                        buf.close();
    
    
                        if( isRecording){
                            mHorizon.updateView(bytes);
                        }
    
    

    Any tips would be awesome!

    opened by ddeisadze 0
  • Usage with short[]

    Usage with short[]

    Thank you for your hard work making this excellent library. According to the AudioRecord documentation, reading byte[]s from a buffer is only compatible with ENCODING_PCM_8BIT.

    Reads audio data from the audio hardware for recording into a byte array. The format specified in the AudioRecord constructor should be ENCODING_PCM_8BIT to correspond to the data in the array.

    https://developer.android.com/reference/android/media/AudioRecord.html#read(byte[], int, int)

    I see that in your example you are indeed using reading a byte[] from the AudioRecord buffer, yet you're also specifying ENCODING_PCM_8BIT. Is there any way to use Horizon with a short[], or should we continue to use byte[] and specify ENCODING_PCM_8BIT?

    opened by cyorobert 1
  • Continuous animation even in a quiet room

    Continuous animation even in a quiet room

    I want the wave to respond to human speech. Is there some way it could ignore background noise like the sound of fan or ticking of clock, because it keeps plotting waves always and never comes down to a straight line?

    opened by Akshita2194 0
Owner
Yalantis
Knowledge is power and the way to get power is by sharing knowledge. We are open source because this is a smart way to live, work and play.
Yalantis
Android Library to implement simple touch/tap/swipe gestures

SimpleFingerGestures An android library to implement simple 1 or 2 finger gestures easily Example Library The library is inside the libSFG folder Samp

Arnav Gupta 315 Dec 21, 2022
Simple Visualizer from mic input for Android.

Voice Recording Visualizer Simple Visualizer from mic input for Android. Usage @Override protected void onCreate(Bundle savedInstanceState) {

Takayuki Yorikane 542 Nov 24, 2022
Snake View is a simple and animated linear chart for Android.

Snake View Snake library is a simple and animation line chart for Android. Latest Version How to use Configuring your project dependencies Add the lib

Txus Ballesteros 339 Dec 14, 2022
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.

Note: we are not actively responding to issues right now. If you find a bug, please submit a PR. Android Sliding Up Panel This library provides a simp

Umano: News Read To You 9.4k Dec 31, 2022
[] A simple way to "badge" any given Android view at runtime without having to cater for it in layout

Android ViewBadger A simple way to "badge" any given Android view at runtime without having to cater for it in layout. Note: If your aim is to replica

Jeff Gilfelt 3k Nov 28, 2022
A simple, customizable and easy to use swipeable view stack for Android.

SwipeStack A simple, customizable and easy to use swipeable view stack for Android. QuickStart Include the Gradle dependency dependencies { compil

Frederik Schweiger 1.5k Dec 30, 2022
A simple library to add Emoji support to your Android Application

Emoji A library to add Emoji support to your Android app. Emojis can be picked in a PopupWindow. In order to edit and display text with Emojis this li

Niklas Baudy 1.4k Jan 4, 2023
An Android library containing a simple TableView and an advanced SortableTableView providing a lot of customisation possibilities to fit all needs.

SortableTableView for Android An Android library providing a TableView and a SortableTableView. Minimum SDK-Version: 11 | Compile SDK-Version: 25 | La

Ingo Schwarz 1.1k Dec 5, 2022
A Simple Android LabelView.

#FlycoLabelView ####中文版 A Simple Android LabelView. ##Demo ##Gradle dependencies{ compile 'com.flyco.labelview:FlycoLabelView_Lib:1.0.2@aar' } ##A

Flyco 883 Nov 13, 2022
SmileyRating is a simple rating bar for android. It displays animated smileys as rating icon.

Smiley Rating SmileyRating is a simple rating bar for android. It displays animated smileys as rating icon. Drawn completely using android canvas Insp

Sujith Niraikulathan 1.1k Dec 22, 2022
Dead simple Android Tooltip Views

TooltipView A dead simple way to to add tooltips to your Android app. <com.venmo.view.TooltipView android:layout_width="wrap_content"

Venmo 489 Dec 12, 2022
A simple and Elegant Showcase view for Android

Tuto Showcase A simple and Elegant Showcase view for Android TutoShowcase.from(this) .setContentView(R.layout.tuto_sample) .on(R.id.about) //

Florent CHAMPIGNY 509 Nov 25, 2022
Simple and powerful library to emulate iOS's "3D Touch" preview functionality on Android.

Android 3D Touch - PeekView iOS uses 3D Touch as a way to "peek" into full content, such as emails, pictures, web searches, etc. While they have dedic

Luke Klinker 502 Dec 29, 2022
Simple and fantastic wheel view in realistic effect for android.

Overview ![Size](https://img.shields.io/badge/Size-17 KB-e91e63.svg) Contact Preview Demo WheelPicke.APK Include Compile compile 'cn.aigestudio.wheelp

Aige 2.5k Jan 6, 2023
Implement a simple and funny Android animation —— the emoji rain in WeChat app.

中文版文档 Emoji Rain Hey, it's raining emoji! This is a really simple and funny animation for Android. You could find similar animations when sending "Hap

LoLo 615 Nov 21, 2022
Simple card app for Udacity's Android Basics: User Interface course

just-because-card Simple card app for Udacity's Android Basics: User Interface c

null 0 Jan 6, 2022
This library offers a simple method to add a small badge icon to your ActionBar-MenuItem

Android-ActionItemBadge ActionItemBadge is a library which offers a simple and easy to use method to add a badge to your action item! Screenshots Incl

Mike Penz 1.3k Jan 1, 2023
A simple implementation of swipe card like StreetView

A simple implementation of swipe card like StreetView!! DONATIONS This project needs you! If you would like to support this project's further developm

Michele Lacorte 831 Jan 4, 2023
A simple library to let you sign (or draw lines) smoothly with your finger into a view and save it.

FingerSignView Introduction FingerSignView is a simple library that lets you finger, or draw lines, smoothly with your finger into a View and save it

Agnaldo Pereira 25 Nov 20, 2022