CCButton Enable/disable but still read button state? #1058
Replies: 4 comments
-
The Button object inside of the CCButton class is not publicly accessible, so it's probably easiest to use something based on the Custom-MIDI-Output-Element example, where you can allow access to the button member variable. |
Beta Was this translation helpful? Give feedback.
-
Many thanks, I'm already using a custom CCbutton (sending controller across multiple MIDI channels when "enabled"), so something like:
but I think it needs to be button.update() not button.getButtonState() if it is to work when the function is "disabled" ? |
Beta Was this translation helpful? Give feedback.
-
think I've got it sorted, typo in the above
should be:
so "update" is:
compiles OK, yet to test it. |
Beta Was this translation helpful? Give feedback.
-
Working nicely, thanks for the pointer. |
Beta Was this translation helpful? Give feedback.
-
I'm using the enable/dsiable feature on CCButton to control when MIDI output is produced:
(not posting the full code as it's big)
This works fine.
Ideally, I'd like to be able to still manually detect button transitions while the MIDI output is disabled:
I realise that the "disable" function removes the CCButton from the list of instances.
Any ideas on how to detect buttin changes with MIDI output disabled ? Define another button in parallel on the same pin, or is there something better?
Many thanks for the library and excellent support!
Beta Was this translation helpful? Give feedback.
All reactions