Skip to content
sjappig edited this page Feb 18, 2015 · 5 revisions

FFT-calculation

  • calculated using fftw3
  • 1024 points
  • averaged over 6 consecutive frames
  • no window function (i.e. boxcar)
  • new averaged fft is calculated every 250 ms

FM-demodulation

  • original signal from the receiver is decimated with first-order CIC
  • down factor = orig. sample rate / 192 kHz
  • angle approximation is done to the decimated signal with fast atan2
  • angles are differentiated
    • y(n) = x(n) - x(n-1)
  • resulting differences are clipped (to 1 and -1) to remove spurious values
  • this has suprisingly large effect on the audio
  • signal is then decimated twice with factor 2, using short half-band filter
  • resulting audio has sample rate of approx. 48 kHz

Websockets and WebAudio

  • server to ui: binary mode
  • ui to server: text mode
  • frequency, bandwidth and spectrum gain are sent with spectrum data
  • variables are passed as strings
  • one fft point = one byte (unsigned integer)
  • one audio frame is ~16 kB
  • one audio sample = four bytes (single-precision float)
  • audio is played using scriptprocessor
Clone this wiki locally