score

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadProcessedCsv = iota
	ReadMidi
)

Variables

This section is empty.

Functions

func Midi2csv

func Midi2csv(p string)

Requires midicsv installed

Types

type Note

type Note struct {
	Part           *Part
	StartTicks     float64
	StartSecs      float64
	DurTicks       float64
	DurSecs        float64
	Pitch          float64
	FullNoteOctave string
	Velocity       float64
}

type Part

type Part struct {
	Name  string
	Plays []*Note
}

func (*Part) Sort

func (p *Part) Sort()

type Score

type Score map[string]*Part

func ParseMidi

func ParseMidi(path string) Score

func Read

func Read(path string, opt int) Score

func (*Score) AvgDuration

func (s *Score) AvgDuration() float64

func (*Score) MaxDuration

func (s *Score) MaxDuration() float64

func (*Score) MaxPitch

func (s *Score) MaxPitch() float64

func (*Score) MinDuration

func (s *Score) MinDuration() float64

func (*Score) MinPitch

func (s *Score) MinPitch() float64

func (*Score) SortedKeys

func (s *Score) SortedKeys() []string

func (*Score) TotalTicks

func (s *Score) TotalTicks() float64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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