sequence

package
v0.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBeat

func GetBeat(line string) (int, int)

func GetGridKey

func GetGridKey(line string) (grid.GridKey, int)

func GetID

func GetID(line string) string

func InitArrangement

func InitArrangement(parts []arrangement.Part) *arrangement.Arrangement

func InitParts

func InitParts() []arrangement.Part

func ScanArrangement

func ScanArrangement(scanner *bufio.Scanner, currentArrangement *arrangement.Arrangement, indentLevel int) bool

func Write

func Write(sequence Sequence, filename string) error

Write saves all attributes of the model's sequence struct to a file using a custom format that is easy to diff with tools like git diff

Types

type AccentTarget

type AccentTarget uint8
const (
	AccentTargetNote AccentTarget = iota
	AccentTargetVelocity
)

type PatternAccents

type PatternAccents struct {
	Data   []config.Accent
	Start  uint8
	End    uint8
	Target AccentTarget
}

func (*PatternAccents) Equal

func (pa *PatternAccents) Equal(other *PatternAccents) bool

func (*PatternAccents) ReCalc

func (pa *PatternAccents) ReCalc()

type Sequence

type Sequence struct {
	Parts                 *[]arrangement.Part
	Arrangement           *arrangement.Arrangement
	Lines                 []grid.LineDefinition
	Tempo                 int
	Subdivisions          int
	Keyline               uint8
	Accents               PatternAccents
	Instrument            string
	Template              string
	TemplateUIStyle       string
	TemplateSequencerType operation.SequencerMode
}

func InitSequence

func InitSequence(template string, instrument string) Sequence

func Read

func Read(filename string) (Sequence, error)

Read loads the model's sequence struct from a file The file format should match the format created by the Write function

func Scan

func Scan(scanner *bufio.Scanner, sequence Sequence) Sequence

Jump to

Keyboard shortcuts

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