How can i control the push button states out of gen?
Thanx much in advance!
How can i control the push button states out of gen?
Thanx much in advance!
At the moment you can’t, sorry!
The reason is that there isn’t currently a way of passing parameters from Gen.
We could set up an additional audio stream that would allow you to set the led and/or the trigger output, but it’s way overkill if you don’t use it.
Ah, it’s a pity. I think having this would greatly enhance the ergonomics of the pedal, for things like optical feedback on tapped tempo or to indicate the level within several layers of control, reusing faders and all.
This is not even possible straight from C++? If it is, would you have a code snippet, that i could edit into my gen code?
Get me an idea, it would be good enough to run an additional audio stream for that matter only on something like 1Khz, no? For visual purposes that would be good enough.
Code snippets: I really need to understand how this works in Gen!
In C++ the following sets the trigger output high and changes the LED to red:
setButton(PUSHBUTTON, true);
and low / green:
setButton(PUSHBUTTON, false);
You can optionally specify the index of the sample (delay
), from the start of the current block, when the change should take place:
setButton(PUSHBUTTON, true, delay);
And instead of true/false you can pass in a variable: if it evaluates to non-zero then the output will be on.
Everything in Gen runs at audio rate, so the LED stream would, too. The LED controller however doesn’t, so the patch would have to read through the stream for each block to see if the value has changed, and act accordingly. On reflection, this would be horribly inefficient and best avoided.
If it can be done by embedding C++ that would be fantastic.
I’ll checkout your code snippets above. Is there a way to go to green color as well?