GeneraStudios
Member
Hello everyone,
I'm trying to have a GUI element (in this case an XY pad, but perhaps also a slider) visually change its value per how an LFO (or other mod source) is interacting with with the setting it controls. The effect i'm going for is that the user can set volume and pan using the XY pad, and then an LFO is modulating both of those to some degree. So after they set the initial value and start playing, the LFO triggers and the XY pad visually updates to match the actual volume and pan volumes.
I was testing trying to update the XY position by setting the position of the element to be controlled by another knobs position inside of the 'on note' function (the knob usage is strictly for test, I really want to have this use an LFO to move it around). However this only updates it at each note trigger, not during the note sustain. Also i'm having trouble mapping the value of something to the 0-1 range the XY pad desired.
I had dabbled in some animation before in KSP, and my guess is that I would have to create a user function which gets called at every on-note function. This function would run a while loop that does some math to map the current parameter value (in this case volume or pan), to the 0-1 range the pad wants, and then update the current element location in the XY pad - all at specific time intervals fast enough to look like an animation. This sounds like a massive pain and I imagine there might be an easier way to do it.
So I have a few questions:
-How do I correctly map the 0-1000000 value of the volume parameter of a certain group to the 0-1 float value? int_to_real() seems to only be getting me 0 or 1, and dividing by 1000000 doesn't work either.
-How can I update an XY pad location live either as notes are played, or all the time, to match the volume or pan of a certain group (which is being modified by a modulator)? How can I do the same type of live updating of a knob / slider position?
I'd prefer a solution that is as CPU intensive as possible, but at this time I just want to get it up and running at any cost and deal with the CPU issue later (even by having a version with animation and without animation).
Thanks,
--
Andrew
I'm trying to have a GUI element (in this case an XY pad, but perhaps also a slider) visually change its value per how an LFO (or other mod source) is interacting with with the setting it controls. The effect i'm going for is that the user can set volume and pan using the XY pad, and then an LFO is modulating both of those to some degree. So after they set the initial value and start playing, the LFO triggers and the XY pad visually updates to match the actual volume and pan volumes.
I was testing trying to update the XY position by setting the position of the element to be controlled by another knobs position inside of the 'on note' function (the knob usage is strictly for test, I really want to have this use an LFO to move it around). However this only updates it at each note trigger, not during the note sustain. Also i'm having trouble mapping the value of something to the 0-1 range the XY pad desired.
I had dabbled in some animation before in KSP, and my guess is that I would have to create a user function which gets called at every on-note function. This function would run a while loop that does some math to map the current parameter value (in this case volume or pan), to the 0-1 range the pad wants, and then update the current element location in the XY pad - all at specific time intervals fast enough to look like an animation. This sounds like a massive pain and I imagine there might be an easier way to do it.
So I have a few questions:
-How do I correctly map the 0-1000000 value of the volume parameter of a certain group to the 0-1 float value? int_to_real() seems to only be getting me 0 or 1, and dividing by 1000000 doesn't work either.
-How can I update an XY pad location live either as notes are played, or all the time, to match the volume or pan of a certain group (which is being modified by a modulator)? How can I do the same type of live updating of a knob / slider position?
I'd prefer a solution that is as CPU intensive as possible, but at this time I just want to get it up and running at any cost and deal with the CPU issue later (even by having a version with animation and without animation).
Thanks,
--
Andrew