Swift-music - swift-music is a swift package that provides an easy-to-use API for music related developments.

Overview

🎼 swift-music

CI

Introduction

swift-music is a swift package that provides an easy-to-use API for music related developments.

Currently available module:

  • MusicTheory: Notes, chords, scales.

MusicTheory

import MusicTheory

Interval Arithmetic

Note.D - Note.E  // Interval.m7

Create a Chord

// Create with notes contained.
let Esus4 = Chord(root: .E, [.E, .A, .B]) 

// Create with root and quality.
let Abm = Chord(root: .A_flat, quality: .minorTriad)

// Create with name need to be marked with the try! keyword.
let A7 = try! Chord("A7") 

Get summary of a chord

A7.summary
// This is a chord named A7, with root note A, and component notes C#, E, G, which are 
// respectively major third, perfect fifth, minor seventh above the root. 

Is this chord in my scale?

try! Chord("Dbm").isIn(scale: .init(.B, .major)) // true

Other API

  • Consonance and dissonance of interval, notes, or chord
  • Checking if a note in a chord
  • Create chord with both sharps and flats
  • Create slash chords
  • Support for 20+ chord qualities
  • Support for 10+ modes (To be implemented)

Installation

Xcode Project

File - Add Packages - https://github.com/sh3l6orrr/swift-music.git

Swift Package Manager

Inside Package.swift, add the followings:

dependencies: [
    .package(url: "https://github.com/sh3l6orrr/swift-music.git", .upToNextMajor(from: "1.0.0"))
]
targets: [
    .target(
        name: "YourTarget",
        dependencies: [.product(name: "MusicTheory", package: "swift-music")]
    )
]

Documentation

Documentation is contructed with DocC. To build, in Xcode:

Product - Build Documentation

License

This project is published under the Apache License 2.0.

You might also like...
Analyser BPM in Swift for your music/sounds/records, whatever..
Analyser BPM in Swift for your music/sounds/records, whatever..

BPM-Analyser Analyser BPM in Swift for your music/sounds/records, whatever.. Powered with Superpowered Preview: How To: Copy theese files to your proj

🅿️ PandoraPlayer is a lightweight music player for iOS, based on AudioKit and completely written in Swift.
🅿️ PandoraPlayer is a lightweight music player for iOS, based on AudioKit and completely written in Swift.

Made by Applikey Solutions Find this project on Dribbble Table of Contents Purpose Features Supported OS & SDK Versions Installation Usage Demo Releas

Music Player NBC With Swift

MusicPlayer Xcode command + shift + Y - Debug 창 띄우기 command + R - App 실행 command + . - App 중지 ctrl + option + commadn + return(enter) - Assistant

Fully functional music player which is written in swift programming language
Fully functional music player which is written in swift programming language

Music Player Source Code Fully functional Music Player Application Source code that is written in Swift 4.1, Xcode 9.3 Introduction Music Player for i

MusicScore - A music score library with MusicPart, Measure, Note, Pitch and Tempo representations in swift structs
MusicScore - A music score library with MusicPart, Measure, Note, Pitch and Tempo representations in swift structs

MusicScore A music score library with MusicPart, Measure, Note, Pitch and Tempo

Beautiful Music Player app built using SwiftUI to demonstrate Neumorphic design pattern and MVVM architecture.
Beautiful Music Player app built using SwiftUI to demonstrate Neumorphic design pattern and MVVM architecture.

Beautiful Music Player app built using SwiftUI to demonstrate Neumorphic design pattern 🎨 and MVVM architecture 🏗 . Made with love ❤️ by Sameer Nawaz

Music Player for iOS which looks & feels like classic player
Music Player for iOS which looks & feels like classic player

Prodigal Music Player APP looks and feels like a classic device. Bring back the good old player to life. Screenshots Home Page Album Gallery Home Page

A real-time, votable, democratized music queue on iPad and iPhone using Spotify
A real-time, votable, democratized music queue on iPad and iPhone using Spotify

Queue'd Music Queue'd is the best way to enjoy music with your friends. Add your favorite songs to a shared music queue at your favorite bars, restaur

MuVis is a macOS, iOS, iPadOS app for real-time music visualization.
MuVis is a macOS, iOS, iPadOS app for real-time music visualization.

MuVis MuVis is an open-source multiplatform app (using SwiftUI, Swift, and Xcode) for music visualization. It renders informative (and musically usefu

Releases(3.0.0)
Owner
Jin Zhang
UCLA 24' Math of Computation
Jin Zhang
OSCKit - The OSCKit package provides the classes needed for your apps to communicate among computers, sound synthesizers

OSCKit The OSCKit package provides the classes needed for your apps to communica

Sammy Smallman 23 Nov 27, 2022
A pure Swift Spotify Music App in Apple Music style

HBMusic A pure Swift Spotify Music App in Apple Music style. How to run pod inst

haoboxuxu 6 Dec 29, 2021
Classical music front-end for Apple Music: iOS app

concertino_ios Concertino is a classical music front-end for Apple Music. It's splitted in several projects. This one provides only the iOS app. (Ther

Open Opus 107 Dec 22, 2022
iOS music player app that downloads music from the internet, even YouTube

About YouTag is an iOS music player app that downloads music from the internet, even YouTube, and manages it in a local library. Music videos can also

null 263 Jan 8, 2023
Provides API access to localized musical instruments and their tunings.

instruments.fyi instruments.fyi provides API access to localized musical instruments and their tunings provided by InstrumentKit. Table of Contents Wo

Brian Drelling 10 Sep 5, 2022
Unofficial Yandex Music API

YM-API - Unofficial Swift Yandex Music Library Fully ported Yandex Music API Swift implementation. Russian Readme (Readme на русском) Thanks to Marsha

null 17 Nov 11, 2022
This app demonstrates how to use the Google Cloud Speech API and Apple on-device Speech library to recognize speech in live recorded audio.

SpeechRecognitionIOS This app demonstrates how to use Google Cloud Speech API and Apple on-device Speech library to recognize speech in live audio rec

Josh Uvi 0 Mar 11, 2022
Provides type-safe access to localized musical instruments and their tunings.

InstrumentKit InstrumentKit provides type-safe access to localized musical instruments and their tunings. Table of Contents Work In Progress Installat

Brian Drelling 14 Nov 3, 2022
MusicKit is a framework and DSL for creating, analyzing, and transforming music in Swift.

MusicKit MusicKit is a framework and DSL for creating, analyzing, and transforming music in Swift. Examples Functional harmony let C5 = Pitch(midi: 72

Ben Guo 591 Oct 18, 2022
Cool Animated music indicator view written in Swift

Cool Animated music indicator view written in Swift. ESTMusicIndicator is an implementation of NAKPlaybackIndicatorView in Swift for iOS 8. 本人著作的书籍《La

Aufree 465 Nov 28, 2022