sound

package
v0.0.0-...-e62d76c Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EMajor = []string{"E", "Fs", "Gs", "A", "B", "Cs", "Ds"}
	AMajor = []string{"A", "B", "Cs", "D", "E", "Fs", "Gs"}
	CMinor = []string{"C", "D", "Es", "F", "G", "As", "Bs"}
)

Functions

This section is empty.

Types

type Markov

type Markov map[int][]probability

func NewMarkov

func NewMarkov(f string) Markov

func (Markov) Get

func (m Markov) Get(prev int, num uint32) int

func (Markov) Rand

func (m Markov) Rand(num uint32) int

type Note

type Note struct {
	Note     int64
	Duration float64
}

type Notes

type Notes []Note

func (Notes) Len

func (a Notes) Len() int

func (Notes) Less

func (a Notes) Less(i, j int) bool

func (Notes) Swap

func (a Notes) Swap(i, j int)

type Scale

type Scale struct {
	Notes []string
}

func NewScale

func NewScale(notes []string, base, width int) Scale

func (*Scale) Get

func (c *Scale) Get(number uint32) int

type Sequence

type Sequence struct {
	Instrument string
	Notes      Notes
}

func NewSequence

func NewSequence(i string, n []Note) Sequence

func (*Sequence) Play

func (s *Sequence) Play(id portmidi.DeviceID)

Jump to

Keyboard shortcuts

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