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: 5 Imported by: 0

Documentation

Overview

Package drum is implements the decoding of .splice drum machine files.

Index

Constants

View Source
const Steps = 16

Number of steps per track

Variables

This section is empty.

Functions

This section is empty.

Types

type Pattern

type Pattern struct {
	Version string
	Tempo   float32
	Tracks  []Track
}

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

func Decode

func Decode(r io.Reader) (*Pattern, error)

Decode decodes the drum machine data from a io.Reader and returns a pointer to a parsed pattern.

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.

func (*Pattern) String

func (p *Pattern) String() string

type Track

type Track struct {
	ID   uint8
	Name string
	// 16 steps, one byte per step, value of 0 or 1 (non-zero)
	Data [Steps]byte
}

Track data associated with the pattern

Jump to

Keyboard shortcuts

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