import wave from array import array import struct class She: def __init__(self): self.heshe = "gal" self.baby = self.rsrc("that_thang.wav") self.tits = self.yoga(self.baby) self.belly = 0 self.butt = [ [int(self.tits[0]*0/7),[0,1]], [int(self.tits[0]*1/7),[0,70]], [int(self.tits[0]*2/7),[0,3]], [int(self.tits[0]*3/7),[0,1]], [int(self.tits[0]*4/7),[0,1]], [int(self.tits[0]*5/7),[0,5]], [int(self.tits[0]*6/7),[0,110]] ] # [where,[crrnt,pool]] # 0,3,4 should move normally self.egg = [[],[0,200000]] def rsrc(self,fn): print("doing that thang") w = wave.open(fn,"r") b = w.readframes(w.getnframes()) s = list(struct.unpack('%dh'%(len(b)/w.getsampwidth()),b)) w.close() return s def yoga(self,b): l = len(b) for i in range(2,l): b[i-2] = b[i]-b[i-2] del b[-2:] l = l-2 mx = int(max(b)) mn = int(min(b)) if mn > mx: mx = mn for i in range(l): b[i] = b[i]/mx l = int(l/2) print(l,mx,b[6999],b[7000]) return [l,mx] def breathe(self,n): b = self.butt[n] f = 2*b[0] return [self.baby[f]/b[1][1],self.baby[f+1]/b[1][1]] def shake_it(self,n): b = self.butt[n] b[1][0] = b[1][0]+1 if b[1][0] == b[1][1]: b[0] = (b[0]+1)%self.tits[0] b[1][0] = 0 f = 2*b[0] return [self.baby[f]/b[1][1],self.baby[f+1]/b[1][1]] def reincarnate(self,v): # add self.egg to self.baby self.belly = v % 7 print("belly =",self.belly) self.egg[0] = [] self.egg[1] = [0,200000] print("egg got empty") def sing(self): if self.belly == 3: lr = self.shake_it(3) elif self.belly == 4: lr = self.shake_it(4) else: lr = self.shake_it(0) self.egg[0].append(lr[0]) self.egg[0].append(lr[1]) self.egg[1][0] = self.egg[1][0]+1 if self.egg[1][0] == self.egg[1][1]: print("self-incarnating") self.reincarnate(32123*int((self.egg[0][-2]+self.egg[0][-1])/2)) return lr def fuck(self,other_one): print("doin nothang")