I had a need for this, so wrote it; if there is interest in this, I will be happy to send a pull request to be included after gate-keeping due diligence steps are done.
The plugin has two buttons that work with each other thus - if the first one is mapped to an external MIDI controller and the second to a hardware button on the device, turning the latching MIDI on will turn on the hardware button display and off if turned off, and output a CV signal that can be used to control effects on the pedalboard. Additionally, if the hardware button is operated, it will also reflect in the output CV allowing the effects controlled by the CV to be turned on or off by either the MIDI control or the hardware button. It internally applies the XOR logic that you may read in the Mvave chocolate controller thread. Meaning, the buttons can toggle each other through the output CV:
Just the MIDI switch on - LED turns on; HIGH sent through CV
While MIDI switch is on (LED is on at this stage), hardware button pushed - LED turns off; LOW is sent through CV
While MIDI switch is off (LED is off at this stage), hardware button is pushed - LED turns on; HIGH is sent through CV
At this stage the MIDI switch is pressed - LED turns off; LOW is sent through CV
This plugin essentially puts together the few plugins that need to be connected to get the Chocolate to be used as a toggle for effects.
It is a great idea. Please share it. Is it on GitHub?
Also, to avoid having too many plugins added on the PB, you may consider controlling with a single plugin more than one CV port. E.g. five hw buttons to be mapped to five midi controls, toggling five different CV ports?
Is there a way to set the initial state of the output line when the snapshot is loaded? I guess with the default value of the control assigned to the hw button?
Many thanks.
Funnily, I had the same idea and finished writing a second version that has five pairs of toggles and five CV outs. I am struggling a little bit with writing the div tags and the CSS to render properly. I will overcome that soon. I made one other upgrade - clicking on one switch in the pair also turns on the other switch, so I no longer have to do the XOR thing and create out of synch button states.
These are not on GitHub yet, I thought I would to get it into mod-plugin-builder repository if possible.
I have not thought of the initial states question - I am initiating to all off. I will look into this.
@njsiva, It could also be useful to send out a midi cc with the actual state of the CV. Some external midi controller could use it to toggle a led reflecting such state
Thank you so much for trying @zwabo . That is unfortunate that you see an error. Any clues from the developer console when you try to add? I do not own a dwarf, so I am going to compile for it to see if there are any compile time clues.
Additionally, I will post the single pair version that only uses HMI to set the LED, but not the request_change library to set the button state. My best guess is that is where the failure is. If you are able to test that, I will just make that a five-pair solution.
This plugin remembers me the Gossiper Plugin and Tetr4 Switch plugins that I created.
Related to gossiper, I used the widget popup for showing the pedal new state. And related to Tetr4 Switch, I use a “patch” idea that enable changing multiple CV states depending “on plugin patch state”. This gif maybe make the plugin concept more clear:
I will put the source code here, maybe it could be useful for your project, @njsiva
@zwabo - many thanks again. In the meantime, would you please be able to test this on a dwarf? If this works (the missing feature between this and the previous one is that this doesn’t attempt to toggle the second button automatically, just sets the LED), then I will make this into a five-pair solution. Much appreciate the time and effort.
I think I may have fixed this issue, too. Would you please consider downloading again and giving this one more shot? It looks like the DuoX host was more forgiving of my coding error than the Dwarf. Thank you for your patience and time.
@Remy_D - my apologies for not responding sooner. Have you compiled a plugin using the mod-plugin-builder utility before? That is one way of doing it. If not, once this is tested, I can appeal for this to make it to the beta plugin store.
Thanks!
Ah, now I understand - you will have to build this plugin through mod-plugin-builder builder that creates the manifest.ttl from the manifest.ttl.in file. I will find the thread that provides those instructions and reply soon. My apologies for assuming you were compiling and installing.
Thanks