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 Pattern ¶
type Pattern struct { Encoding [6]byte Len uint8 HWVersion [32]byte Tempo float32 Header PHeader Tracks []Track // 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 Track ¶
type Track struct { ID uint8 Name string Steps TrackSteps }
Track is the high level representation of a drum track contained in a .splice file.
func DecodeTracks ¶
DecodeTracks decodes a byte array containing the tracks of a drum pattern. Returns a slice of Tracks.
type TrackSteps ¶
type TrackSteps [16]byte
TrackSteps is the high level representation of the track steps in each track.
func (TrackSteps) String ¶
func (steps TrackSteps) String() string
String method implementation for TrackSteps type. Used to print tracks using the expected format.