benoit-pereira-da-silva / Soundwaveform
Licence: mit
Generate WaveForms Images from Sounds and Videos on macOS and iOS (Swift 5.x)
Stars: ✭ 119
Programming Languages
swift
15916 projects
Projects that are alternatives of or similar to Soundwaveform
denver.lua
a simple library to help you play custom waveforms with LÖVE
Stars: ✭ 66 (-44.54%)
Mutual labels: waveform, sound
Akwf Free
Adventure Kid Wave Forms are a collection of sampled one cycle waveforms for use in synthesizers or similar sound generators.
Stars: ✭ 179 (+50.42%)
Mutual labels: sound, waveform
Torch Audiomentations
Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning.
Stars: ✭ 164 (+37.82%)
Mutual labels: sound, waveform
Blipkit
C library for creating the beautiful sound of old sound chips
Stars: ✭ 23 (-80.67%)
Mutual labels: sound, waveform
Musicott
JavaFX application that manages and plays music files.
Stars: ✭ 97 (-18.49%)
Mutual labels: waveform
Argos
Argos: a data viewer that can read HDF5, NetCDF4, and other file formats.
Stars: ✭ 118 (-0.84%)
Mutual labels: plot
Wad
Web Audio DAW. Use the Web Audio API for dynamic sound synthesis. It's like jQuery for your ears.
Stars: ✭ 1,540 (+1194.12%)
Mutual labels: sound
Covid19 Dashboard
🦠 Django + Plotly Coronavirus dashboard. Powerful data driven Python web-app, with an awesome UI. Contributions welcomed! Featured on 🕶Awesome-list
Stars: ✭ 100 (-15.97%)
Mutual labels: plot
Simple Sdl2 Audio
A simple SDL2 audio library without SDL_Mixer for playing music and multiple sounds natively in SDL2
Stars: ✭ 111 (-6.72%)
Mutual labels: sound
Highcharts Chart
Polymer Element wrapper for highcharts library. Seamlessly create various types of charts from one element.
Stars: ✭ 97 (-18.49%)
Mutual labels: plot
Grafica.js
A simple and configurable plotting library for p5.js
Stars: ✭ 106 (-10.92%)
Mutual labels: plot
Cephalopod
A sound fader for AVAudioPlayer written in Swift for iOS, tvOS and macOS.
Stars: ✭ 103 (-13.45%)
Mutual labels: sound
React Native Sound Recorder
Simplest Sound Recorder for React Native
Stars: ✭ 103 (-13.45%)
Mutual labels: sound
SoundWaveForm
Allows to extract sound samples from Video or Sounds files very efficiently (it relies on the Accelerate framework). SoundWaveForm expose an optimized cross platform drawing that renders the waveform into an Image.
It supports
- macOS 10.11 & +
- iOS 8 & +
- swift 5.x
- if you need to support swift 4 use v3.0.2
- if you need to support swift 3 use the v2.0.1
Screen Shots
Usage sample
The framework is composed of a SamplesExtractor and a WaveFormDrawer.
// Configure the drawings
let configuration = WaveformConfiguration( size: waveFormView.bounds.size,
backgroundColor: WaveColor.lightGray,
color: WaveColor.red,
style: .striped,
position: .middle,
scale: 1)
// Extract the downsampled samples
// Proceed to extraction
SamplesExtractor.samples(audioTrack: track,
timeRange: nil,
desiredNumberOfSamples: 500,
onSuccess:{ samples, sampleMax, id in
// Let's display the waveform in a view
self.waveFormView.image = WaveFormDrawer.image(from: samples, with: configuration)
},
onFailure: { error, id in
... // Handle the error e.g: print("\(id ?? "") \(error)")
}
)
How to extract sample from a specified timeRange?
You can define AVAssetReader.timeRange.
let asset = AVURLAsset(url: url)
let audioTracks:[AVAssetTrack] = asset.tracks(withMediaType: AVMediaTypeAudio)
if let track:AVAssetTrack = audioTracks.first{
// Define the timeRange from second 1 to second 10
let startTime = CMTime(seconds: 1, preferredTimescale: 1000)
let endTime = CMTime(seconds: 10, preferredTimescale: 1000)
let timeRange = CMTimeRangeMake(startTime, endTime)
// Proceed to extraction (refer to previous code)
SamplesExtractor.samples(audioTrack: track,
timeRange:timeRange,
desiredNumberOfSamples: 500,
onSuccess:{ samples, sampleMax, id in
... // Proceeed
},
onFailure: { error, id in
... // Handle the error
}
)
}
Installation
- Via SPM: add
https://github.com/benoit-pereira-da-silva/SoundWaveForm
- Via Carthage: Add to your Cartfile
github "benoit-pereira-da-silva/SoundWaveForm"
- Copy the two source files :
Sources/SoundWaveForm/
Inspiration
This project has been largely inspired by FDWaveformView and DSWaveformImage. Thanks to William aka @fulldecent and Daniel @dmrschmidt.
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].