Documentation
¶
Index ¶
- Variables
- func ClearBitU8(n uint8, pos uint8) uint8
- func ParsePitchWheelVals(b1 byte, b2 byte) (relative int16, absolute uint16)
- func ParseStatus(b byte) (messageType uint8, messageChannel uint8)
- func ParseTwoUint7(b1, b2 byte) (uint8, uint8)
- func ParseUint7(b byte) uint8
- func ReadByte(rd io.Reader) (byte, error)
- func ReadNBytes(n int, rd io.Reader) ([]byte, error)
- func ReadText(rd io.Reader) (string, error)
- func ReadUint16(rd io.Reader) (uint16, error)
- func ReadUint24(rd io.Reader) (uint32, error)
- func ReadUint32(rd io.Reader) (uint32, error)
- func ReadVarLength(reader io.Reader) (uint32, error)
- func ReadVarLengthData(reader io.Reader) ([]byte, error)
- func VlqDecode(source []byte) (num uint32)
- func VlqEncode(n uint32) (out []byte)
Constants ¶
This section is empty.
Variables ¶
var ErrUnexpectedEOF = fmt.Errorf("Unexpected End of File found.")
ErrUnexpectedEOF is returned, when an unexspected end of file is reached.
Functions ¶
func ClearBitU8 ¶
ClearBitU8 clears the bit at position pos within n
func ParsePitchWheelVals ¶
func ParseStatus ¶
ParseStatus parses the status byte and returns type and channel
This is a slightly modified variant of the readStatusByte function from Joe Wass. See the file midi_functions.go for the original.
func ParseTwoUint7 ¶
func ParseUint7 ¶
func ReadNBytes ¶
ReadNBytes reads n bytes from the reader
func ReadUint16 ¶
ReadUint16 reads a 2-byte 16 bit integer from a Reader. It returns the 16-bit value and an error. This is a slightly modified variant of the parseUint16 function from Joe Wass. See the file midi_functions.go for the original.
func ReadUint24 ¶
ReadUint24 parse a 3-byte 24 bit integer from a Reader. It returns the 32-bit value and an error. This is a slightly modified variant of the parseUint24 function from Joe Wass. See the file midi_functions.go for the original.
func ReadUint32 ¶
ReadUint32 parse a 4-byte 32 bit integer from a Reader. It returns the 32-bit value and an error. This is a slightly modified variant of the parseUint32 function from Joe Wass. See the file midi_functions.go for the original.
func ReadVarLength ¶
ReadVarLength reads a variable length value from a Reader. It returns the [up to] 32-bit value and an error. This is a slightly modified variant of the parseVarLength function from Joe Wass. See the file midi_functions.go for the original.
func ReadVarLengthData ¶
ReadVarLengthData reads data that is prefixed by a varLength that tells the length of the data
This is a slightly modified variant of the parseText function from Joe Wass. See the file midi_functions.go for the original.
Types ¶
This section is empty.