ofxPDSP what does amp.in_mod mean? and how do I use it?

kinda of a long shot, but im trying to learn how to use ofxPDSP and I cant figure out what amp.in_mod means?

context:
gate_ctrl.out_trig() >> env;
env >> amp.in_mod();

In this example an env is patching into the amp? Perhaps I just dont know what amp means…

Hey this addon has a really awesome webpage for documentation here: ofxPDSP: ofxPDSP. And the github page has lots of example projects too: GitHub - npisanti/ofxPDSP: openFrameworks addon for audio synthesis and generative music.

If I were to guess, I’d say that the context code involves a gate function, which triggers envelope, which in turn is modulating the amplitude (volume or strength) of a signal.

1 Like

Do you know what in_mod() means in this context?

I’ve worked with SuperCollider quite a bit, but not ofxPDSP, so I’d be guessing again. But, .in_mod() is a function (or a message) that is being applied to the object amp. And, if you type in_mod into the search box of the documentation (which is one of several reasons why its so amazing!), you’ll get this page that describes pdsp::Amp and its class functions, including the function pdsp::Amp::in_mod(): ofxPDSP: pdsp::Amp Class Reference.

It looks to me that ofxPDSP might have a class structure with a lot of inheritance, and that pdsp::Amp inherits from pdsp::Unit. So presumably a pdsp::Amp object can also use the class functions of pdsp::Unit. Alternatively, a class function in pdsp::Unit can be redefined by pdsp::Amp to better suit how it would specifically apply to an object of pdsp::Amp.

1 Like

@npisanti