All Projects → Luccifer → Bpm Analyser

Luccifer / Bpm Analyser

Licence: mit
Analyser BPM in Swift for your music/sounds/records, whatever..

Programming Languages

c
50402 projects - #5 most used programming language
swift
15916 projects
swift4
162 projects

Projects that are alternatives of or similar to Bpm Analyser

Bpm
Library and tool for dealing with beats per second detection
Stars: ✭ 57 (-5%)
Mutual labels:  bpm, music
Gaanaapi
Unofficial Gaana API
Stars: ✭ 59 (-1.67%)
Mutual labels:  music, songs
Flutter Assetsaudioplayer
Play simultaneously music/audio from assets/network/file directly from Flutter, compatible with android / ios / web / macos, displays notifications
Stars: ✭ 458 (+663.33%)
Mutual labels:  media, songs
Gmusicproxy
Google Play Music Proxy - "Let's stream Google Play Music using any media-player"
Stars: ✭ 316 (+426.67%)
Mutual labels:  music, songs
Lyrics Corpora
An unofficial Python API that allows users to create a corpus of lyrical text from their favorite artists and billboard charts
Stars: ✭ 13 (-78.33%)
Mutual labels:  music, songs
Warezz
It's illegal cuz they can't tax you!
Stars: ✭ 386 (+543.33%)
Mutual labels:  music, songs
Homehost
self-hosted, Netflix-like app made for streaming
Stars: ✭ 564 (+840%)
Mutual labels:  music, media
Ytmdl
A simple app to get songs from YouTube in mp3 format with artist name, album name etc from sources like iTunes, Spotify, LastFM, Deezer, Gaana etc.
Stars: ✭ 2,070 (+3350%)
Mutual labels:  music, songs
Youtub.ly Android
An android app to download 📹 videos and songs from youtube to phone internal storage
Stars: ✭ 17 (-71.67%)
Mutual labels:  music, songs
Jetpack Musicplayer
即使不用云音乐听曲儿,也请务必收藏好该库!🔥 一行代码即可接入,音乐播放控制组件 - Even if you don't listen to the music by Spotify, be sure to collect this library, please! 🔥 This music player component can be accessed by only one line of code. Supporting by LiveData & AndroidX.
Stars: ✭ 577 (+861.67%)
Mutual labels:  music, media
Alonetone
A free, open source, non-commercial home for musicians and their music
Stars: ✭ 270 (+350%)
Mutual labels:  music, songs
Lofi Player
🎧 A Lofi Player built with HTML, CSS and Javascript using Parcel as Module Bundler https://lakscastro.github.io/lofi-player
Stars: ✭ 38 (-36.67%)
Mutual labels:  music, songs
SonogramView
Audio visualisation of song
Stars: ✭ 65 (+8.33%)
Mutual labels:  songs, bpm
Ts3audiobot
Advanced Musicbot for Teamspeak 3
Stars: ✭ 397 (+561.67%)
Mutual labels:  music, songs
Playlistfromsong
Create an offline music playlist from a single song 🎶
Stars: ✭ 128 (+113.33%)
Mutual labels:  music, songs
Lmms
Cross-platform music production software
Stars: ✭ 5,450 (+8983.33%)
Mutual labels:  music, songs
Getsong
Download any song mp3 with no dependencies except ffmpeg
Stars: ✭ 102 (+70%)
Mutual labels:  music, songs
Lyrics
📄 Open Lyrics Database
Stars: ✭ 106 (+76.67%)
Mutual labels:  music, songs
Monstercat Visualizer
A real time audio visualizer for Rainmeter similar to the ones used in the Monstercat videos.
Stars: ✭ 571 (+851.67%)
Mutual labels:  music, media
Ytspotifydl
Youtube and Spotify music downloader with metadata.
Stars: ✭ 34 (-43.33%)
Mutual labels:  music, songs

BPM-Analyser

Analyser BPM in Swift for your music/sounds/records, whatever.. Powered with Superpowered

Preview:

How To:

Copy theese files to your project:

  • BMPAnalyzer.swift
  • Superpower directory

Also add theese frameworks to your Linked Frameworks and Libraries

  • Add AudioToolbox.framework
  • CoreMedia.framework
  • AVFoundation
  • libSuperpoweredAudioIOS.a (From repo: /src/Superpowered, you added it to project in the previous step

In your code implementation you can call Singleton method by:

 public func getBpmFrom(_ url: URL, completion: (String?) -> ()) -> String

Example:

guard let filePath = Bundle.main.path(forResource: "TestMusic", ofType: "m4a"),
let url = URL(string: filePath) else {return "error occured, check fileURL"}
BPMAnalyzer.core.getBpmFrom(url, completion: nil)

You can stuck it with MPMediaPicker in delegate like this:

import UIKit
import MediaPlayer

class YourClassViewController: UIViewController {

 let mediaPicker: MPMediaPickerController = MPMediaPickerController(mediaTypes: .music)
    lazy var bpmLabel: UILabel = {
        let label = UILabel()
        label.frame.size.height = 300
        label.frame.size.width = UIScreen.main.bounds.width - 32
        label.numberOfLines = 2
        return label
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        mediaPicker.allowsPickingMultipleItems = false
        mediaPicker.delegate = self
        present(mediaPicker, animated: true, completion: nil)
        // Do any additional setup after loading the view, typically from a nib.
    }
}

extension YourClassViewController: MPMediaPickerControllerDelegate {

    func mediaPicker(_ mediaPicker: MPMediaPickerController, didPickMediaItems
        mediaItemCollection: MPMediaItemCollection) {
        guard let asset = mediaItemCollection.items.first,
            let url = asset.assetURL else {return}
        _ = BPMAnalyzer.core.getBpmFrom(url, completion: {[weak self] (bpm) in
            self?.addLabelWith(bpm)
            self?.mediaPicker.dismiss(animated: true, completion: nil)
        })
    }
    
    func addLabelWith(_ bpm: String) {
        bpmLabel.text = String(describing:bpm)
        view.addSubview(bpmLabel)
        bpmLabel.center = view.center
        view.layoutIfNeeded()
    }
}

Look Example project in case of misunderstanding! :)

WHY?

Cause I can :D But in fact, I did't find any libs/frameworks to get BPM from media files...

WHY Superpowered?

Cause it is the fastest lib I have found

Feel FREE to PR or contribuctions/issues/remarks

BUGS/Fixes Contributors:

@o1exij - for the advice and reseraching the bug in BPM counting

@MikaTck - for alerting fatal error + Swift4 migration

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