Close

Where's the MIDI?

A project log for Kaoss Part

Kaoss Pad 3 motherboard hacks.

bangcorruptbangcorrupt 04/19/2022 at 23:380 Comments

Some of the main KP3 controls are available via MIDI, however those required for sampling are only available as physical controls.  The buttons are read via a scan matrix, I plan to emulate button input in software using GPIO and expose the controls transparently via MIDI (similarly for LED output).

First step is to hijack the MIDI connection and insert a processor we have full control over.  

The schematic shows serial MIDI input coming via a buffer, stepped down to 3.3V.  Signal MIDI_IN from pin 4 is connected directly to the CPU.  MIDI_OUT is a similar circuit using pin 13 of the same buffer IC. 

There are vias close to the pins we need, and another pair a short trace away.  I soldered short wires into them (the two leading to the CPU can be seen at the right hand edge of the photo):

and cut the traces connecting them (between labels 'R75' and 'D3').

A scrap of stripboard, a blob of hot glue and some tape to hide the solder mess and we're ready for testing.

I programmed an stm32 dev board to send and receive MIDI data on USART2 and USART6.  Anything received on USART2 is sent directly out of USART6 and vice versa.  If all has gone to plan, we should have transparent MIDI passthrough as if nothing has been modified. 

I connected the hardware and ran a script to test if the modified serial MIDI behaved the same as the untouched USB MIDI.

[bc@box]$ python test-midi.py                                                                                                                                                                                          
                                                                                                                                                                                                                                            
Test MIDI                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                            
F0 7E 00 06 02 42 78 00 00 00 00 04 00 01 F7                                                                                                                                                                                                
F0 7E 00 06 02 42 78 00 00 00 00 04 00 01 F7                                                                                                                                                                                                
                                                                                                                                                                                                                                            
Success: Serial MIDI response matches USB MIDI response.                                                                                                                                                                                    
                                                                                                                                                                                                                                            
Test Audio                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                            
Pad-On=0x7f, Pad-X=0x3f, Pad-Y=0x3f, Hold=0x7f, Depth=0x7f, Level=0x7f                                                                                                                                                                      
                                                                                                                                                                                                                                            
Program=60                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                            
Audio should have delay fx applied.     

Success!  Audio has FX applied and we can control the KP3 via MIDI as if nothing has been modified.  Later when we hack the scan matrix, we will be able to emulate button pushes in response to currently unsupported MIDI control change messages. 

Discussions