# voss algorithm for pink noise using 8 dice

from random import randint

numDice,biasDie,listDice,listPink=8,3.5,[0,0,0,0,0,0,0,0],[]

def rollDie():
    return randint(1,6)-biasDie

def voss(index):
    listDice[0]=rollDie()
    if index%2==0:listDice[1]=rollDie()
    if index%4==0:listDice[2]=rollDie()
    if index%8==0:listDice[3]=rollDie()
    if index%16==0:listDice[4]=rollDie()
    if index%32==0:listDice[5]=rollDie()
    if index%64==0:listDice[6]=rollDie()
    if index%128==0:listDice[7]=rollDie()
    return listDice

def pinkNoise(listPink):
    for index in range(2**numDice):
        listPink.append(int(sum(voss(index))))
    return listPink

print(pinkNoise(listPink))
