[orx-fft] Add orx-fft for a simple fast fourier transform routine

This commit is contained in:
Edwin Jakobs
2024-03-17 16:01:03 +01:00
parent 8f2d382093
commit 0664803e1d
7 changed files with 416 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
package org.openrndr.extra.fft
import kotlin.math.PI
import kotlin.math.cos
class HannWindow : WindowFunction() {
override fun value(length: Int, index: Int): Float = 0.5f * (1f - cos((PI * 2.0 * index / (length - 1f)))
.toFloat())
}