Parameter Type PT_UNKNOWN usage?

In what cases would we use the parameter type PT_UNKNOWN? (or NONE as appear in the interface builder)?

I’ve used PT_VIRTUAL for handling variables that are not related to actual messages sent to devices, but I don’t see the PT_UNKNOWN usage. Can anyone enlighten me?

Thanks!

None basically translatew to Virtual with one (and the only) major difference: ‘None’ messages are not saved in the parameter map and their functions are not triggered when preset and/or snapshots are loaded.

None is intended to be used for buttons, pads, etc that control state of the preset rather than being involved in messaging to/from devices. I will add PT_NONE so that it is not identified as the default PT_UNKNOWN.

Makes perfect sense! Thanks Martin!
And yes, we need the PT_NONE.

Martin, what is the PT_UNKNOWN type for? it does not control neither the VIRTUAL nor the NONE type.

Example:

Create a fader with Message Type NONE, and it will not change with any of the following:

parameterMap.set(1, PT_VIRTUAL, 1, 120)
parameterMap.set(1, PT_UNKNOWN, 1, 120)

Now, change the fader Message Type to VIRTUAL, and it will change with:

parameterMap.set(1, PT_VIRTUAL, 1, 120)

But will NOT change with:

parameterMap.set(1, PT_UNKNOWN, 1, 120)

And there is no way to change the controls with Message type NONE via lua. We do need it! (specially since I moved most of my controls to NONE since you explain them)

1 Like

PT_UNKNOWN is meant to be returned if any incoming message does match known list of message types. It is not meant to be used to register data in the parameterMap.

PT_NONE is missing on the list. I guess that is the source of the confusion. I am already adding it. It will be included in 3.5.1

Oh, now it is really clear! Thanks for the explanation. You should let some of us help you with the documentation to edit stuff and make it clearer / more verbose where it should.

1 Like

hell yeah! :slight_smile:

The documentation was available on github for quite some time and users invited to help. As there was nobody contributing I made it a private repo. I can make it available again.

It is a simple vuepress app, with documentation pages written in simple markdown-ish syntax.

I think the current documentation is great! Things are very clear, but sometimes, there might be some stuff trickier to understand without more verbosity. for example:

PT_UNKNOWN is meant to be returned if any incoming message does match known list of message types.

I actually do not see any usable case for PT_UNKNOWN in lua! since incoming Parameter type is not readable from a midi.onMessage function

I know you have tons of stuff to do on your hands, and documentation may be pretty tedious (I know first hand!). There are some of us using lua heavily for our templates (then one I’m working on is over 1500 lines stripped of comments), so maybe we can help even if it’s a bit, however, it’s counter productive that we need a deeper understanding to be able to document the non-clear aspects, and your time replying the questions might be even more than the one for updating the documentation!