import wave, struct, math, random fe = 44100.0 # hertz duree = 10.0 # secondes freq = 110.0 # hertz dt = 0.04 x, y = 0.0,0.0 m = 5.0 wavef = wave.open('vanderpol2.wav','w') wavef.setnchannels(1) # mono wavef.setsampwidth(2) #2 octets par piste wavef.setframerate(fe) for i in range(int(duree * fe)): m = 0.5-abs(i-duree*fe/2.0)/duree/fe m *= 10.0 x += random.random()/32000.0 y += 0.02*math.cos(freq*math.pi*float(i)/float(fe)) x,y = x+dt*y, y+dt*(-x+m*(1-x**2)*y) value = int(2000*x) data = struct.pack('