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 ¶
View Source
var ErrHeader = errors.New("Invalid / Corrupt drum file")
Errors it can emit
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct { MagicHeader [10]byte // contains filtered or unexported fields }
A Decoder reads and decodes DRUM binary files from input stream
func NewDecoder ¶
NewDecoder returns a new decoder that reads from r.
Keep track of number of bytes read so far and total bytes to read
type Pattern ¶
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.
Click to show internal directories.
Click to hide internal directories.