tuntorius / mightier_amp

An alternative app for controlling NUX Mighty amps.
MIT License
187 stars 18 forks source link

Using the HID/MIDI function with a USB keyboard #19

Closed TullyMore closed 1 year ago

TullyMore commented 2 years ago

Hi tuntorius,

I just played around with the new HID/MIDI function you implemented. Very nice addition to the app.

I’m using it with a USB keyboard attached through an on the go adapter and in general it works. I’m just having issues, that settings aren’t getting saved, or get forgotten, etc.

Before I go in to further testing, I wanted to ask, if my keyboard through OTG adapter is supposed to work, or if I’m on the wrong path.

I would also like to ask two more questions, that aren't worth to open a separate issue for:

I found the "hidden" volume tab at the bottom of the screen, just above the editor and other icons. How is it different from the "amp" volume slider, or the android device buttons? Which volume does it actually change?

And could I ask you to release a new version, with landscape mode enabled? I’m kind of getting a stiff neck from twisting my head, while testing :-)

tuntorius commented 2 years ago

Are the key bindings really not saved (they don't appear in the HID menu) or simply they don't work as if the app is not in focus? I'm asking this because that is the exact behavior I have when using an emulator, they work only the first time. This happens only on the emulator though. I have tested it on 2 phones and it works fine on them.

I made this volume slider like this so it's accessible on each tab. I call it "fake" master volume slider. It works on top of the amp level slider. Let's say you want to play quietly and you reduce the amp level to 20%. But then you switch to another preset which has the amp level set to 95% and it will blow your ears. If instead of the amp level you used this "master" volume slider, then when you load another preset, the app will scale down the amp level according to this slider. It works even when changing channels using the toggle button on the plug. The app senses that the channel is changed and immediately turns the volume down according to the slider.

About the landscape mode. The app UI became is a bit complex so I'm still struggling to also redo it in landscape but I'm working on it.

Yimyai commented 2 years ago

Hi both,

All settings with my Airstep (over bluetooth) are remembered. The only thing that isn't remembered is the connection to the Airstep itself. It would be nice if it remembered and tried to re-connect on startup, but it's really a very minor problem. It also seems to only connect if the Airstep is switched on BEFORE opening the Mightier Amp app

TullyMore commented 2 years ago

Sorry for not being more precise. When assigning a key to a function in the HID menu, the key is saved and visible.

Just played around a little more and might have found the issue. It seems, that when you‘re setting a key in the „Parameter Hotkeys“, all existing settings, including the key just set in „Parameter Hotkeys“ are deleted.

The reason why a single key only worked once might be my Android version (7.1.2). When attaching the keyboard, a system message pops up and asks you to configure the keyboard. This seem to block any pressed key to be recognised by your app.

When swiping this message away, your app still won‘t recognise the pressed keys until I change a value in your app by tapping on the screen. Might not only be a focus issue, as your app isn‘t recognising a key press, when selecting your app via the „open apps menu“ function (I have no idea how this is called. I mean the overview menu you get, when you press the rectangle at the bottom of the screen an all open apps pop up).

Thanks, for explaining the master volume slider. This is certainly a very good addition. Maybe this should be documented somewhere, so others won‘t have to wonder. Not that I wouldn‘t know that users don‘t read manuals anyway and programmers hate to document ;-)

tuntorius commented 2 years ago

@Yimyai on app startup there's a 6-8 second Bluetooth scan and if it finds a known device, it connects automatically to it. Doesn't it work for you? I can't make this scan running during the entire app lifecycle so it works only at the beginning.

@TullyMore I should hide the parameter hotkeys menu for the HID device. It doesn't make sense for it. You need pedal/slider that sends both a command code and a variable value to control a slider. As for the key detecting problem you are right it's buggy. I'll see what I can do for it.

TullyMore commented 2 years ago

You're probably right, removing the Parameter Hotkeys. The only parameter worth keeping would be the delay time. Tapping in the delay time using your foot while playing the guitar is quite useful. Maybe you can keep this parameter and add it to the Effect On/Off Hotkeys menu?

tuntorius commented 2 years ago

That's a good idea. Maybe the best thing will be to leave that menu and just gray out the unusable fields since there might be even more things to add there that will work fine with buttons. I'll definitely extend this remote control functionality with additional controls.

Stratoblues commented 2 years ago

Hi all, and thanks to the developer Tuntorius. I noticed that using an usb keyboard with an otg adpater (like TullyMore) the first time and every time I close and re open app...the selection doesn't work; but if I press one time 'up arrow' selections saved before start to work like a magic. I try several times, to close app...turn off mighty plug and reopen and connect everything...but if I don't press 'up arrow' first, the selection with keyboard keys don't work. I don't know if this can help you. Let me know if I can test something for you. Thanks