types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var A = Note{

	Name: `A`,
	// contains filtered or unexported fields
}
View Source
var A_FLAT = Note{

	Name: `A♭`,
	// contains filtered or unexported fields
}
View Source
var A_FLAT_MAJOR = Scale{

	Name:        `A♭ major`,
	Accidentals: -4,
	Type:        Major,
	Notes:       []Note{A_FLAT, B_FLAT, C, D_FLAT, E_FLAT, F, G},
	// contains filtered or unexported fields
}
View Source
var A_FLAT_MINOR = Scale{

	Name:        `A♭ minor`,
	Accidentals: -7,
	Type:        Minor,
	Notes:       []Note{A_FLAT, B_FLAT, C_FLAT, D_FLAT, E_FLAT, F_FLAT, G_FLAT},
	// contains filtered or unexported fields
}

A♭ minor/G♯ minor

View Source
var A_MAJOR = Scale{

	Name:        `A major`,
	Accidentals: 3,
	Type:        Major,
	Notes:       []Note{A, B, C_SHARP, D, E, F_SHARP, G_SHARP},
	// contains filtered or unexported fields
}
View Source
var A_MINOR = Scale{

	Name:        `A minor`,
	Accidentals: 0,
	Type:        Minor,
	Notes:       []Note{A, B, C, D, E, F, G},
	// contains filtered or unexported fields
}
View Source
var A_SHARP = Note{

	Name: `A♯`,
	// contains filtered or unexported fields
}
View Source
var A_SHARP_MINOR = Scale{

	Name:        `A♯ minor`,
	Accidentals: 7,
	Type:        Minor,
	Notes:       []Note{A_SHARP, B_SHARP, C_SHARP, D_SHARP, E_SHARP, F_SHARP, G_SHARP},
	// contains filtered or unexported fields
}

A♯ minor/B♭ minor

View Source
var B = Note{

	Name: `B`,
	// contains filtered or unexported fields
}
View Source
var B_FLAT = Note{

	Name: `B♭`,
	// contains filtered or unexported fields
}
View Source
var B_FLAT_MAJOR = Scale{

	Name:        `B♭ major`,
	Accidentals: -2,
	Type:        Major,
	Notes:       []Note{B_FLAT, C, D, E_FLAT, F, G, A},
	// contains filtered or unexported fields
}
View Source
var B_FLAT_MINOR = Scale{

	Name:        `B♭ minor`,
	Accidentals: -5,
	Type:        Minor,
	Notes:       []Note{B_FLAT, C, D_FLAT, E_FLAT, F, G_FLAT, A_FLAT},
	// contains filtered or unexported fields
}

B♭ minor/A♯ minor

View Source
var B_MAJOR = Scale{

	Name:        `B major`,
	Accidentals: 5,
	Type:        Major,
	Notes:       []Note{B, C_SHARP, D_SHARP, E, F_SHARP, G_SHARP, A_SHARP},
	// contains filtered or unexported fields
}

enharmonic to C♭ major

View Source
var B_MINOR = Scale{

	Name:        `B minor`,
	Accidentals: 2,
	Type:        Minor,
	Notes:       []Note{B, C_SHARP, D, E, F_SHARP, G, A},
	// contains filtered or unexported fields
}
View Source
var B_SHARP = Note{

	Name: `B♯`,
	// contains filtered or unexported fields
}
View Source
var C = Note{

	Name: `C`,
	// contains filtered or unexported fields
}
View Source
var C_FLAT = Note{

	Name: `C♭`,
	// contains filtered or unexported fields
}
View Source
var C_FLAT_MAJOR = Scale{

	Name:        `C♭ major`,
	Accidentals: -7,
	Type:        Major,
	Notes:       []Note{C_FLAT, D_FLAT, E_FLAT, F_FLAT, G_FLAT, A_FLAT, B_FLAT},
	// contains filtered or unexported fields
}

enharmonic to E major

View Source
var C_MAJOR = Scale{

	Name:        `C major`,
	Accidentals: 0,
	Type:        Major,
	Notes:       []Note{C, D, E, F, G, A, B},
	// contains filtered or unexported fields
}
View Source
var C_MINOR = Scale{

	Name:        `C minor`,
	Accidentals: -3,
	Type:        Minor,
	Notes:       []Note{C, D, E_FLAT, F, G, A_FLAT, B_FLAT},
	// contains filtered or unexported fields
}
View Source
var C_SHARP = Note{

	Name: `C♯`,
	// contains filtered or unexported fields
}
View Source
var C_SHARP_MAJOR = Scale{

	Name:        `C♯ major`,
	Accidentals: 7,
	Type:        Major,
	Notes:       []Note{C_SHARP, D_SHARP, E_SHARP, F_SHARP, G_SHARP, A_SHARP, B_SHARP},
	// contains filtered or unexported fields
}

enharmonic to D major

View Source
var C_SHARP_MINOR = Scale{

	Name:        `C♯ minor`,
	Accidentals: 4,
	Type:        Minor,
	Notes:       []Note{C_SHARP, D_SHARP, E, F_SHARP, G_SHARP, A, B},
	// contains filtered or unexported fields
}
View Source
var D = Note{

	Name: `D`,
	// contains filtered or unexported fields
}
View Source
var D_FLAT = Note{

	Name: `D♭`,
	// contains filtered or unexported fields
}
View Source
var D_FLAT_MAJOR = Scale{

	Name:        `D♭ major`,
	Accidentals: -5,
	Type:        Major,
	Notes:       []Note{D_FLAT, E_FLAT, F, G_FLAT, A_FLAT, B_FLAT, C},
	// contains filtered or unexported fields
}

enharmonic to C# major

View Source
var D_MAJOR = Scale{

	Name:        `D major`,
	Accidentals: 2,
	Type:        Major,
	Notes:       []Note{D, E, F_SHARP, G, A, B, C_SHARP},
	// contains filtered or unexported fields
}
View Source
var D_MINOR = Scale{

	Name:        `D minor`,
	Accidentals: -1,
	Type:        Minor,
	Notes:       []Note{D, E, F, G, A, B_FLAT, C},
	// contains filtered or unexported fields
}
View Source
var D_SHARP = Note{

	Name: `D♯`,
	// contains filtered or unexported fields
}
View Source
var D_SHARP_MINOR = Scale{

	Name:        `D♯ minor`,
	Accidentals: 6,
	Type:        Minor,
	Notes:       []Note{D_SHARP, E_SHARP, F_SHARP, G_SHARP, A_SHARP, B, C_SHARP},
	// contains filtered or unexported fields
}

/D♯ minor/E♭ minor

View Source
var E = Note{

	Name: `E`,
	// contains filtered or unexported fields
}
View Source
var E_FLAT = Note{

	Name: `E♭`,
	// contains filtered or unexported fields
}
View Source
var E_FLAT_MAJOR = Scale{

	Name:        `E♭ major`,
	Accidentals: -3,
	Type:        Major,
	Notes:       []Note{E_FLAT, F, G, A_FLAT, B_FLAT, C, D},
	// contains filtered or unexported fields
}
View Source
var E_FLAT_MINOR = Scale{

	Name:        `E♭ minor`,
	Accidentals: -6,
	Type:        Minor,
	Notes:       []Note{E_FLAT, F, G_FLAT, A_FLAT, B_FLAT, C_FLAT, D_FLAT},
	// contains filtered or unexported fields
}

E♭ minor/D♯ minor

View Source
var E_MAJOR = Scale{

	Name:        `E major`,
	Accidentals: 4,
	Type:        Major,
	Notes:       []Note{E, F_SHARP, G_SHARP, A, B, C_SHARP, D_SHARP},
	// contains filtered or unexported fields
}
View Source
var E_MINOR = Scale{

	Name:        `E minor`,
	Accidentals: 1,
	Type:        Minor,
	Notes:       []Note{E, F_SHARP, G, A, B, C, D},
	// contains filtered or unexported fields
}
View Source
var E_SHARP = Note{

	Name: `E♯`,
	// contains filtered or unexported fields
}
View Source
var F = Note{

	Name: `F`,
	// contains filtered or unexported fields
}
View Source
var F_FLAT = Note{

	Name: `F♭`,
	// contains filtered or unexported fields
}
View Source
var F_MAJOR = Scale{

	Name:        `F major`,
	Accidentals: -1,
	Type:        Major,
	Notes:       []Note{F, G, A, B_FLAT, C, D, E},
	// contains filtered or unexported fields
}
View Source
var F_MINOR = Scale{

	Name:        `F minor`,
	Accidentals: -4,
	Type:        Minor,
	Notes:       []Note{F, G, A_FLAT, B_FLAT, C, D_FLAT, E_FLAT},
	// contains filtered or unexported fields
}
View Source
var F_SHARP = Note{

	Name: `F♯`,
	// contains filtered or unexported fields
}
View Source
var F_SHARP_MAJOR = Scale{

	Name:        `F♯ major`,
	Accidentals: 6,
	Type:        Major,
	Notes:       []Note{F_SHARP, G_SHARP, A_SHARP, B, C_SHARP, D_SHARP, E_SHARP},
	// contains filtered or unexported fields
}

enharmonic to G♭ major

View Source
var F_SHARP_MINOR = Scale{

	Name:        `F♯ minor`,
	Accidentals: 3,
	Type:        Minor,
	Notes:       []Note{F_SHARP, G_SHARP, A, B, C_SHARP, D, E},
	// contains filtered or unexported fields
}
View Source
var G = Note{

	Name: `G`,
	// contains filtered or unexported fields
}
View Source
var G_FLAT = Note{

	Name: `G♭`,
	// contains filtered or unexported fields
}
View Source
var G_FLAT_MAJOR = Scale{

	Name:        `G♭ major`,
	Accidentals: -6,
	Type:        Major,
	Notes:       []Note{G_FLAT, A_FLAT, B_FLAT, C_FLAT, D_FLAT, E_FLAT, F},
	// contains filtered or unexported fields
}

enharmonic to F# major

View Source
var G_MAJOR = Scale{

	Name:        `G major`,
	Accidentals: 1,
	Type:        Major,
	Notes:       []Note{G, A, B, C, D, E, F_SHARP},
	// contains filtered or unexported fields
}
View Source
var G_MINOR = Scale{

	Name:        `G minor`,
	Accidentals: -2,
	Type:        Minor,
	Notes:       []Note{G, A, B_FLAT, C, D, E_FLAT, F},
	// contains filtered or unexported fields
}
View Source
var G_SHARP = Note{

	Name: `G♯`,
	// contains filtered or unexported fields
}
View Source
var G_SHARP_MINOR = Scale{

	Name:        `G♯ minor`,
	Accidentals: 5,
	Type:        Minor,
	Notes:       []Note{G_SHARP, A_SHARP, B, C_SHARP, D_SHARP, E, F_SHARP},
	// contains filtered or unexported fields
}
View Source
var SCALE = []Note{
	C, C_SHARP, D, D_SHARP, E, F, F_SHARP, G, G_SHARP, A, A_SHARP, B,
}

Functions

func AddManufacturers

func AddManufacturers(list map[string]Manufacturer)

func LoadManufacturers

func LoadManufacturers(r io.Reader) (map[string]Manufacturer, error)

Types

type Channel

type Channel byte

func (Channel) String

func (c Channel) String() string

type Controller

type Controller struct {
	ID   byte
	Name string
}

func LookupController

func LookupController(id byte) Controller

type Delta

type Delta uint32

func (Delta) String

func (d Delta) String() string

type Hex

type Hex []byte

func (Hex) String

func (bytes Hex) String() string

type KeyType

type KeyType uint8
const (
	Major KeyType = 0
	Minor KeyType = 1
)

type Manufacturer

type Manufacturer struct {
	ID     []byte `json:"id"`
	Region string `json:"region"`
	Name   string `json:"name"`
}

func LookupManufacturer

func LookupManufacturer(id []byte) Manufacturer

type MetaEventType

type MetaEventType byte

func (MetaEventType) String

func (t MetaEventType) String() string

type MiddleC

type MiddleC int

Ref. https://computermusicresource.com/midikeys.html

const (
	C3 MiddleC = iota
	C4
)

func (*MiddleC) Set

func (c *MiddleC) Set(s string) error

func (MiddleC) String

func (c MiddleC) String() string

type Note

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

func (Note) String

func (n Note) String() string

type Scale

type Scale struct {
	Name        string
	Accidentals int8
	Type        KeyType
	Notes       []Note
	// contains filtered or unexported fields
}

func MajorScale

func MajorScale(accidentals int8) (Scale, bool)

func MinorScale

func MinorScale(accidentals int8) (Scale, bool)

func (Scale) Transpose

func (s Scale) Transpose(steps int) Scale

type ScaleID

type ScaleID int
const (
	CMajor ScaleID = iota
	GMajor
	DMajor
	AMajor
	EMajor
	BMajor
	FSharpMajor
	CSharpMajor
	FMajor
	BFlatMajor
	EFlatMajor
	AFlatMajor
	DFlatMajor
	GFlatMajor
	CFlatMajor

	AMinor
	EMinor
	BMinor
	ASharpMinor
	DSharpMinor
	GSharpMinor
	CSharpMinor
	FSharpMinor
	DMinor
	GMinor
	CMinor
	FMinor
	BFlatMinor
	EFlatMinor
	AFlatMinor
)

type Status

type Status byte

func (Status) String

func (t Status) String() string

type Tick

type Tick uint64

func (Tick) String

func (t Tick) String() string

type TrackNumber

type TrackNumber uint

func (TrackNumber) String

func (t TrackNumber) String() string

Jump to

Keyboard shortcuts

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