Git Product home page Git Product logo

scwaveformview's Introduction

SCWaveformView

A blazing fast customizable waveform view. Extract the audio section of an asset (which can be both video or audio) and display a waveform. Compared to other libs that are found on the web, this one does not do much memory allocations. Only one pass is also done to create the waveform.

Main features:

  • Can show a play progress
  • Colors are changeable at runtime without reprocessing the asset
  • Generated waveforms are retrievable
  • Set the asset, then you are good to go
  • ARC

This project is inspired from https://github.com/fulldecent/FDWaveformView

Podfile

If you are using cocoapods, you can use this project with the following Podfile

platform :ios, '7.0'
pod "SCWaveformView", "1.0.0"

Example

 // Allocating the waveformview
 SCWaveformView *waveformView = [[SCWaveformView alloc] init];
 
 // Setting the asset
 AVAsset *asset = [AVURLAsset URLAssetWithURL:[NSURL URLWithString:@"blabla.mp3"]];
 waveformView.asset = asset;
 
 // Setting the waveform colors
 waveformView.normalColor = [UIColor greenColor];
 waveformView.progressColor = [UIColor redColor];
 
 // Set the play progress
 waveformView.progress = 0.4;
 
 // Even though the waveformview will eventually reprocess the waveforms when needed
 // You can ask it to generate the waveforms right now
 [waveformView generateWaveforms];
 
 // Retrieve the waveforms. for whatever reasons
 UIImage *progressWaveformImage = waveformView.generatedProgressImage;
 UIImage *normalWaveformImage = waveformView.generatedNormalImage;

scwaveformview's People

Contributors

rflex avatar msrdjan avatar

Watchers

James Cloos avatar  avatar

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.