• Where's the MIDI?

    bangcorrupt04/19/2022 at 23:38 0 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                                                                                                                                                                      
    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. 

  • Does it sound?

    bangcorrupt04/16/2022 at 21:02 0 comments

    I found a service manual with schematic and BoM for the Kaoss Pad 3 here (I couldn't find an official link from Korg). 

    The 50 pin ZIF connector on the motherboard (KLM-2735) is labeled CN1B.  Pins 3-12 are broken out on the right hand side. 

    The schematic shows that pins 4 and 6 send the line in (signals LINE_L and LINE_R) to the panel board (KLM-2734).  The line in is processed by a volume control circuit and sent back to pins 8 and 10 of CN1B as VR_L and VR_R.  

    At first I connected pins 4 and 6 directly to pins 8 and 10 and tested for audio passthrough.

    It sounded pretty good for a fuzz pedal if I hit it hard enough with power chords, but something was clearly wrong.  A closer look at the block diagram shows the line in is stepped down from 10VA to 5VA before reaching the ADC.  We're probably saturating the second buffer by driving it directly from the line input. 

    I built the volume control circuit on some stripboard, minus the switch for selecting mic input as I don't have that board.

    Testing again I got clean audio passthrough with no effects applied. 

  • Is it bricked?

    bangcorrupt04/16/2022 at 20:08 0 comments

    The PCB was sold as 'for parts only' but described as 'fully working'.  First task was to find out if it was working, and if it would run without the rest of the boards connected. 

    The motherboard contains an H8S CPU and the TMS320C55 DSP, along with RAM, ADC, DAC and ports for everything except microphone, headphones and SD card. 

    The DC jack appears to be non standard, so I soldered a salvaged 12V 2A power supply directly to the board. 

    Connecting the USB and powering up, the board is recognised as an ALSA MIDI client and a mass storage device. The SD card is missing as it is on a separate board with the mic input and headphone output.

    aconnect -l
    client 36: 'KP3' [type=kernel,card=5]    0 'KP3 KP3 _ S  
    [37051.005966] usb 3-3: new full-speed USB device number 11 using xhci_hcd
    [37051.163089] usb 3-3: New USB device found, idVendor=0944, idProduct=0020, bcdDevice= 1.00
    [37051.163092] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [37051.163093] usb 3-3: Product: KP3
    [37051.163094] usb 3-3: Manufacturer: KORG INC.
    [37051.177248] usb-storage 3-3:1.1: USB Mass Storage device detected
    [37051.177359] scsi host7: usb-storage 3-3:1.1
    [37052.181804] scsi 7:0:0:0: Direct-Access     GENERIC  KORG KP3 R/W     0010 PQ: 0 ANSI: 2
    [37052.182632] sd 7:0:0:0: Power-on or device reset occurred
    [37052.183447] sd 7:0:0:0: [sdi] Media removed, stopped polling
    [37052.184288] sd 7:0:0:0: [sdi] Attached SCSI removable disk

    Awesome, it's alive.  I connected audio input and output hoping for audio passthrough.  Nothing.