# génération des 2 courbes cibles Lebbolo import math import cmath fc=1000 # fréquence caractéristique inf=20 # fréquence inférieure sup=20000 # fréquence supérieure N=101 # nombre de points offset=90 # décalage en dB file_low=open("low_Lebbolo.frd","w") # nom des fichiers .frd file_high=open("high_Lebollo.frd","w") for i in range(0,N): f=inf*(sup/inf)**(i/(N-1)) low=(1/(1+1.58*1j*1.17*f/fc-(1.17*f/fc)**2))*1/(1+1j*0.384*f/fc) # fonctions de transfert high=((1j*f/(1.17*fc))**2/(1+1.58*1j*f/(1.17*fc)-(f/(1.17*fc))**2))*1j*f/(0.384*fc)/(1+1j*f/(0.384*fc)) file_low.write(str(f)) file_low.write("\t") file_low.write(str(20*math.log10(abs(low))+offset)) file_low.write("\t") file_low.write(str(57.29*cmath.phase(low))) file_low.write("\n") file_high.write(str(f)) file_high.write("\t") file_high.write(str(20*math.log10(abs(high))+offset)) file_high.write("\t") file_high.write(str(57.29*cmath.phase(high))) file_high.write("\n") file_low.close() file_high.close() print('delay tweeter invert :\n',180/fc,'ms\n',18*344/fc,'cm\n',18*135/fc,'in')