Advertisement
Guest User

teste_som

a guest
Nov 8th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scilab 0.54 KB | None | 0 0
  1. //Bloco de ciração do filtro
  2. n   = 5; // Ordem do filtro
  3. Fs      = 48000; // Frequência de amostragem
  4. Fc = 1000;   // Frequência de corte
  5. Freq = Fc/Fs;
  6. hz = iir(n,'lp','butt',[Freq 0],[0 0]);//Butterworth - transformação bilinear
  7.  
  8. [y1,Fs,bits]=wavread("/home/edmau/Downloads/audiocheck.net_sin_1500Hz_-3dBFS_5s.wav");
  9.  
  10. //H = poly(hz,'x','coeff');
  11. H = horner(hz,1/%z);
  12.  
  13. numerador = round(2^20.*coeff(numer(H)));
  14. denominador = round(2^20.*coeff(denom(H)));
  15.  
  16.  
  17. [audio1,audio2]=filter(numerador,denominador,y1);
  18.  
  19. sound(audio1,Fs,bits);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement