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 ¶
var ErrUnsupportedFileFormat = errors.New("unsupported file format")
ErrUnsupportedFileFormat is returned when the file to decode does not match the expected format.
Functions ¶
This section is empty.
Types ¶
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.
type Steps ¶
type Steps [stepsLength]bool
Steps are one of the parts of the measure that are being programmed (the programmed measure is known as a pattern). The measure (also called a bar) is divided in Steps. The drum machine only supports 16 step measure patterns played in 4/4 time. The measure is comprised of 4 quarter notes, each quarter note is comprised of 4 sixteenth notes and each sixteenth note corresponds to a step.