# Windowing Function on Real time fake signal with customizable overappling window?

**URL:** <https://discourse.processing.org/t/windowing-function-on-real-time-fake-signal-with-customizable-overappling-window/39323>\
**Category:** Coding Questions\
**Created:** [October 17, 2022, 4:22pm UTC](https://discourse.processing.org/t/windowing-function-on-real-time-fake-signal-with-customizable-overappling-window/39323 "2022-10-17T16:22:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![black](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/black/32/477_2.png) [@black](https://discourse.processing.org/u/black)\
**Post date:** [October 17, 2022, 4:22pm UTC](https://discourse.processing.org/t/windowing-function-on-real-time-fake-signal-with-customizable-overappling-window/39323/1 "2022-10-17T16:22:04Z")

</div>

I was trying to create a sliding window on a signal. I have implemented the windowing function on a precalculated data from a csv file but when I was trying to do the same for a real time data where we dont have data available for some time and have to wait until we have enough data window it. To understand this, I have created a fake signal using a sine wave as shown in my sketch and try to implement a windowing function but I think my code is not correct. As I said there are no errors but I feel that my code isn’t doing what it suppose to do. I am saving the part of the signal into a buffer which represents the data from the captured using window function.

The buffer part is in red, and signal is in blue.

Here is the visualization in P5JS Sketch [Link](https://editor.p5js.org/black/sketches/H5wfzI1Nf)
