I am currently working on a little animation project with a 2D grid of spring forces. If you grab a bob of a spring with the mouse it is moving each spring and therefore the bob position updates. Now I wanted to translate each position displacement to an individual level for some sound (in my case just a bunch of sinewave wavetable osc from the juce tutorial).
I got the following code in my processing block:
The code works “fine” but causes crackling because it’s not properly ramping because the GUI thread and audio thread aren’t synced right? I tried to buffer the levels in each call but it didn’t work either.
I thought about using the applygainramp but didn’t get it to work because I got individual levels for each oscillator.
Does anybody know how I could get this to work or give me any good tips & references on how to properly process GUI animation?