pitch

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func added in v1.1.0

type Func func(p Type) Type

Func defines a pitch function that maps a pitch from one to another

type Slice

type Slice []Type

Slice represents pitch slice

func (Slice) Equal

func (s Slice) Equal(v Slice) bool

Equal return true when two pitches are equal

func (Slice) RingSignature

func (s Slice) RingSignature() int

RingSignature return pitch slice signature according to Ian Ring's system

func (Slice) Signature

func (s Slice) Signature() int

Signature return pitch slice signature

func (Slice) Transpose

func (s Slice) Transpose(amount int) Slice

Transpose return transposed pitch slice

func (Slice) Unique

func (s Slice) Unique() Slice

Unique returns unique pitch slice

func (Slice) ZeitlerSignature

func (s Slice) ZeitlerSignature() int

ZeitlerSignature return pitch slice signature according to William Zeitler's system

type Type

type Type int

Type is a type for pitch

const (
	Invalid  Type = iota
	CNatural Type = iota
	CSharp   Type = iota
	DNatural Type = iota
	DSharp   Type = iota
	ENatural Type = iota
	FNatural Type = iota
	FSharp   Type = iota
	GNatural Type = iota
	GSharp   Type = iota
	ANatural Type = iota
	ASharp   Type = iota
	BNatural Type = iota
)

Pitch name enumerations

func AllPitches

func AllPitches() []Type

AllPitches returns all pitches

func CircleOfFifths added in v1.2.0

func CircleOfFifths() []Type

func FromInt added in v1.1.0

func FromInt(v int) Type

func (Type) Frequency

func (p Type) Frequency() float64

Frequency returns pitch frequency

func (Type) NextFifth

func (p Type) NextFifth() Type

NextFifth returns next fifth

func (Type) Number

func (p Type) Number() int

Number return patch number according to William Zeitler's numbering system

func (Type) PreviousFifth

func (p Type) PreviousFifth() Type

PreviousFifth returns previous fifth

func (Type) RingNumber

func (p Type) RingNumber() int

RingNumber return pitch numbering according to Ian Ring's system

func (Type) String

func (p Type) String() string

func (Type) Transpose

func (p Type) Transpose(amount int) Type

Transpose return transposed pitch

func (Type) Tritone

func (p Type) Tritone() Type

Tritone returns a tritone away from given pitch

func (Type) ZeitlerNumber

func (p Type) ZeitlerNumber() int

ZeitlerNumber return pitch numbering according to William Zeitler's system

type WithDegree added in v1.1.0

type WithDegree struct {
	Pitch  Type
	Degree degree.Type
}

WithDegree represents a tuple of pitch with it's correspond degree

Jump to

Keyboard shortcuts

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