Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)
Reads string as big endian word, (asserts len(value) in [1,2,4])

1642193635L

25057

        def readBew(value):
    """
    Reads string as big endian word, (asserts len(value) in [1,2,4])
    >>> readBew('a        


src/c/a/canta-HEAD/canta/midi/EventDispatcher.py   canta(Download)
 
# custom
from DataTypeConverters import readBew, readVar, varLen, toBytes
 
# uhh I don't really like this, but there are so many constants to 
        # MTC Midi time code Quarter value
        if common_type == MTC:
            data = readBew(common_data)
            msg_type = (data & 0x07) >> 4
            values = (data & 0x0F)
 
        elif common_type == SONG_SELECT:
            data = readBew(common_data)
            stream.song_select(data)
 
        # SEQUENCE_NUMBER = 0x00 (00 02 ss ss (seq-number))
        if meta_type == SEQUENCE_NUMBER:
            number = readBew(data)
            stream.sequence_number(number)
 
        # MIDI_CH_PREFIX = 0x20 (20 01 channel)
        elif meta_type == MIDI_CH_PREFIX:
            channel = readBew(data)
            stream.midi_ch_prefix(channel)
 

src/c/a/canta-HEAD/canta/midi/RawInstreamFile.py   canta(Download)
 
# custom import
from DataTypeConverters import readBew, readVar, varLen