WaveBeans / wavebeans

Audio Processing. On scale.
https://wavebeans.io
Apache License 2.0
24 stars 0 forks source link

Windowing #5

Closed asubb closed 4 years ago

asubb commented 4 years ago

Type of windows:

  1. Fixed Window. Parameters: size.
  2. Sliding Window. Parameters: size, step. Fixed window is actually just another case of the Sliding window, but better to have it separately.

Usage: As for the beginning for building FFT and STFT.

API example

stream.window(512) // will create FixedWindow
stream.window(512).sliding(128) // will create FixedWindow and then mutate it to Sliding Window.

The window function creates a different type of the Stream -- WindowStream, which has a separate API (compile time checks) and may work with the streams with the very same attributes like size and step (runtime checks and ideally also during topology build process).

The following API should be available:

  1. Division/Multiplication by scalar value.
  2. Sum/Subtract with another WindowStream.
  3. Division/Multiplication with another WindowStream.
asubb commented 4 years ago

To cover full cycle I'll add an FFT implementation on top of Fixed Window and output of magnitude/phase to CSV.