Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kParameterIsTrigger which maps to pprops:trigger #28

Closed
wants to merge 3 commits into from

Conversation

grejppi
Copy link
Contributor

@grejppi grejppi commented Jan 7, 2018

Just a little cosmetic thing I was missing when porting some existing plugins to DPF 😊

@falkTX
Copy link
Contributor

falkTX commented Jan 7, 2018

I was going to ask about if it was LV2 specific, but you mentioned it in the comment for the property.
For standalones, we can do it without issues, there's no host involved.
It's possible to do it for VSTs too, though in a kinda hacky way (the entire VST spec is hacky anyway).

LADSPA and DSSI cannot do this.

So I like the idea, but I'd change things a little:

  1. set value as 0x20 | kParameterIsBoolean, to make sure it always includes boolean prop.
  2. change comment to mention it breaks LADSPA and DSSI
  3. implement in JACK and VST formats

If you want to help more, go ahead and do the first 2 items.
Thanks.

@grejppi
Copy link
Contributor Author

grejppi commented Jan 7, 2018

  1. set value as 0x20 | kParameterIsBoolean, to make sure it always includes boolean prop.

Done ☺️

  1. change comment to mention it breaks LADSPA and DSSI

I'm still a little confused about this part, but I agree, the LV2 specification seems to require that the value is reset immediately.

The way I do it in my plugin is along the lines of:

float parameter;
bool triggered;

void setParameterValue(uint32_t index, float value) override {
    // ...
    parameter = value;
        if (value > 0.5 && !triggered) {
            triggered = true;
            // do something once
        } else {
            triggered = false;
        }
    }
    // ...
}

A user of the LADSPA version would need to set the control to 0 manually before it can be triggered again, but because the value is only updated when it goes from 0 to 1 doesn't make any difference however long the value remains 1.

@falkTX
Copy link
Contributor

falkTX commented Aug 4, 2018

Now implemented in DPF. Added a fake mode of it for ladspa, vst and jack formats.

@falkTX falkTX closed this Aug 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants