song

package
v0.0.0-...-c66ceb2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSongMustHaveABarChangeAtFrame0 = errors.New("song needs to have a bar change at frame 0")
)

Errors which can be thrown during validation

Functions

func CalcBarLength

func CalcBarLength(bc *cntl.BarChange) uint64

CalcBarLength calculates the length of a bar by given BarChange

func CalcNoteLength

func CalcNoteLength(bc *cntl.BarChange) uint64

CalcNoteLength calculates the amount of frames in a single note of given barChange

func Render

func Render(ds *cntl.DataStore, songID string) ([]cntl.Command, error)

Render renders a given SongID to a list of Commands

func StreamlineBarChanges

func StreamlineBarChanges(s *cntl.Song) map[uint64]cntl.BarChange

StreamlineBarChanges fills the bar changes of the given song into a map indexed by the frame the BC is at

func ValidateBarChanges

func ValidateBarChanges(bc map[uint64]cntl.BarChange) error

ValidateBarChanges the given streamlined map of BarChanges

Types

This section is empty.

Jump to

Keyboard shortcuts

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