Package midi :: Module encoding
[hide private]
[frames] | no frames]

Module encoding

source code

Utilities needed for encoding/decoding MIDI data.

Functions [hide private]
 
read_varlen(data)
Reads a variable-length value from a stream as used in MIDI data.
source code
 
write_varlen(value)
Encodes the given numeric value as a MIDI variable-length value and returns the data as a string that should be written to a data stream to represent that value.
source code
 
r_varlen(hexstring)
reads a hex value as a string, returns an integer
source code
 
__test_varlen() source code
Variables [hide private]
  __package__ = None
hash(x)
Function Details [hide private]

read_varlen(data)

source code 

Reads a variable-length value from a stream as used in MIDI data. Pops all the bytes that form a part of the value and returns the decoded numeric value.