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 ( // The byte location of the content size ContentSizeLoc = 13 // How big is each step in the system StepSize = 16 // Size of the Version block in bytes VersionBlockSize = 32 )
View Source
const Header string = "SPLICE"
Header is the SPLICE magic number to indicate that the file is a splice file.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pattern ¶
type Pattern struct { // Version of the Hardware the this pattern was saved on Version string // Tempo is the Beats per minute that the pattern should be played at Tempo float32 // Tracks of the Pattern for each instrument Tracks Tracks }
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.