Giter Club home page Giter Club logo

zlhistogramaudioplot's Introduction

ZLHistogramAudioPlot

A hardware-accelerated audio visualization view using EZAudio, inspired by AudioCopy. ZLHistogramAudioPlot was originally developed for Murmur.

Preview

###Buffer preview buffer

###Rolling preview rolling

CocoaPods

You can install ZLHistogramAudioPlot through CocoaPods adding the following to your Podfile:

pod 'ZLHistogramAudioPlot'

Usage

Checkout the demo app for an example.

Customizable attributes:

/// The upper bound of the frequency range the audio plot will display. Default:
/// 10000Hz
@property (nonatomic) float maxFrequency;

/// The lower bound of the frequency range the audio plot will display. Default:
/// 1200Hz
@property (nonatomic) float minFrequency;

/// The number of bins in the audio plot. Default: 30
@property (nonatomic) NSUInteger numOfBins;

/// The padding of each bin in percent width. Default: 0.1
@property (nonatomic) CGFloat padding;

/// The gain applied to the height of each bin. Default: 10
@property (nonatomic) CGFloat gain;

/// A float that specifies the vertical gravitational acceleration applied to
/// each bin. Default: 10 pixel/sec^2
@property (nonatomic) float gravity;

/// The color of all bins in the audio plot.
@property (strong, nonatomic) UIColor *color;

/// An array of color objects defining the color of each bin in the audio plot.
/// If not set, the color attribute will be used instead. Currently only
/// supported by plot type EZPlotTypeBuffer.
@property (strong, nonatomic) NSArray *colors;

Dependencies

  • ZLHistogramAudioPlot is a subclass of EZAudioPlot. It requires EZAudio.
  • It also requires Accelerate framework for hardware acceleration.

Compatibilty

ZLHistogramAudioPlot uses the following interface provided by EZAudio to get audio data:

- (void)updateBuffer:(float *)buffer withBufferSize:(UInt32)bufferSize;

It can be easily modified to work with Audio Unit and Core Audio.

Requirements

  • iOS 6 or higher.
  • Automatic Reference Counting (ARC).

License

ZLHistogramAudioPlot is available under the MIT license. See the LICENSE file for more info.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.