bibliopixel.util.offset_range module

Handle DMX and MIDI channel offsets

class bibliopixel.util.offset_range.DMXChannel(offset=0, begin=None, end=None)[source]

Bases: bibliopixel.util.offset_range.OffsetRange

BEGIN = 1
END = 512
class bibliopixel.util.offset_range.MidiChannel(offset=0, begin=None, end=None)[source]

Bases: bibliopixel.util.offset_range.OffsetRange

BEGIN = 1
END = 16
class bibliopixel.util.offset_range.MidiNote(offset=0, begin=None, end=None)[source]

Bases: bibliopixel.util.offset_range.OffsetRange

BEGIN = 0
END = 127
class bibliopixel.util.offset_range.OffsetRange(offset=0, begin=None, end=None)[source]

Bases: object

copy_to(source, target)[source]
full_range()[source]
index(i, length=None)[source]

Return an integer index or None

classmethod make(x=0)[source]
read_from(data, pad=0)[source]

Returns a generator with the elements “data” taken by offset, restricted by self.begin and self.end, and padded on either end by pad to get back to the original length of data