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

All Samples(19)  |  Call(17)  |  Derive(0)  |  Import(2)
Turns a list of bytes into a string

        def fromBytes(value):
    "Turns a list of bytes into a string"
    if not value:
        return ''
    return pack('%sB' % len(value), *value)
        


src/c/a/canta-HEAD/canta/midi/MidiOutFile.py   canta(Download)
 
from constants import *
from DataTypeConverters import fromBytes, writeVar
 
class MidiOutFile(MidiOutStream):
        note, velocity: 0-127
        """
        slc = fromBytes([NOTE_ON + channel, note, velocity])
        self.event_slice(slc)
 
        note, velocity: 0-127
        """
        slc = fromBytes([NOTE_OFF + channel, note, velocity])
        self.event_slice(slc)
 
        note, velocity: 0-127
        """
        slc = fromBytes([AFTERTOUCH + channel, note, velocity])
        self.event_slice(slc)
 
        controller, value: 0-127
        """
        slc = fromBytes([CONTINUOUS_CONTROLLER + channel, controller, value])
        self.event_slice(slc)
        # These should probably be implemented

src/c/a/canta-HEAD/canta/midi/RawOutstreamFile.py   canta(Download)
 
# custom import
from DataTypeConverters import writeBew, writeVar, fromBytes
 
class RawOutstreamFile: