drum

package
v0.0.0-...-e04bdec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2015 License: BSD-3-Clause Imports: 6 Imported by: 0

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

func Float32frombytes

func Float32frombytes(bytes []byte) float32

func ReadUint32

func ReadUint32(buffer []byte) uint32

func ReadUint64

func ReadUint64(buffer []byte) uint64

Types

type Pattern

type Pattern struct {
	Splice   string
	DataSize uint64
	Version  string
	Tempo    float32
	Samples  *list.List
}

Pattern is the high level representation of the drum pattern contained in a .splice file. TODO: implement

func DecodeFile

func DecodeFile(path string) (*Pattern, error)

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. TODO: implement

func FromBytes

func FromBytes(p *Pattern, data []byte) *Pattern

func (Pattern) String

func (p Pattern) String() string

type Sample

type Sample struct {
	Id    byte
	Name  string
	Kicks []byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL