@falkTX - per your recommendation, I am checking in again to see if there is a path to get this to the plugin store or repository. Thank you.
@njsiva, I just created a pull request on Github for you. I have added a new capability to your already great plugin which I hope you’ll consider to merge.
Since I bough the dwarf, I was looking for a way to commute effects on/off using a midi controller without having to know their current state to allow the user to take advantage of both snapshots and “stomp mode”. See Toggle (on/off) a plugin with midi - #18 by S_Righteous and Toggle (on/off) a plugin with midi - #18 by S_Righteous .
Consider this use case:
- I recall a clean snapshot
- I add an overdrive sending a CC in the common MOD way (a CC with value=127). Now my controller thinks that the overdrive is on
- I then recall a different snapshot, without overdrive.
- If I want to add an overdrive via midi I will have to push twice my controller (the first will send a CC with value=0, the second with value=127)
So I added to your plugin the possibility to toggle a switch pair trough a midi CC in a different way.
Normally, when a toggle is paired to a CC in the common way, it goes to ON receiving a value >=64, and to OFF otherwise.
This requires that the external controller is able to know the current state of the toggle. There are cases (e.g. loading a snapshot) where this cannot be easily accomplished.
In my implementation, a midi-in port has been added to directly receive CC without the pairing mechanism.
Also, a new parameter (CC) has been added to select the midi_CC to listen for.
When such CC is received, the “value” field is used as the index of the switch pair to be toggled.
E.g. if the CC parameter is set to 19, a midi CC message (control=19, value=0) toggle the first pair. A midi message (control=19, value=1) toggle the second pair and so on, up to the number of available pairs.
Summing it up:
Normal MOD approach to pair a toggle to a midi CC ( control, value) is indexing the switch with the control field and setting it to “value”. There is a “control” for each toggle
My addition allows to use a single CC “control” and addressing the toggles via the “value”, to change their current state.
I hope I have been clear.
Z
Edit: to be clear, the existing features of the plugin has not been affected by the change. You can still pair a midi controller the usual way if you prefer
Edit 2: fixed example as suggested by @Abotte below
For those who may be interested to have a look at this, my current fork is GitHub - zavorra/control-button-board at midi_toggle
Just to make sure I understood, you meant (control =19, value = 1) to toggle the second pair?
Yes, thanks.
Take your time and please review my code
This would be a great addition to the functionality of the plugin. For some reason the guys from MOD are neglecting implementing bi-directional midi cc/pc exchange that would allow smart midi controllers to understand what’s going on within Dwarf and respond accordingly.
I’ve built my Arduino-based midi controller that would benefit greatly from Dwarf mirroring cc/pc messages over midi out.
Thanks!
Anyone else running into trouble compiling with mod plugin builder after a python upgrade to 3.12? It looks like the module imp that is required isn’t there anymore. @Zavorra - I will downgrade this weekend, compile and then merge. Apologies for taking longer than I expected.
TBH as of now the plugin is not mirroring anything. I agree it would be a useful functionality to add an echo on a CC after changing a switch pair state.
@njsiva I am building on the Mod Plugin Builder docker, because it’s the only way I managed to get it
Like right now ?
@njsiva great news.
What do you think about @TheRedOne request, to add the capability to send the switch state via a midi CC message?
It would allow smart controllers to have their state reflecting the dwarf one.
It wouldn’t be too hard to implement, but may lead to a review of my part, as we would have two different CC “semantics” from input to output…
Yes, it is a good idea, I will work on this soon. Thanks for the suggestion.
Hi,
I finally took the time to test this plugin, and what I see is :
- when I assign the Toggle 1-A to the Dwarf’s middle footshitch, and the Toggle 1-B to the Dwarf’s right footswitch, if I press the middle footswitch ;
- the LED statue of the right footswitch changes
…
- but not the actual state of the switch
- so I can’t turn of the effect without double-tapping the right footswitch
- the LED statue of the right footswitch changes
- when I assign the Toggle 1-A to the Dwarf’s middle footshitch, and the Toggle 1-B to the midi message CC0 :
- if the Dwarf’s footswitch is disengaged, and send the midi message CC0 127 → nothing happen (it should at least engage the Toggle 1-B, no ?)
- if the Dwarf’s footswitch is disengaged, and send the midi message CC0 0 → nothing happen (as expected !)
- if the Dwarf’s footswitch is engaged, and send the midi message CC0 127 → nothing happen (as expected !)
- if the Dwarf’s footswitch is engaged, and send the midi message CC0 0 → it only disengages the LED of the Dwarf’s footswitch
Not sure I understand the way this plugin is meant to do if not reflecting the state of a plugin triggered by 2 different things… where am I wrong ?
I haven’t figured this one out either. Could someone annotate a simplified demo board and explain with a contextual example? Maybe with a shared pedalboard that could serve as a template.
sorry, I completely missed your messages.
this plugin allows to toggle a CV value in (up to) 3 different ways:
consider this example:
“Toggle 1” has been bounded to:
-
- Button B of the device via the “Toggle 1-A” item: every time you press the button the CV value changes
- Button B of the device via the “Toggle 1-A” item: every time you press the button the CV value changes
-
- MIDI CC 1 via the “Toggle 1-B” item: you can send 0 to turn it off or 127 to turn it on, the usual MOD way
- MIDI CC 1 via the “Toggle 1-B” item: you can send 0 to turn it off or 127 to turn it on, the usual MOD way
-
- MIDI CC 12 via the common “CC” item in the plugin configuration. every time a CC is received with “control=12 and value =0” the CV value is toggled. (see note*)
- MIDI CC 12 via the common “CC” item in the plugin configuration. every time a CC is received with “control=12 and value =0” the CV value is toggled. (see note*)
Notes:
-
On my device, if some toggle is mapped to a device button, the led is correctly turned on and off accordingly
-
while bounding the controls to device buttons or to midi the usual way results quite intuitive for a mod user, the third one need some more in-detail explanation.
I found very frustrating that, given a preset, there was no easy way to toggle single effects on and off via MIDI.
It could be done using the device buttons (they are just 2) and possibly some Control Chain device, but since an external MIDI controller had to send 0 to turn off and 127 to turn on, it would need to know the current state before sending the appropriate (opposite) value.
So I came with the current implementation: it is possible to switch a CV value addressing the toggle index as a parameter of the “CC” message. I asked to @njsiva to add this capability to his plugin rather than creating a new onr
In the example above:“control_change control=12 value=0” would toggle the first CV
“control_change control=12 value=1” would toggle the second CV
“control_change control=12 value=2” would toggle the third CV
“control_change control=12 value=3” would toggle the fourth CV -
As a caveat, if you bound parameters to CV you cannot no more directly set them when defining a snapshot. Rather you have to set the toggle in the “companion” plugin according.
-
@VeggieSoup since the plugin is not in the store I can’t figure how to publish a useful demo
Hope this helps. I find this plugin really useful since it allows to easily mix a “snapshot based” approach with the capability to directly address your overdrive or delay.
EDIT: @njsiva: as @Rom pointed out HERE , there is some unexpected behaviour
I find also this plug-in very useful. It is in all my pedalboards.
An extra functionality is that that you could bypass 5 plug-ins just turning off the control-button-board
Many thanks for pointing that bug out. I have been out of pocket busy with other things and haven’t had a chance to pay the attention this needs will look soon.
But I am glad to hear this has been a useful plugin in some cases.