Swiftpack.co - juansanzone/MusicLogic as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by juansanzone.
juansanzone/MusicLogic 1.0.0
A simple Swift abstraction layer of Tonic package to play with Scales, notes and chords.
⭐️ 1
🕓 3 weeks ago
.package(url: "https://github.com/juansanzone/MusicLogic.git", from: "1.0.0")

🎼 🎶 MusicLogic 🎹 🎸

A simple Swift abstraction layer of AudioKit Tonic package to play with Scales, notes and chords.

🙋 Why?

Basically to easy answer the following questions:

  • What are the notes belonging to a scale and tone?

  • What are the chords belonging to a scale and tone?

  • What are the notes belonging to a chord?

  • Simple list of all possible scales

  • Simple list of all one-octave notes

🙉 How to use?

Get all Notes included in a specific note and scale

/// In this example we get all Notes for C major scale.
MusicLogic.getScaleNotes(note: .C, inScale: .major)

Get all Chords included in a specific note and scale

/// In this example we get all Chords for C major scale.
MusicLogic.getScaleChords(note: .C, inScale: .major)

Get notes for specific Chord

/// In this example we get all notes for Amaj9 Chord
MusicLogic.getChordNotes(chord: Chord(.A, type: .majorAddNine))

Access to all music scales

MusicLogic.scales

Access to all music generic notes

MusicLogic.notes

🗄 Dependencies & Thanks

AudioKit Tonic: https://github.com/AudioKit/Tonic.git

GitHub

link
Stars: 1
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Dependencies

Release Notes

1.0.0
3 weeks ago

Features 1.0.0

Get all Notes included in a specific note and scale

/// In this example we get all Notes for C major scale.
MusicLogic.getScaleNotes(note: .C, inScale: .major)

Get all Chords included in a specific note and scale

/// In this example we get all Chords for C major scale.
MusicLogic.getScaleChords(note: .C, inScale: .major)

Get notes for specific Chord

/// In this example we get all notes for Amaj9 Chord
MusicLogic.getChordNotes(chord: Chord(.A, type: .majorAddNine))

Access to all music scales

MusicLogic.scales

Access to all music generic notes

MusicLogic.notes

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics