Popularity
3.7
Stable
Activity
0.0
Stable
69
6
8
Programming language: Go
License: MIT License
Latest version: v0.0.14
Music Theory alternatives and similar packages
Based on the "Audio/Music" category.
Alternatively, view Music Theory alternatives based on common mentions on social networks and blogs.
-
waveform
Go package capable of generating waveform images from audio streams. MIT Licensed. -
flac-mewkiz
Package flac provides access to FLAC (Free Lossless Audio Codec) streams. -
Package snd
Package snd provides methods and types for sound processing and synthesis.
Clean code begins in your IDE with SonarLint
Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
Promo
www.sonarlint.org
Do you think we are missing an alternative of Music Theory or a related project?
README
Music Theory
Explorations in music theory.
Usage
package main
import (
mt "github.com/brettbuddin/musictheory"
"github.com/brettbuddin/musictheory/intervals"
)
func main() {
root := mt.NewPitch(mt.C, mt.Natural, 4)
root.Name(mt.AscNames) // C4
root.Freq() // 261.625565 (Hz)
root.MIDI() // 72
P5 := mt.Perfect(5) // Perfect 5th
A4 := mt.Augmented(4) // Augmented 4th
root.Transpose(P5).Name(mt.AscNames) // G4
root.Transpose(A4).Name(mt.AscNames) // F#4
root.Transpose(P5.Negate()).Name(mt.AscNames) // F3
mt.NewScale(root, intervals.Dorian, 1)
// [C4, D4, Eb4, F4, G4, A4, Bb4]
mt.NewScale(root, intervals.Mixolydian, 2)
// [C4, D4, E4, F4, G4, A4, Bb4, C5, D5, E5, F5, G5, A5, Bb5]
rootPosition := mt.NewChord(root, intervals.DiminishedSeventh)
// [C4, Eb4, Gb4, A4]
firstInversion := rootPosition.Invert(1)
// [C5, Eb4, Gb4, A4]
secondInversion := rootPosition.Invert(2)
// [C5, Eb5, Gb4, A4]
note := mt.NewNote(root, mt.D16) // C4 sixteenth note
note.Time(mt.D4, 120) // 125ms (quarter note getting the beat at 120 BPM)
}
ζ₯½γγΏγΎγοΌ