All Projects → mergesort → Feedbackeffect

mergesort / Feedbackeffect

Licence: mit
A library for playing sounds and providing haptic feedback with ease.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Feedbackeffect

Peep
Easy Sound Generator 🐥
Stars: ✭ 59 (-71.63%)
Mutual labels:  feedback, sound
Libvlc Go
Go bindings for libVLC and high-level media player interface
Stars: ✭ 188 (-9.62%)
Mutual labels:  sound
Design
OSGi design repository
Stars: ✭ 150 (-27.88%)
Mutual labels:  feedback
Feedback
📢 docs.microsoft.com site feedback
Stars: ✭ 170 (-18.27%)
Mutual labels:  feedback
Sonant X
Small JavaScript synthesizer library
Stars: ✭ 154 (-25.96%)
Mutual labels:  sound
Aubio
a library for audio and music analysis
Stars: ✭ 2,601 (+1150.48%)
Mutual labels:  sound
Spectrographic
Turn an image into sound whose spectrogram looks like the image.
Stars: ✭ 147 (-29.33%)
Mutual labels:  sound
Ableton Live Tools
A collection of useful additions to @Ableton Live, including better @Git integration.
Stars: ✭ 198 (-4.81%)
Mutual labels:  sound
Sof
Sound Open Firmware
Stars: ✭ 183 (-12.02%)
Mutual labels:  sound
Torch Audiomentations
Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning.
Stars: ✭ 164 (-21.15%)
Mutual labels:  sound
Sono
A simple yet powerful JavaScript library for working with Web Audio
Stars: ✭ 164 (-21.15%)
Mutual labels:  sound
Img Encode
Encode an image to sound and view it as a spectrogram - turn your images into music
Stars: ✭ 157 (-24.52%)
Mutual labels:  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 (-13.94%)
Mutual labels:  sound
Amplify
Respectfully request feedback in your Android app.
Stars: ✭ 155 (-25.48%)
Mutual labels:  feedback
X3daudio1 7 hrtf
HRTF for Arma 3, Skyrim, and other titles that use XAudio2 + X3DAudio
Stars: ✭ 192 (-7.69%)
Mutual labels:  sound
Play Sound
Play sounds by shelling out to one of the available audio players.
Stars: ✭ 150 (-27.88%)
Mutual labels:  sound
Vuejs Sound Player
▶️ 🎹 🎵 HTML5 <audio> tag sound player UI for Vue.js - supports single, loop, pause/stop modes etc
Stars: ✭ 164 (-21.15%)
Mutual labels:  sound
Scalacollider
A Scala sound synthesis library based on SuperCollider. Mirror of https://git.iem.at/sciss/ScalaCollider
Stars: ✭ 174 (-16.35%)
Mutual labels:  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 (-5.77%)
Mutual labels:  sound
Wavefile
A Ruby gem for reading and writing sound files in Wave format (*.wav)
Stars: ✭ 193 (-7.21%)
Mutual labels:  sound

FeedbackEffect

A μ library for playing sound effects and providing haptic feedback… with ease.

BuddyBuild Pod Version Swift Version License MIT Plaform

Your app should be special. Other people's apps suck. How do we make your app extra awesome? Feedback and sound effects my friend.

Until now there has not been a unified API to allow you to integrate sound effects and haptic feedback with ease. If you're guessing that now there is, then you're right… now there is.


The API couldn't be simpler.

let selectionFeedback = HapticFeedback.notification(.success)
let soundUrl = Bundle.main.url(forResource: "Success", withExtension: "m4a")
FeedbackEffect.play(sound: soundUrl, feedback: selectionFeedback)

Q&A time

Q: Is that all?

A: Yep.

Q: Really?

A: Fine, let's go into more detail.


SoundEmitting

There are two kinds of SoundEmitting. You can provide a URL to any resource that iOS can play (such as an m4a), or use some common sounds from iOS pre-configured.

Three types conform to SoundEmitting out of the box:

  • URL
  • MessageTone
  • SoundEffect

If you'd like to add some more, all you have to do is conform to the protocol. If you find some more that are built into iOS, feel free to file a PR and it'll gladly be accepted.


HapticEmitting

There are two ways to provide a user with haptic feedback. Both HapticFeedback and VibrationFeedback conform to HapticEmitting.

  • HapticFeedback: Uses iOS's built in UIFeedbackGenerator to generate feedback effects. You can use this just how you would normally use UIImpactGenerator, UISelectionGenerator, and UINotificationFeedbackGenerator.

  • VibrationFeedback: For older devices which do not have a taptic engine. It will generate similar vibration patterns to the UIFeedbackGenerator, which unfortunately do not match UIFeedbackGenerator exactly one for one but are rather close.


Q&A part II

Q: Is that it?

A: Yep. You're on your own from here padawan. Let's leave you with a few more examples to make you feel safe though.


Examples

Uses the haptic feedback built into iOS along with the tap sound to make a user feel like they're really tapping a button.

let notificationFeedback = HapticFeedback.selection
let tapSound = SoundEffect.tap
FeedbackEffect.play(sound: tapSound, feedback: notificationFeedback)

Uses the haptic feedback built into iOS along with an success sound to make a user feel they've completed a unit of work successfully.

let selectionFeedback = HapticFeedback.notification(.success)
let soundUrl = Bundle.main.url(forResource: "Success", withExtension: "m4a")
FeedbackEffect.play(sound: soundUrl, feedback: selectionFeedback)

Uses the vibration feedback fallback (for users without 3D Touch devices) built into iOS along with a pre-configured sound effect.

let vibration = VibrationFeedback.notification
let sound = MessageTone.tweet
FeedbackEffect.play(sound: sound, feedback: vibration)

You can use just one at a time too if you wish. Just provide haptics and leave the sound parameter nil. You can also do the opposite and provide a sound with no haptics.

let vibration = HapticFeedback.notification(.error)
FeedbackEffect.play(sound: nil, feedback: vibration)

Requirements

  • iOS 10.0+
  • Xcode 8.0+

Installation

SPM will be the default supported installation method from version 1.5.0 and higher, so please integrate by using SPM.

If you're still using CocoaPods for version 1.5.0 or below you can install FeedbackEffect by adding it to your Podfile:

platform :ios, '10.0'
use_frameworks!

pod 'FeedbackEffect'

Or install it manually by downloading FeedbackEffect.swift and dropping it in your project.

About me

Hi, I'm Joe everywhere on the web, but especially on Twitter.

License

See the license for more information about how you can use TypedNotifications.

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