-
Notifications
You must be signed in to change notification settings - Fork 36
Toggle button not working #26
Comments
Currently that is intended behaviour. But i want to change that in the future. It's the same base problem as this one: #24 If you want to use the toggle function in the meantime you have to program your controller to send a value of 127 every time the button is pressed. |
hmm, could also listen to both note_on and note_off for the channel, and
ignore the value. give it a boolean of toggled in the config file to switch
between the current method and the toggle method.
Warmest Regards,
Christopher P. Yarger
Phone: 802-505-7574
Skype: cpyarger
/************************************
Based upon email reliability concerns,
please send an acknowledgment in response to this note.
…On Sat, May 9, 2020 at 2:40 AM lebaston100 ***@***.***> wrote:
Currently that is intended behaviour. But i want to change that in the
future. It's the same base problem as this one: #24
<#24>
If you want to use the toggle function in the meantime you have to program
your controller to send a value of 127 every time the button is pressed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANSE6SFSIJJU5A7QDCQXKLRQT3F7ANCNFSM4M4OVELQ>
.
|
I changed
to
and then manually added a "note_off" entry in the config file to get this behavior. That seemed to be the only change needed in main.py. I may look at setup.py next to make button-mapping easier... |
Implementation is the easy part here, the thing i'm worried about is UX. Because for the controllers that use "note_on" and "note_off" you get a "double" even which could confuse users. |
Well, that's what's working for me, and at least there's enough information here for others who need that functionality to implement it, and get running. Might need to add a question like the "is this a fader or a button" for buttons that asks whether it's a momentary or toggle button, and if toggle, what to set the on and off to separately. Or ignore the off. Two very similar edits got setup.py working with mapping note_off. |
yea, the information is now here if someone needs it. |
You might also consider having the config prompt ask someone to press and release a button. Then, have them do it again. That's a little more "automagical" of a solution; your choice of course on whether you want to be intuitive and sensing, or explicit, in your UX. |
I made the change you suggested but i couldn't figure about where to add the "note_off" in the config file. this is the code that was added for the toggleMute button i chose. but i don't see a "note_on" so it is not obvious for me how to duplicate the entry with a note off |
Your controller seems to send control_change messages, not note_on or note_off. |
updated my setup.py with the one on github. i see now that my controller sends control_change and i can't change that in my controller. with that said i headed to main.py to try and figure where to start: I figured that since handle_midi_input receives message.type: "control_change" the handle_midi_fader function is handling my input. I was thinking that by allowing the function to add "or value == 0" in the if statement, it will also fire the toggle but it didn't do the trick. since my toggle sends either 0 or 127 i thought the problem is that nothing fires when it sends 0 but i guess i didnt understand that correctly :D I will wait for that feature to be added since it seems I can't figure how to implement it myself :) |
Try something in that direction instead. I've not tested in but in theory it should check if the msgVoV matches the current input value so it doesn't trigger the same action twice. |
worked. changed to what lebaston100 suggested and set the button a setMute. then headed into the config file du[licated the entry and changed to mute on 127 and unmute on 0. |
I was trying to set up a toggle button as such. the button lights up when pressed once. then turns down when pressed again. thus trying to set up toggle mute. but, it so happens i need to press the button twice for the toggle to happen.
i think the problem is, said button outputs value 127 when pressed first. then value 0 when pressed again. where in the miditoobs, the toggle is expecting 127 each time the button is pressed.
i tried editing config manually but i dont see a field for the value. as in when value 127 mute: true. then create another listener for that midi key with value 0 mute: false.
am i doing something wrong?
The text was updated successfully, but these errors were encountered: