this is my first post and I am a Pure Data Beginner.
I would like to smoothe out an Array in a specific way.
This for example:
This curve is meant to rise until the end. The Values arent supposed to fall at any point. Two same values after each others is also not ideal. In my original patch, I recorded a Pitchbend Automation with 16384 Values. X and Y. During recording, there happened a few midi values, which didn't fit to the rest.
I would like to smooth out the recorded curve, that it is never falling an rises up until the last x value. Like here in the manually corrected example.
I have an Idea, but as I am a beginner I am very frustrated at the moment. tried to get it to work three days.
My Idea was to create a loop, which goes through the array and stops at position "n", if value x on position "n" is smaller or the same value like at position "n-1". Then a counter starts at this position and counts until a x value is bigger than the x value at position "n-1".
If it is bigger, the counter adds the last number. After that the Patch looks what the difference is of Value x on position "n-1" and Value y on position "n-1" plus the Counter Value. After that it divides the difference into the Counter Number as the value "Increment". Then the Patch goes back to Position "n" and adds up the P Value. Then it goes to position "n+1" and adds the Value "n" plus the P Value * 2 and so on, until it reaches the highest Point. After the whole loop beginns again, until it smoothes out the Courve completely.
How can I do that? Maybe there exists already something like that? A patch or so? I appreciate easy beginner tipps!
Thank you very much!!