chord

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2016 License: MIT Imports: 3 Imported by: 0

README

Chord

GoDoc Coverage

An opinionated model of a musical chord.

A chord, in music, is any harmonic set of three or more notes that is heard as if sounding simultaneously.

Author: Charney Kaye

Documentation

Overview

A chord, in music, is any harmonic set of three or more notes that is heard as if sounding simultaneously.

Chords have different Forms, such as Triad, Seventh, Extended, Added/Omitted, Specific or General.

Chords have different Functions, such as Diatonic, Altered or Other.

Chords have different Techniques, such as Block, Chordioid, Guitar, Open, Power or Slash.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListAllForms

func ListAllForms() (list []string)

ListAllForms to list the names of all known chord forms

Types

type Chord

type Chord struct {
	Root  note.Class
	Tones map[interval.Interval]note.Class
}

Chord in a particular key

func Of

func Of(name string) Chord

Of a particular key, e.g. Of("C minor 7")

func (*Chord) Notes

func (this *Chord) Notes() (notes []*note.Note)

Notes to obtain the notes from the Chord

type Form

type Form struct {
	Name string
	// contains filtered or unexported fields
}

Form is identified by positive/negative regular expressions, and then adds/removes pitch classes by interval from the root of the chord.

func (*Form) MatchString

func (this *Form) MatchString(s string) bool

MatchString processes the positive/negative regular expressions to determine if this form matches a string.

type FormAdd

type FormAdd map[interval.Interval]int

FormIntervalSet maps an interval-from-chord-root to a +/1 semitone adjustment

type FormOmit

type FormOmit []interval.Interval

FormIntervalOmit maps an interval-from-chord-root to omit

type Function

type Function int
const (
	GenericFunction Function = iota

	// Diatonic
	TonicDiatonic
	DominantDiatonic
	SubdominantDiatonic
	SupertonDiatonicicDiatonic
	MediantDiatonic
	SubmediantDiatonic
	LeadingDiatonic
	SubtonicDiatonic

	// Altered
	ApproachAltered
	BorrowedAltered
	ChromaticMediantAltered
	NeapolitanAltered
	PassingAltered
	SecondaryAltered
	SecondaryDominantAltered
	SecondaryLeadingToneAltered
	SecondarySupertonicAltered

	// Other
	CommonOther
	ContrastOther
	PrimaryTriadOther
	SubsidiaryOther
)

type Technique

type Technique int
const (
	GenericTechnique Technique = iota

	// Techniques
	BlockTechnique
	ChordioidTechnique
	GuitarTechnique
	OpenTechnique
	PowerTechnique
	SlashTechnique
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL