katana-midi-bridge icon indicating copy to clipboard operation
katana-midi-bridge copied to clipboard

GPIO

Open minusalpha opened this issue 7 years ago • 9 comments

Could it be used with a Raspberry Pi and GPIO instead of midi? Might be nice to make a pi based footswitch like the GA-FC that plugs into the USB port on a Katana 50.

minusalpha avatar Feb 15 '18 22:02 minusalpha

If someone wants to pick that up, it would be a reasonable idea. I haven't had a lot of time to work on this code in the past year or so. I did code up some templates that could be used to translate specific commands into sysex, but it's not in a form that can currently be integrated.

snhirsch avatar Feb 16 '18 14:02 snhirsch

I may just use a couple of switches on the gpio and specify midi commands then. Cool Thanks!

minusalpha avatar Feb 16 '18 22:02 minusalpha

Sure, hopefully the various class functions are clear. Assuming you know Python it should be simple to build whatever you want on top of the low-level classes.

snhirsch avatar Feb 16 '18 23:02 snhirsch

I'll definitely tinker with it. I have just enough python to be dangerous.

On Feb 16, 2018 6:14 PM, "snhirsch" [email protected] wrote:

Sure, hopefully the various class functions are clear. Assuming you know Python it should be simple to build whatever you want on top of the low-level classes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/snhirsch/katana-midi-bridge/issues/12#issuecomment-366385875, or mute the thread https://github.com/notifications/unsubscribe-auth/AIYAN1cTvk-YY2sE_a_ABMofLDiguu9Zks5tVgvXgaJpZM4SHnro .

minusalpha avatar Feb 16 '18 23:02 minusalpha

So I ended up making a teensy midi controller, which works flawlessly with the katana 50. For the most part, I just wanted the basic GA-FC functions on the 50, so I just used ALSA to route the midi on an old raspberry pi I had. I've been digging around in your sysex documentation. Super awesome work BTW. And I was trying to implement a tap for delay. The teensy can totally send sysex, and I understand about averaging times between taps to calculate delay time. I was just wondering If I can just send a command stating the delay time, or if i need to send "select for edit" before i send that message.

minusalpha avatar May 18 '18 20:05 minusalpha

If you simply want to control the amp, no need for edit mode. Just send the delay time. Remember to observe the "no high bit" rule when forming the value :-). I think that's explained in the docs.

snhirsch avatar May 18 '18 20:05 snhirsch

I'm sure it is, but I haven't seen it. Can you explain it?

minusalpha avatar May 18 '18 20:05 minusalpha

Under [Parameters] in the docs:

Note: Tap Tempo equivalent to setting delay time, but it
      averages time between button presses.

Delay Time (1,..,2000ms)
60 00 05 62 --> 00 01 .. 0F 50

Note1: hhll is an 11-bit value representing ms intervals between taps
       (Max 2000). Because sysex data is limited to 7 bits, encoding
       is:

       hh                            ll
       0 0 0 0 b10 b9 b8 b7    0 b6 b5 b4 b3 b2 b1 b0
   
       So, the maximum value would be 0F 50, or
   
       0 0 0 0 1 1 1 1     0 1 0 1 0 0 0 0

No single byte inside a sysex command can be > 127, so the encoding of an 11-bit value is spread over two bytes as shown.

snhirsch avatar May 18 '18 20:05 snhirsch

Got it. I saw that but i wasn't sure it was what you were talking about. Thanks again so much! I'll check in when I implement it.

minusalpha avatar May 18 '18 21:05 minusalpha