GithubHelp home page GithubHelp logo

oettam / tonic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from audiokit/tonic

0.0 0.0 0.0 1.21 MB

Swift library for music theory

Home Page: https://www.audiokit.io/Tonic/

License: MIT License

Swift 100.00%

tonic's Introduction

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.

tonic's People

Contributors

wtholliday avatar aure avatar maksutovic avatar matt54 avatar bdrelling avatar brindy avatar sebastianboldt avatar oettam avatar orchetect avatar jnpdx avatar saito-arch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.