I’m trying to build out a simple idea, where given an array of chords, e.g.
~chords = [ [1,3,5], [2,4,6], [3,5,7], [4,6,8], [5,7,9], [2,6,8], //... ];
… I would create 3 synths who choose their frequency to play depending on MouseX. So in the above example, if those are all the chords that are there, then the screen would be separated into 6 sections, and when the mouse is on the far left, you hear a [1,3,5] chord (the first chord in the array) and when it’s on the right you hear [2,6,8] (the last chord).
But as I started writing it, I got stuck on how to use the current value of MouseX to pull values out of an array. Is there some array/buffer-reading UGen I’m not thinking of that might be useful here?
As a followup experiment, I’d like to be able to tween between the frequencies rather than have a hard transition once your mouse crosses into another region, which I’m guessing would just be some evolution of the first solution, but just trying to keep that in mind.