Control push button state/color from gen?

Home Forums OWL Control push button state/color from gen?

This topic contains 6 replies, has 2 voices, and was last updated by  jayrope 7 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2837

    jayrope
    Participant

    How can i control the push button states out of gen?

    Thanx much in advance!

    #2842

    Martin Klang
    Keymaster

    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.

    #2845

    jayrope
    Participant

    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?

    #2848

    jayrope
    Participant

    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.

    #2851

    Martin Klang
    Keymaster

    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.

    #2852

    Martin Klang
    Keymaster

    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.

    #2854

    jayrope
    Participant

    I’ll checkout your code snippets above. Is there a way to go to green color as well?

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.


Latest News

Links

Follow us on Twitter