package
1.23.7
Repository: https://gitlab.com/gomidi/midi.git
Documentation: pkg.go.dev

# README

This internal library contains functions derived from the github.com/afandian/go-midi package of Joe Wass. These functions are in the file "derived.go". The original functions are in the files midi_functions.go and music.go which are copies of the corresponding files from github.com/afandian/go-midi.

The functions in the file "not-derived.go" are not derived from Joe Wass.

# Functions

ClearBitU8 clears the bit at position pos within n.
IsChannelMessage returns if the given byte is a channel message.
IsStatusByte returns if the given byte is a status byte.
KeyFromSharpsOrFlats Taking a signed number of sharps or flats (positive for sharps, negative for flats) and a mode (0 for major, 1 for minor) decide the key signature.
MsbLsbSigned returns the uint16 for a signed MSB LSB message combination.
takes a 14bit uint and pads it to 16 bit like in the specs for e.g.
ParsePitchWheelVals parses a 14-bit signed value, which becomes a signed int16.
ParseStatus parses the status byte and returns type and channel This is a slightly modified variant of the readStatusByte function from Joe Wass.
ParseTwoUint7 parses two 7-bit bit integer stored in two bytes, ignoring the high bit in each.
ParseUint7 parses a 7-bit bit integer from a byte, ignoring the high bit.
ReadByte reads a byte from the reader.
ReadNBytes reads n bytes from the reader.
ReadUint16 reads a 2-byte 16 bit integer from a Reader.
ReadUint24 parse a 3-byte 24 bit integer from a Reader.
ReadUint32 parse a 4-byte 32 bit integer from a Reader.
ReadVarLength reads a variable length value from a Reader.
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.