(length, level=4)
return noise
Create white noise for background
Create white noise for background
Create white noise for background
def create_noise(length, level=4):
    """Create white noise for background"""
    noise = bytearray(length)
    adjust = 128 - int(level / 2)
    i = 0
    while i < length:
        v = random.randint(0, 256)
        noise[i] = v % level + adjust
        i += 1
    return noise
def create_noise ( length , level = 4 ) : noise = bytearray ( length ) adjust = 128 - int ( level / 2 ) i = 0 while i < length : v = random . randint ( 0 , 256 ) noise [ i ] = v % level + adjust i += 1 return noise