Latest 0.0.1
Homepage https://github.com/zhxnlai/ZLHistogramAudioPlot
License MIT
Platforms ios 6.0, requires ARC
Dependencies EZAudio
Frameworks UIKit, Accelerate
Authors

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.

Latest podspec

{
    "name": "ZLHistogramAudioPlot",
    "version": "0.0.1",
    "summary": "A hardware-accelerated audio visualization view using EZAudio, inspired by AudioCopy.",
    "description": "  A hardware-accelerated audio visualization view using EZAudio, inspired by [AudioCopy](https://itunes.apple.com/us/app/audiocopy/id719137307?mt=8).n",
    "homepage": "https://github.com/zhxnlai/ZLHistogramAudioPlot",
    "screenshots": "https://raw.githubusercontent.com/zhxnlai/ZLHistogramAudioPlot/master/Previews/ZLHistogramAudioPlotBuffer.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Zhixuan Lai": "[email protected]"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source": {
        "git": "https://github.com/zhxnlai/ZLHistogramAudioPlot.git",
        "tag": "0.0.1"
    },
    "source_files": "ZLHistogramAudioPlot/*.{h,m}",
    "frameworks": [
        "UIKit",
        "Accelerate"
    ],
    "requires_arc": true,
    "dependencies": {
        "EZAudio": []
    }
}

Pin It on Pinterest

Share This