chord

package
v0.0.0-...-0ba011f Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2014 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

Provides types to represents chords Guitar Voicing Keyboard Voicing May provides a function to transpose a song to another tone May provides a function to compute the tone and the range of song

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chord

type Chord struct {
	Name  string
	Notes []note.Note
}
Example
Em := Chord{
	Name: "Em",
	Notes: []note.Note{
		note.Minor.Degree(note.E, 1),
		note.Minor.Degree(note.E, 3),
		note.Minor.Degree(note.E, 5),
	},
}
fmt.Println(Em)
Output:

{Em [E G B]}

type ChordChart

type ChordChart struct {
	Division int
	Measures ChordMeasure
}

type ChordMeasure

type ChordMeasure struct {
	Chords []Chord
}

type GuitarVoicing

type GuitarVoicing struct {
	Name    string
	Tuning  []note.Note
	Frets   []int
	Fingers []int
}
Example
Em := GuitarVoicing{
	Name:    "Em",
	Tuning:  []note.Note{note.E, note.A, note.D, note.G, note.B, note.E},
	Frets:   []int{0, 2, 2, 0, 0, 0},
	Fingers: []int{-1, 2, 3, -1, -1, -1},
}
fmt.Println(Em)
Output:

{Em [E A D G B E] [0 2 2 0 0 0] [-1 2 3 -1 -1 -1]}

Jump to

Keyboard shortcuts

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