Guest User

Untitled

a guest
May 27th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. from scipy.io import wavfile as wav
  2. from scipy.fftpack import rfft
  3.  
  4. rate, data = wav.read('440Hz.wav')
  5. rawFTData = rfft(data)
  6. intFTData = [int(i) for i in rawFTData]
  7.  
  8. from statistics import mode
  9. mode(intFTData)
  10. >> 0
  11.  
  12. from collections import Counter
  13. count = Counter(intFTData)
  14. count.most_common()
  15. >> [(0, 1055), (-7, 588), (-15, 573), (43, 567), (-2, 563), (-6, 561), (-9, 557), (14, 555), (8, 554), (12, 551), (-11, 551), (26, 551), (11, 549), (19, 549), (-48, 549), (-26, 549), (-5, 545), (13, 545), (34, 544), (45, 541), (56, 541), (-17, 540), (-12, 538), (33, 538), (-47, 538), (-13, 536), (-14, 536), (-34, 534), (39, 534), (-16, 534), (7, 534), (-19, 533), (-10, 533), (2, 532), (25, 532), (64, 532), (20, 530), (30, 530), (29, 530)...
Add Comment
Please, Sign In to add comment