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 ¶
View Source
const ( TRACK_PADDING = 3 // padding size used inside track data HEADER_PADDING = 12 // initial header padding )
Variables ¶
This section is empty.
Functions ¶
func EncodeFile ¶
EncodeFile encode the drum pattern to a file path specified in the argument
func NewDecoder ¶
func NewDecoder(r io.ReadSeeker) *decoder
NewDecoder return a new decoder with the buffer specified.
Types ¶
type HeaderInfo ¶
HeaderInfo contains header information of the .splice file.
func (HeaderInfo) String ¶
func (h HeaderInfo) String() string
String returns the printable text of HeaderInfo.
type Pattern ¶
type Pattern struct { Header HeaderInfo Tracks []Track }
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.