All Projects â†’ bastienFalcou â†’ Soundwave

bastienFalcou / Soundwave

Licence: mit
Illustrate your sound waves on the fly 🚀

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Soundwave

Gwion
🎵 strongly-timed musical programming language
Stars: ✭ 235 (-39.74%)
Mutual labels:  music, sound
Supercolliderjs
The JavaScript client library for SuperCollider
Stars: ✭ 381 (-2.31%)
Mutual labels:  music, sound
Swift Radio Pro
Professional Radio Station App for iOS!
Stars: ✭ 2,644 (+577.95%)
Mutual labels:  music, sound
Ableton Live Tools
A collection of useful additions to @Ableton Live, including better @Git integration.
Stars: ✭ 198 (-49.23%)
Mutual labels:  music, sound
P5.js
p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
Stars: ✭ 16,542 (+4141.54%)
Mutual labels:  graphics, sound
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (-49.74%)
Mutual labels:  music, sound
Supercollider
An audio server, programming language, and IDE for sound synthesis and algorithmic composition.
Stars: ✭ 4,036 (+934.87%)
Mutual labels:  music, sound
Eazy Sound Manager
Eazy Sound Manager is a simple Unity3D tool which aims to make sound and music management in games easier
Stars: ✭ 135 (-65.38%)
Mutual labels:  music, sound
Awesome Livecoding
All things livecoding
Stars: ✭ 1,373 (+252.05%)
Mutual labels:  graphics, music
Pts
A library for visualization and creative-coding
Stars: ✭ 4,628 (+1086.67%)
Mutual labels:  graphics, sound
Aubio
a library for audio and music analysis
Stars: ✭ 2,601 (+566.92%)
Mutual labels:  music, sound
Awesome Music Production
A curated list of software, services and resources to create and distribute music.
Stars: ✭ 340 (-12.82%)
Mutual labels:  music, sound
Torch Audiomentations
Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning.
Stars: ✭ 164 (-57.95%)
Mutual labels:  music, sound
Mimium
mimium (MInimal Musical medIUM) a programming language as an infrastructure for sound and music.
Stars: ✭ 212 (-45.64%)
Mutual labels:  music, sound
Ni Media
NI Media is a C++ library for reading and writing audio streams.
Stars: ✭ 158 (-59.49%)
Mutual labels:  music, sound
Tinysynth
A drums looper made with React and the WebAudio API
Stars: ✭ 238 (-38.97%)
Mutual labels:  music, sound
Simple Sdl2 Audio
A simple SDL2 audio library without SDL_Mixer for playing music and multiple sounds natively in SDL2
Stars: ✭ 111 (-71.54%)
Mutual labels:  music, sound
108
A minimal beat machine played in the browser.
Stars: ✭ 128 (-67.18%)
Mutual labels:  music, sound
Godot Mixing Desk
A complete audio solution for Godot 3.2.x, making procedural sound and adaptive/procedural music possible with a few nodes and a couple lines of code.
Stars: ✭ 240 (-38.46%)
Mutual labels:  music, sound
Daisysp
A Powerful, Open Source DSP Library in C++
Stars: ✭ 291 (-25.38%)
Mutual labels:  music, sound

SoundWave

CI Status Version Carthage compatible Swift 5 License

SoundWave is a customizable view representing sounds over time.

Features

  • [x] Add and display audio metering level values on the fly
  • [x] Set array of pre-existing audio metering level and play / pause / resume
  • [x] Customize background, gradient start and end colors, metering level bar properties, etc.

Requirements

  • iOS 10.0+
  • Xcode 10.2+
  • Swift 5+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

To integrate SoundWave into your Xcode project using CocoaPods, specify it in your Podfile:

pod "SoundWave"

Run $ pod install to add the framework to your Xcode project.

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

To integrate SoundWave into your Xcode project using Carthage, specify it in your Cartfile:

github "bastienFalcou/SoundWave"

Run $ carthage update to build the framework and drag the built SoundWave.framework into your Xcode project.

Usage

Check out the demo app for an example. It contains the following demos: record sound and display metering levels on the fly, play sound afterwards, resize view, change colors and multiple other properties.

Adding View

AudioVisualizationView can be added to storyboard or instantiated programmatically:

let audioVisualizationView = AudioVisualizationView(frame: CGRect(x: 0.0, y: 0.0, width: 300.0, height: 500.0)))
view.addSubview(audioVisualizationView)

Customize UI

Metering Level Bars

AudioVisualizationView inherits from UIView and consequently allows you to change all inherited properties (e.g. backgroundColor).

You can change width, corner radius and space inter bars for your graph. This will force the graph to redraw:

self.audioVisualizationView.meteringLevelBarWidth = 5.0
self.audioVisualizationView.meteringLevelBarInterItem = 1.0
self.audioVisualizationView.meteringLevelBarCornerRadius = 0.0

You can change style of level bar to single:

self.audioVisualizationView.meteringLevelBarSingleStick = true

You can change grandient start and end color:

self.audioVisualizationView.gradientStartColor = .white
self.audioVisualizationView.gradientEndColor = .black

Those variables declared as IBInspectable can also be set from Interface Builder.

Display sound metering levels on the fly

On-The-Fly

One sound metering level represents the power in decibels of a sound sample. First make sure you are in write mode:

self.audioVisualizationView.audioVisualizationMode = .write

Your graph representing metering levels will (re)draw every time you pass a new value on the fly by calling the following. The value needs to be between 0 and 1.

self.audioVisualizationView.add(meteringLevel: 0.6)

You need to calculate a percentage of your decibel values, based on minimum and maximum decibel number of your recording system. If one value is above 1, the metering level bar will not be fully visible within the bounds of the view.

If you need to reset your graph, just call the following:

self.audioVisualizationView.reset()

Play existing array of metering levels

Play

The AudioVisualizationView can take an array of metering levels to play. Those levels are all gathered in its meteringLevelsArray property, array of Float values again between 0 and 1. If there are not enough / too many values to fit the screen, those values will be respectively extrapolated / clustered in order to cover nicely the whole width of the screen.

self.audioVisualizationView.audioVisualizationMode = .read
self.audioVisualizationView.meteringLevels = [0.1, 0.67, 0.13, 0.78, 0.31]
self.audioVisualizationView.play(for: 5.0)

Specify the duration of your sound for the view to play exactly at the same pace (and your metering levels fit the sound power heard by the user).

Note: you can pause / resume / stop the process by calling:

self.audioVisualizationView.pause()
self.audioVisualizationView.play(for: durationLeft)
self.audioVisualizationView.stop()

As said before, you can also reset the view at any point calling reset().

License

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

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].