mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 13:04:25 -04:00
style: add comments to the public methods and members in the root package.
This commit is contained in:
25
track.go
25
track.go
@ -1,12 +1,31 @@
|
||||
package sointu
|
||||
|
||||
// Track represents the patterns and orderlist for each track. Note that each
|
||||
// track has its own patterns, so one track cannot use another tracks patterns.
|
||||
// This makes the data more intuitive to humans, as the reusing of patterns over
|
||||
// tracks is a rather rare occurence. However, the compiler will put all the
|
||||
// patterns in one global table (identical patterns only appearing once), to
|
||||
// optimize the runtime code.
|
||||
type Track struct {
|
||||
// NumVoices is the number of voices this track triggers, cycling through
|
||||
// the voices. When this track triggers a new voice, the previous should be
|
||||
// released.
|
||||
NumVoices int
|
||||
Effect bool `yaml:",omitempty"`
|
||||
Order Order `yaml:",flow"`
|
||||
Patterns []Pattern `yaml:",flow"`
|
||||
|
||||
// Effect hints the GUI if this is more of an effect track than a note
|
||||
// track: if true, e.g. the GUI can display the values as hexadecimals
|
||||
// instead of note values.
|
||||
Effect bool `yaml:",omitempty"`
|
||||
|
||||
// Order is a list telling which pattern comes in which order in the song in
|
||||
// this track.
|
||||
Order Order `yaml:",flow"`
|
||||
|
||||
// Patterns is a list of Patterns for this track.
|
||||
Patterns []Pattern `yaml:",flow"`
|
||||
}
|
||||
|
||||
// Copy makes a deep copy of a Track.
|
||||
func (t *Track) Copy() Track {
|
||||
order := make([]int, len(t.Order))
|
||||
copy(order, t.Order)
|
||||
|
Reference in New Issue
Block a user