I have this picture: http://bourt.com/color/slide.html. Left-clicking the circle will generate an audible click. I want the clicks to be constant until I release the mouse button, and to make the interval between the clicks smaller as I move the circle up, to the point where the clicks form a tone.
This is easy to do in VCV, which where I prototyped it: 
But I can't quite figure out how to mimic the behavior of triggering the clicks with an LFO. As I understand it, one option is to use AnalyserNode.getFloatTimeDomainData(), find the peaks and schedule the clicks accordingly, but that's a lot of damn work (creating the abstraction infrastructure etc.) for something that is conceptually very simple.
So I'm still hoping that it's possible to somehow use an oscillator to trigger the clicks, and vary the frequency of that oscillator with the position of the circle. Is it?
Aucun commentaire:
Enregistrer un commentaire