• Stars
    star
    153
  • Rank 243,368 (Top 5 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Swift library for music theory

Tonic

Demo

Swift library for music theory, currently focused on chords/harmony.

Tonic answers musical questions, such as:

  • What's the note for this pitch in this key?

    Note(pitch: Pitch(midiNoteNumber), key: .Bb)

  • What's the name of a chord?

    Chord(notes: notes).description

  • What chords are in this key?

    Key.Cm.chords

  • What chords in this key contain this note?

    Key.C.chords.filter { $0.noteClasses.contains(.C) }

  • What notes do these keys have in common?

    Key.C.noteSet.intersection(Key.Cm.noteSet)

  • What notes don't these keys have in common?

    Key.C.noteSet.symmetricDifference(Key.Cm.noteSet)

These questions are all tested in our unit tests explicitly.

Goals

  • Correctness. Try to be as correct with respect to music theory as possible.
  • Strong typing. Use types to prevent errors (e.g. Pitch instead of UInt8).
  • Good performance. Tonic uses bit sets to represent pitch sets and note sets.

Documentation

The documentation is host on the AudioKit.io Website. The package includes a demo project as well.

Install

Install using Swift Package Manager.

More Repositories

1

AudioKit

Audio synthesis, processing, & analysis platform for iOS, macOS and tvOS
Swift
10,691
star
2

AudioKitSynthOne

AudioKit Synth One: Open-Source iOS Synthesizer App
Swift
1,675
star
3

Cookbook

Canonical Examples for Using the AudioKit Framework
Swift
644
star
4

ROMPlayer

AudioKit Sample Player (ROM Player) - EXS24, Sound Font, Wave Player
Swift
532
star
5

Flow

Generic node graph editor
Swift
300
star
6

AUv3-Example-App

Full App: iOS Standalone and AUv3 Plugin Example. Work in Progress.
Swift
261
star
7

Waveform

GPU accelerated waveform view
Swift
203
star
8

AudioKitUI

Controls and Visualization for AudioKit apps
Swift
201
star
9

Playgrounds

The AudioKit Playground Book for iPad Playgrounds and Xcode Playgrounds
Swift
193
star
10

Keyboard

SwiftUI music keyboard
Swift
136
star
11

Controls

SwiftUI Knobs, Sliders, X-Y Pads, and more
Swift
127
star
12

SoundpipeAudioKit

C-based instruments and effects for AudioKit
C
110
star
13

DrumPadPlayground

Starter Project and Final Project for AudioKit DrumPad Playground App built using Apple's Swift Playgrounds on the iPad
Swift
94
star
14

PianoRoll

Touch oriented piano roll for iOS and macOS
Swift
68
star
15

AudioKitEX

C-backed AudioKit DSP
Swift
47
star
16

DunneAudioKit

Sampler and Synth Instruments as well as Chorus, Flanger and Stereo Delay Effects for AudioKit
C
45
star
17

DevoloopAudioKit

Guitar processors for AudioKit
C++
29
star
18

STKAudioKit

Physical models of instruments to use with AudioKit-powered applications
C++
28
star
19

Microtonality

Microtonal Tuning Tables
Swift
26
star
20

AudioKitDevTools

These developer tools are a series of scripts that create the AudioKit documentation, web site materials, and templates for starting to create AudioKit nodes from scratch.
HTML
19
star
21

SporthAudioKit

AudioKit Operations (Sporth) extension to AudioKit
C
16
star
22

MIDIFileEditAndSync

A demo of using AudioKit v5 to work with MIDI Files
Swift
12
star
23

MIDITrackView

Displays the notes of a MIDI file and follows along with playback
Swift
11
star
24

AudioUnitManager

Open source audio unit host app for use in testing your AudioUnits or building a host app from
Swift
10
star
25

AudioKitArchive

Pre-version 3 AudioKits
Objective-C
8
star
26

SoulAudioKit

A basis for creating AudioKit nodes with SOUL
C++
7
star
27

KissFFT

Swift Package for Kiss FFT
C
6
star
28

FileConverter

Demonstration of the AudioKit FormatConverter
Swift
6
star
29

PlayerDemo

Currently non-working demonstration of AKPlayer. It needs to be fixed up for changes in AudioKit version 5.
Swift
5
star
30

audiokit.io

Website for AudioKit documentation.
Swift
4
star
31

FlangerAndChorus

A demonstration of the AudioKit Flanger and Chorus by Shane Dunne
Swift
4
star
32

SimpleAudioUnit

Currently non-functional demonstration of a simple audio unit using AudioKit. Needs to be fixed for AudioKit v5.
Swift
4
star
33

docgen

Shell
3
star
34

OutputSplitter

AudioKit example that worked under Version 4 but was removed for Version 5.
Swift
2
star
35

ci

1
star