This is an absolute beginners question and points out my misconception about recursion…
I built a loop, which tests if a midinote is in a certain range. The “good” range is between 3600 and 8400. If the note is smaller then 3600, it adds 1200 and if the note is higher then 8400, it subtracts 1200. This loop works fine so far.
But I have to make it recursive somehow, because if the note is very small like 1000 it adds 1200, which results in 2200. Which is still out of the “good” range. So i have to do the loop a second and a third time to fit it in the right range.
Could you give me a hint?
I attatched the omp and 2 screenshots.