Documentation ¶
Overview ¶
Package drum is supposed to implement the decoding of .splice drum machine files. See golang-challenge.com/go-challenge1/ for more information
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder is intended for use in unmarshalling binary formatted pattern data.
func NewDecoder ¶
NewDecoder creates a *Decoder instance over an io.Reader instance.
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
Pattern is the high level representation of the drum pattern contained in a .splice file.
func DecodeFile ¶
DecodeFile decodes the drum machine file found at the provided path and returns a pointer to a parsed pattern which is the entry point to the rest of the data.
func (*Pattern) SetTempo ¶
SetTempo assigns the tempo for the pattern instance. This is in bpm (beats per minute).
func (*Pattern) SetVersion ¶
SetVersion assigns the version string to the pattern instance.
func (*Pattern) String ¶
String will return a string value of the pattern; this includes version, tempo and the tracks and there associated steps in 4/4 format.
type Track ¶
type Track struct {
// contains filtered or unexported fields
}
Track represents the 4/4 set of steps for a name/id.
func NewTrack ¶
func NewTrack() *Track
NewTrack creates a new instance of a track with fixed number of steps.